Last active
May 24, 2019 04:40
-
-
Save jcaesar/b835c747ff1b7e8bec87 to your computer and use it in GitHub Desktop.
Example of my style of makefile build configuration
This file contains 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
CONFIGVALUE?=defaultvalue |
This file contains 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
include config | |
somefile: config | |
cat >$@ <<<"$(CONFIGVALUE)" | |
config: config.default | |
@if [ -e config ]; then \ | |
echo Warning: default config newer than config; \ | |
else \ | |
cp -v $< $@; \ | |
fi \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment