Mercurial > pt1.oyama
changeset 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 | c701bbc532b4 |
children | 18108d097707 |
files | recpt1/Makefile |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/recpt1/Makefile Thu Oct 22 02:26:03 2009 +0900 +++ b/recpt1/Makefile Sat Oct 24 16:49:53 2009 +0900 @@ -26,9 +26,9 @@ $(CC) -MM $(OBJS:.o=.c) $(CPPFLAGS) > $@ version.h: - if test -d ../.hg ; then \ - revh=`hg parents --template 'const char *version = "r#rev#:#node|short# (#date|isodate#)";\n' 2>/dev/null`; \ - [ -z "$$revh" ] || echo "$$revh" > $@; \ + revh=`hg parents --template 'const char *version = "r#rev#:#node|short# (#date|isodate#)";\n' 2>/dev/null`; \ + if [ -n "$$revh" ] ; then \ + echo "$$revh" > $@; \ else \ echo "const char *version = \"$(RELEASE_VERSION)\";" > $@; \ fi