Skip to content

Instantly share code, notes, and snippets.

@jcaesar
Last active May 24, 2019 04:40
Show Gist options
  • Save jcaesar/b835c747ff1b7e8bec87 to your computer and use it in GitHub Desktop.
Save jcaesar/b835c747ff1b7e8bec87 to your computer and use it in GitHub Desktop.
Example of my style of makefile build configuration
CONFIGVALUE?=defaultvalue
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