summaryrefslogtreecommitdiff
path: root/cflags.SH
diff options
context:
space:
mode:
Diffstat (limited to 'cflags.SH')
-rwxr-xr-xcflags.SH6
1 files changed, 4 insertions, 2 deletions
diff --git a/cflags.SH b/cflags.SH
index 4e62f9200e..b429df672b 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -354,8 +354,10 @@ case "$cc" in
;;
esac
-if test -f .patch; then
- ccflags="-DPERL_PATCHNUM=`cat .patch` $ccflags"
+if test -d .git; then
+ ccflags="-DPERL_PATCHNUM=`git describe` $ccflags"
+elsif test -f .patch; then
+ ccflags="-DPERL_PATCHNUM=`awk '{print $4}' .patch` $ccflags"
fi
: Can we perhaps use $ansi2knr here