Created
February 13, 2016 11:36
-
-
Save koenbok/4e579e9686b4f3999d69 to your computer and use it in GitHub Desktop.
Updating subprojects in Makefiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Preferred way to deal with subprojects, because we want to avoid submodules. | |
| # This way we do everything explicitly, and can verify everything in commits. | |
| # We need to always keep master in good condition. | |
| TMP = ./tmp | |
| PROJECT_TEMP = $(TMP)/FramerSketch | |
| PROJECT_GIT = git@github.com:motif/FramerSketch2.git | |
| update%project: | |
| @mkdir -p $(TMP) | |
| @if ! cd $(PROJECT_TEMP)/.git; then git clone $(PROJECT_GIT) $(PROJECT_TEMP); fi | |
| cd $(PROJECT_TEMP); git reset --hard; git pull | |
| cd $(PROJECT_TEMP); make build | |
| # Copy over any files, for example | |
| rm -rf ExtraResources/project | |
| cp -rf $(PROJECT_TEMP)/build ExtraResources/project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment