aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2014-06-26 16:08:37 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org> 2014-06-26 16:08:37 +0200
commit5f02f11890b79f3254fbafa67ee6600982953856 (patch)
treea1948041408bdbbc4ab2067a6a15b6936061ea61 /Makefile
parent055b7ca1312376f2fdf214176a1ae782d05f5396 (diff)
downloadcolorize-5f02f11890b79f3254fbafa67ee6600982953856.tar.gz
colorize-5f02f11890b79f3254fbafa67ee6600982953856.tar.bz2
Include commit hash in version output
Extracting the abbreviated commit hash will break when git will be replaced by a different version control system. But until it does, get the hash from the git repository.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ca0ee68..d061794 100644
--- a/Makefile
+++ b/Makefile
@@ -8,10 +8,11 @@ CC=gcc
CFLAGS=-ansi -pedantic
colorize: colorize.c
- $(CC) $(CFLAGS) -o colorize colorize.c -DCFLAGS="$(CFLAGS)"
+ perl ./version.pl > version.h
+ $(CC) $(CFLAGS) -o colorize colorize.c -DCFLAGS="$(CFLAGS)" -DHAVE_VERSION
check:
perl ./test.pl
clean:
- [ -e colorize ] && rm colorize; exit 0
+ rm -f colorize version.h