From 1add9dcc1bd28f86d9e3f6582e0d43ecbcd88301 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 15 May 2005 10:52:23 +0000 Subject: Added automatic determination of the SVN revision number if a build takes place in a checked-out copy. Also added mkunxarc.sh which does the same version determination before building its archive. [originally from svn r5782] --- Recipe | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Recipe') diff --git a/Recipe b/Recipe index 4c508c1..c79f9a9 100644 --- a/Recipe +++ b/Recipe @@ -102,8 +102,10 @@ FORCE: !begin gtk version.o: FORCE; FORCE: - if test -z "$(VER)" && md5sum -c manifest; then \ + if test -z "$(VER)" && test -f manifest && md5sum -c manifest; then \ $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c; \ + elif test -z "$(VER)" && svnversion . >&/dev/null; then \ + $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) "-DREVISION=`svnversion .`" -c version.c; \ else \ $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c version.c; \ fi @@ -117,6 +119,8 @@ version.o: FORCE; FORCE: if test -z "$(VER)" && test -f manifest && (md5 -r `awk '{print $$2}' manifest` | diff -w manifest -); then \ $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c; \ + elif test -z "$(VER)" && svnversion . >&/dev/null; then \ + $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) "-DREVISION=`svnversion .`" -c version.c; \ else \ $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c version.c; \ fi -- cgit v1.1