Add support for package codename into codename-stamp (like version)

This commit is contained in:
Julien Danjou 2008-03-13 10:57:10 +01:00
parent 14798753ca
commit f4beb460d8
2 changed files with 20 additions and 1 deletions

19
build-utils/package-codename Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
# Syntax:
# $0 <path-to-top_srcdir> <codename-stamp-file>
#
# <path-to-top_srcdir> may be relative
# <codename-stamp-file> is relative to src/build topdir
top_srcdir="${1-.}"
test -d "$top_srcdir" || { \
echo "Could not change to top_srcdir '$1'" >&2; \
exit 1; \
}
codename_stamp="${2-codename-stamp}"
if test -f "$top_srcdir/$codename_stamp"; then # dist source tree
echo \"$(cat "$top_srcdir/$codename_stamp" | ${TR-tr} -d '\012')\"
else
echo \""Productivity Breaker"\" | ${TR-tr} -d '\012'
fi

View File

@ -24,7 +24,7 @@ std-options
subdir-objects subdir-objects
]) ])
AC_DEFINE_UNQUOTED([AWESOME_RELEASE], ["Productivity Breaker"], [release code name]) AC_DEFINE_UNQUOTED([AWESOME_RELEASE], [m4_esyscmd([./build-utils/package-codename . codename-stamp])], [release code name])
AC_MSG_CHECKING([package version according to autoconf]) AC_MSG_CHECKING([package version according to autoconf])
AC_MSG_RESULT([${PACKAGE_VERSION}]) AC_MSG_RESULT([${PACKAGE_VERSION}])