diff 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
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