From f4beb460d82e328c343c7482971f61be8eff53f6 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 13 Mar 2008 10:57:10 +0100 Subject: [PATCH] Add support for package codename into codename-stamp (like version) --- build-utils/package-codename | 19 +++++++++++++++++++ configure.ac | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 build-utils/package-codename diff --git a/build-utils/package-codename b/build-utils/package-codename new file mode 100755 index 000000000..df383c6ce --- /dev/null +++ b/build-utils/package-codename @@ -0,0 +1,19 @@ +#!/bin/sh +# Syntax: +# $0 +# +# may be relative +# 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 diff --git a/configure.ac b/configure.ac index 5c9d947a0..06e600611 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ std-options 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_RESULT([${PACKAGE_VERSION}])