From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.devel Subject: decrufting: libguile/version.h generation Date: Wed, 28 Jul 2010 15:49:40 +0200 Message-ID: <8739v3soln.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1280325168 24640 80.91.229.12 (28 Jul 2010 13:52:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2010 13:52:48 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jul 28 15:52:46 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oe73t-0004wn-RP for guile-devel@m.gmane.org; Wed, 28 Jul 2010 15:52:46 +0200 Original-Received: from localhost ([127.0.0.1]:57159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe73t-0000Hz-DY for guile-devel@m.gmane.org; Wed, 28 Jul 2010 09:52:45 -0400 Original-Received: from [140.186.70.92] (port=41628 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oe73m-0000HT-Os for guile-devel@gnu.org; Wed, 28 Jul 2010 09:52:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oe73l-0000KP-8Z for guile-devel@gnu.org; Wed, 28 Jul 2010 09:52:38 -0400 Original-Received: from smtp205.alice.it ([82.57.200.101]:44919) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oe73k-0000K6-TH for guile-devel@gnu.org; Wed, 28 Jul 2010 09:52:37 -0400 Original-Received: from ambire.localdomain (95.236.70.59) by smtp205.alice.it (8.5.124.08) id 4C1A2645029D016C for guile-devel@gnu.org; Wed, 28 Jul 2010 15:52:34 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1Oe70u-0004I1-Th for guile-devel@gnu.org; Wed, 28 Jul 2010 15:49:40 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Windows 98 (1) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10744 Archived-At: --=-=-= I think in the old days libguile/version.h generation was more complicated (and Autoconf less sophisticated), requiring special Makefile.am rules. Luckily, things change... This patch was tested from "sh autogen.sh" through "make dist" with Autoconf 2.65. OK to push? --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-build-Create-libguile-version.h-using-the-configure-.patch Content-Transfer-Encoding: quoted-printable >From e938cce9ed8109ea3ac067cae9d863b1b2fa0412 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Wed, 28 Jul 2010 14:27:42 +0200 Subject: [PATCH] [build] Create libguile/version.h using the configure scri= pt. MIME-Version: 1.0 Content-Type: text/plain; charset=3Dutf-8 Content-Transfer-Encoding: 8bit * configure.ac (AC_CONFIG_FILES): Add libguile/version.h. * libguile/Makefile.am (version.h): Delete target. (EXTRA_DIST): Remove version.h.in. (BUILT_SOURCES): Remove version.h. (MOSTLYCLEANFILES): Remove version.h, version.h.tmp. * libguile/version.h.in (SCM_MAJOR_VERSION): Use conventional @VAR@ instead of @-VAR-@ for =E2=80=98GUILE_MAJOR_VERSION=E2=80=99. (SCM_MINOR_VERSION, SCM_MICRO_VERSION, SCM_EFFECTIVE_VERSION): Likewise for =E2=80=98GUILE_MINOR_VERSION=E2=80=99, =E2=80=98GUILE_MICRO_VERSION= =E2=80=99, =E2=80=98GUILE_EFFECTIVE_VERSION=E2=80=99. --- configure.ac | 1 + libguile/Makefile.am | 15 ++------------- libguile/version.h.in | 8 ++++---- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 57ba8d6..bd3f2ac 100644 --- a/configure.ac +++ b/configure.ac @@ -1630,6 +1630,7 @@ AC_CONFIG_FILES([ emacs/Makefile examples/Makefile libguile/Makefile + libguile/version.h srfi/Makefile guile-readline/Makefile test-suite/Makefile diff --git a/libguile/Makefile.am b/libguile/Makefile.am index a899b85..a030c21 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -416,7 +416,7 @@ DOT_I_FILES =3D vm-i-system.i vm-i-scheme.i vm-i-loader= .i $(AM_V_GEN)$(GREP) '^VM_DEFINE' $< > $@ =20 BUILT_SOURCES =3D cpp-E.c cpp-SIG.c libpath.h \ - version.h scmconfig.h \ + scmconfig.h \ $(DOT_I_FILES) $(DOT_X_FILES) $(EXTRA_DOT_X_FILES) =20 EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES =3D _scm.h \ @@ -599,21 +599,11 @@ EXTRA_DIST =3D ChangeLog-scm ChangeLog-threads \ ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 \ guile-func-name-check \ cpp-E.syms cpp-E.c cpp-SIG.syms cpp-SIG.c \ - c-tokenize.lex version.h.in \ + c-tokenize.lex \ scmconfig.h.top libgettext.h unidata_to_charset.pl libguile.map # $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \ # guile-procedures.txt guile.texi =20 -## We use @-...-@ as the substitution brackets here, instead of the -## usual @...@, so autoconf doesn't go and substitute the values -## directly into the left-hand sides of the sed substitutions. *sigh* -version.h: version.h.in $(top_builddir)/config.status - $(AM_V_GEN)sed < $(srcdir)/version.h.in > $@.tmp \ - -e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \ - -e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \ - -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}: \ - -e s:@-GUILE_EFFECTIVE_VERSION-@:${GUILE_EFFECTIVE_VERSION}: && mv $@.t= mp $@ - ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds. libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status @rm -f libpath.tmp @@ -761,7 +751,6 @@ chknew-E chknew-SIG: =20 MOSTLYCLEANFILES =3D \ - version.h version.h.tmp \ scmconfig.h scmconfig.h.tmp =20 CLEANFILES =3D libpath.h *.x *.doc guile-procedures.txt guile-procedures.t= exi guile.texi \ diff --git a/libguile/version.h.in b/libguile/version.h.in index 49d26c2..427afae 100644 --- a/libguile/version.h.in +++ b/libguile/version.h.in @@ -27,10 +27,10 @@ =20 =20 -#define SCM_MAJOR_VERSION @-GUILE_MAJOR_VERSION-@ -#define SCM_MINOR_VERSION @-GUILE_MINOR_VERSION-@ -#define SCM_MICRO_VERSION @-GUILE_MICRO_VERSION-@ -#define SCM_EFFECTIVE_VERSION "@-GUILE_EFFECTIVE_VERSION-@" +#define SCM_MAJOR_VERSION @GUILE_MAJOR_VERSION@ +#define SCM_MINOR_VERSION @GUILE_MINOR_VERSION@ +#define SCM_MICRO_VERSION @GUILE_MICRO_VERSION@ +#define SCM_EFFECTIVE_VERSION "@GUILE_EFFECTIVE_VERSION@" =20 SCM_API SCM scm_major_version (void); SCM_API SCM scm_minor_version (void); --=20 1.6.3.2 --=-=-=--