This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
# HG changeset patch # User Michael Hope <michael.hope@linaro.org> # Date 1321225775 -46800 # Branch any-version # Node ID 02572d8009f6a872ccd28d2e020b19772d7e8906 # Parent 3cd375ecdd7213104577bbd70863fa35f387bb93 configure: support arbitrary versions via a shell script If the executable file '.version.sh' exists, then use its output for the version. Fall back to the contents of '.version' if the script fails. Note that .version.sh doesn't have to be a shell script. I considered making .version itself executable instead but this would cause trouble with FAT based filesystems. The fallback to .version is a bit dodgy. Failing might be stricter but is unfriendly. Signed-off-by: Michael Hope <michael.hope@linaro.org> diff -r 3cd375ecdd72 -r 02572d8009f6 configure --- a/configure Sun Nov 13 18:24:36 2011 +0100 +++ b/configure Mon Nov 14 12:09:35 2011 +1300 @@ -2,7 +2,9 @@ myname="${0##*/}" -VERSION=$( cat .version ) +[ -f .version.sh -a -x .version.sh ] && VERSION=$( ./.version.sh ) +[ -z "${VERSION}" ] && VERSION=$( cat .version ) + DATE=$( date +%Y%m%d ) PREFIX_DEFAULT=/usr/local -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |