Skip to content

Instantly share code, notes, and snippets.

@rheum
Last active February 3, 2016 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rheum/3062b128f9ab31de7264 to your computer and use it in GitHub Desktop.
Save rheum/3062b128f9ab31de7264 to your computer and use it in GitHub Desktop.
Make: Recursively Building Git Submodules
.PHONY: all submoduleX submoduleY update-submodules
all: submoduleX submoduleY
submoduleX: submoduleX/Makefile
@- make -C submoduleX
submoduleY: submoduleY/Makefile
@- make -C submoduleY
%/Makefile:
git submodule update --init --remote --recursive
update-submodules:
git submodule update --init --remote --recursive
clean:
git clean -f -d -x
git submodule foreach --recursive make clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment