Hi, Alle giovedì 27 settembre 2012, Thomas Schwinge ha scritto: > On Mon, 24 Sep 2012 02:04:05 +0200, Guillem Jover <guil...@hadrons.org> wrote: > > On Mon, 2012-09-24 at 00:30:39 +0200, Pino Toscano wrote: > > > Alle lunedì 24 settembre 2012, Thomas Schwinge ha scritto: > > > > On Mon, 24 Sep 2012 00:04:20 +0200, Pino Toscano wrote: > > > > > +# An optional suffix for the version string. > > > > > +AC_MSG_CHECKING([for the suffix for the version string]) > > > > > +AC_ARG_WITH(version-suffix, > > > > > AC_HELP_STRING([--with-version-suffix=STRING], + > > > > > [append STRING to the version string]), > > > > > + [PACKAGE_VERSION_SUFFIX=$withval]) > > > > > +AC_MSG_RESULT([$PACKAGE_VERSION_SUFFIX]) > > > > > +AC_SUBST([PACKAGE_VERSION_SUFFIX]) > > > > > > > > Does the AC_MSG_CHECKING and AC_MSG_RESULT add any useful > > > > information to the build log? (You should know which option > > > > you're configuring with.) > > > > Maybe use AC_MSG_NOTICE instead? > > > > > IMHO it makes the log sligtly more useful, since that option > > > somehow modifies gnumach so it could be useful to know which > > > options affected its build; also a log could be provided by > > > other people, so the more information about its build it > > > provides, the better. > > > > Yeah, I agree. > > I'm not aware of configure scripts typically doing that? I'd suggest > to drop that entirely, but don't insist on that.
Ok, I've decided to drop that for now. > > > > Is --with-version-suffix the standard name for this option? > > > > > > No idea, to be honest :) > > > > I don't think there's any such standard name for this. > > Right, probably not too wide-spread. GCC has: > > --with-pkgversion=PKG Use PKG in the version string in place > of "GCC" > > Without setting that: > > i686-pc-gnu-gcc (GCC) 4.7.0 20110905 (experimental) > > With setting it: > > gcc (Debian 4.7.1-7) 4.7.1 > > (Search for case-insensitive pkgversion in config/acx.m4, > gcc/Makefile.in, gcc/toplev.c, gcc/version.c.) Would that seem > reasonable for GNU Mach, too? It is not the same thing, --with-pkgversion replaces only the part inside the brackets, but it does not affect the actual version. I updated the patch as said above. -- Pino Toscano
From 81d62b666ac10f379196948a99af321f48171b6b Mon Sep 17 00:00:00 2001 From: Pino Toscano <toscano.p...@tiscali.it> Date: Mon, 1 Oct 2012 19:57:05 +0200 Subject: [PATCH] configure: add --with-version-suffix=STRING Add the possibility to append a custom string to the gnumach version string. (Useful to distinguish different flavours of kernel.) * configure.ac (--with-version-suffix): New option. (PACKAGE_VERSION_SUFFIX): New variable, set with the value of --with-version-suffix. * version.c.in (version): Append PACKAGE_VERSION_SUFFIX. --- configure.ac | 6 ++++++ version.c.in | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3a7d3be..368a29a 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,12 @@ AC_CHECK_PROG([PATCH], [patch], [patch], [patch-not-found]) # configure fragments. # +# An optional suffix for the version string. +AC_ARG_WITH(version-suffix, AC_HELP_STRING([--with-version-suffix=STRING], + [string to append to the version string]), + [PACKAGE_VERSION_SUFFIX=$withval]) +AC_SUBST([PACKAGE_VERSION_SUFFIX]) + # The test suite. m4_include([tests/configfrag.ac]) diff --git a/version.c.in b/version.c.in index d894d7f..2c57314 100644 --- a/version.c.in +++ b/version.c.in @@ -1,2 +1,2 @@ /* @configure_input@ */ -const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@"; +const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@@PACKAGE_VERSION_SUFFIX@"; -- 1.7.10.4
signature.asc
Description: This is a digitally signed message part.