Commit aeb0d48e authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Enhance target update in Makefile

  - update all repositories for which a variable ${repository}_repository is
    defined.
parent 6ff4d7c9
......@@ -281,12 +281,11 @@ log:
done
update:
for d in hpp-util hpp-pinocchio hpp-constraints hpp-core \
hpp-template-corba hpp-corbaserver hpp-constraints \
hpp-manipulation hpp-manipulation-urdf hpp-manipulation-corba \
hpp-doc ; do \
echo "Updating $$d";\
${MAKE} $$d.update; done
@for child_dir in $$(ls ${SRC_DIR}); do \
test -d "$$child_dir" || continue; \
test -d "$$child_dir/.git" || continue; \
${MAKE} "$$child_dir".update; \
done
%.checkout:
if [ -d $(@:.checkout=) ]; then \
......@@ -296,15 +295,20 @@ update:
fi \
%.update:
cd ${SRC_DIR}/$(@:.update=);\
git remote rm origin;\
git remote add origin ${$(@:.update=)_repository}/$(@:.update=);\
git fetch origin;\
git checkout -b bce46g origin/${$(@:.update=)_branch};\
git branch -D ${$(@:.update=)_branch};\
git checkout -b ${$(@:.update=)_branch} bce46g;\
git branch -D bce46g;\
git submodule update
if [ "${$(@:.update=)_repository}" = "" ]; then \
echo "$(@:.update=) is not referenced"; \
else \
cd ${SRC_DIR}/$(@:.update=);\
git remote rm origin;\
git remote add origin ${$(@:.update=)_repository}/$(@:.update=);\
git fetch origin;\
git checkout -b bce46g origin/${$(@:.update=)_branch};\
git branch -D ${$(@:.update=)_branch};\
git checkout -b ${$(@:.update=)_branch} bce46g;\
git branch -D bce46g;\
git submodule update; \
fi
%.configure: %.configure.dep
${MAKE} $(@:.configure=).configure_nodep
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment