aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-09-10 17:01:59 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2015-12-17 15:24:37 +0200
commit47f653566c33595449351b83733534c65559d2e3 (patch)
tree66ab5259f7cae8e20b20f886040dbf815256bf66
parent6b41f7cb1fb39932b53551715b35823a0c8af4f1 (diff)
downloadgrecs-47f653566c33595449351b83733534c65559d2e3.tar.gz
grecs-47f653566c33595449351b83733534c65559d2e3.tar.bz2
Makefile.am: Fix rule for gitid.h
-rw-r--r--Makefile.am12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 2c1b5d2..0d71dd2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,14 +25,16 @@ BUILT_SOURCES = gitid.h README
gitid.h:
@if test -e .git; then \
url=`git config --get remote.origin.url | sed 's|.*://||;s|/gitroot/|/|'`; \
- if test "$$url" = "git.gnu.org.ua/grecs.git"; then \
+ case $$url in \
+ git.gnu.org.ua/grecs.git|*@git.gnu.org.ua/grecs.git) \
dirty=`git diff-index --name-only HEAD 2>/dev/null` || dirty=;\
test -n "$$dirty" && dirty="-dirty"; \
ID=`git log -1 --pretty='format:%H-%ct-%ae'`$$dirty;\
- echo "#define GRECS_GIT_ID \"$$ID\"" > gitid.tmp; \
- cmp gitid.tmp gitid.h >/dev/null 2>&1 || mv gitid.tmp gitid.h; \
- rm -f gitid.tmp; \
- fi; \
+ echo "#define GRECS_GIT_ID \"$$ID\"";; \
+ *) echo "#define GRECS_GIT_ID \"unknown\"";; \
+ esac > gitid.tmp; \
+ cmp gitid.tmp gitid.h >/dev/null 2>&1 || mv gitid.tmp gitid.h; \
+ rm -f gitid.tmp; \
fi;
README:

Return to:

Send suggestions and report system problems to the System administrator.