Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. .PHONY: all clean force
  2.  
  3. all : app
  4.  
  5. app : aux.o main.o
  6. $(CC) -o $@ $^
  7.  
  8. VPATH=a/aux
  9.  
  10. aux.o : aux.c
  11.  
  12. main.o : main.c version.h
  13.  
  14. version.h : force
  15. ( export LANG=C; \
  16. echo -n 'const char VERSION[] = "'; \
  17. { \
  18. svn info; \
  19. svn status | grep -v '^?'; \
  20. } | tr \\n @ | sed -e s/@/\\\\n/g ; \
  21. echo '";'; \
  22. ) > $@.tmp
  23. cmp -s $@.tmp $@ || mv $@.tmp $@
  24.  
  25. force:
  26.  
  27. clean:
  28. rm -f *.o version.h{,.tmp}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement