From: Michael Hope <michael.hope@linaro.org>
To: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: crossgcc@sourceware.org
Subject: [PATCH] configure: support arbitrary versions via a shell script
Date: Sun, 13 Nov 2011 23:10:00 -0000 [thread overview]
Message-ID: <02572d8009f6a872ccd2.1321225822@crucis> (raw)
# 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
next reply other threads:[~2011-11-13 23:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-13 23:10 Michael Hope [this message]
2011-11-14 7:21 ` Yann E. MORIN
2011-11-14 20:37 ` Michael Hope
2011-11-14 21:17 ` Yann E. MORIN
2011-11-15 2:42 ` Michael Hope
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02572d8009f6a872ccd2.1321225822@crucis \
--to=michael.hope@linaro.org \
--cc=crossgcc@sourceware.org \
--cc=yann.morin.1998@anciens.enib.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).