Created
November 30, 2015 11:31
-
-
Save nodakai/35d41d1ab8d10b0915d6 to your computer and use it in GitHub Desktop.
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
| .PHONY: all clean force | |
| all : app | |
| app : aux.o main.o | |
| $(CC) -o $@ $^ | |
| VPATH=a/aux | |
| aux.o : aux.c | |
| main.o : main.c version.h | |
| version.h : force | |
| ( export LANG=C; \ | |
| echo -n 'const char VERSION[] = "'; \ | |
| { \ | |
| svn info; \ | |
| svn status | grep -v '^?'; \ | |
| } | tr \\n @ | sed -e s/@/\\\\n/g ; \ | |
| echo '";'; \ | |
| ) > $@.tmp | |
| cmp -s $@.tmp $@ || mv $@.tmp $@ | |
| force: | |
| clean: | |
| rm -f *.o version.h{,.tmp} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment