1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

libast/Mamfile: no release version if git WD not clean

This commit is contained in:
Martijn Dekker 2022-07-30 01:29:29 +02:00
parent 3e84231558
commit 5e45171131

View file

@ -29,9 +29,15 @@ make install
exec - '' | *\*\ [0-9]*.[0-9]*)
exec - # If we're not on a git branch (tarball) or on a branch that starts
exec - # with a number (release branch), then compile as a release version
exec - echo "#ifndef _AST_release"
exec - echo "# define _AST_release 1"
exec - echo "#endif"
exec - if git diff --quiet # WD clean?
exec - then echo "#ifndef _AST_release"
exec - echo "# define _AST_release 1"
exec - echo "#endif"
exec - else echo "/*"
exec - echo " * on a git release branch, but changes were made;"
exec - echo " * _AST_release not defined by default"
exec - echo " */"
exec - fi
exec - ;;
exec - *)
exec - echo "/* not on a git release branch; _AST_release not defined by default */"