Mercurial > pt1.oyama
comparison recpt1/Makefile @ 66:57bb2c26198d
fix a problem that compilation fails if hg is not installed.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 24 Oct 2009 16:49:53 +0900 |
parents | f1553492e8bb |
children | c44e16dbb0e2 |
comparison
equal
deleted
inserted
replaced
65:c701bbc532b4 | 66:57bb2c26198d |
---|---|
24 | 24 |
25 $(DEPEND): version.h | 25 $(DEPEND): version.h |
26 $(CC) -MM $(OBJS:.o=.c) $(CPPFLAGS) > $@ | 26 $(CC) -MM $(OBJS:.o=.c) $(CPPFLAGS) > $@ |
27 | 27 |
28 version.h: | 28 version.h: |
29 if test -d ../.hg ; then \ | 29 revh=`hg parents --template 'const char *version = "r#rev#:#node|short# (#date|isodate#)";\n' 2>/dev/null`; \ |
30 revh=`hg parents --template 'const char *version = "r#rev#:#node|short# (#date|isodate#)";\n' 2>/dev/null`; \ | 30 if [ -n "$$revh" ] ; then \ |
31 [ -z "$$revh" ] || echo "$$revh" > $@; \ | 31 echo "$$revh" > $@; \ |
32 else \ | 32 else \ |
33 echo "const char *version = \"$(RELEASE_VERSION)\";" > $@; \ | 33 echo "const char *version = \"$(RELEASE_VERSION)\";" > $@; \ |
34 fi | 34 fi |
35 | 35 |
36 install: $(TARGET) | 36 install: $(TARGET) |