automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bison-1.875: installation as yacc


From: Akim Demaille
Subject: Re: bison-1.875: installation as yacc
Date: Thu, 09 Jan 2003 13:44:53 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

 >> From: Akim Demaille <address@hidden>
 >> Date: Sun, 05 Jan 2003 14:25:29 +0100
 >> 
 >> The recommended Automake style is to avoid using @, but to use only
 >> $(YACC_SCRIPT) etc.  Actually, I thought it issued warnings.

 Paul> Hmm, I was following the pattern in the "The Uniform Naming Scheme"
 Paul> node of the Automake documentation, which says:

 Paul> EXTRA_PROGRAMS = mt rmt
 Paul> bin_PROGRAMS = cpio pax
 Paul> sbin_PROGRAMS = @MORE_PROGRAMS@

Arg, you are correct.

 Paul> Is this pattern obsolete?

Yep, using real variables and keeping AC_SUBST hidden from the user is
the preferred pattern.

 Paul> But if $(YACC_SCRIPT) works and is preferred, by all means switch it.

I'm applying these in Bison and Automake:

Index: ChangeLog
from  +2003-01-09  Akim Demaille  <address@hidden>

        * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of 
@address@hidden

Index: lib/Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/lib/Makefile.am,v
retrieving revision 1.37
diff -u -u -r1.37 Makefile.am
--- lib/Makefile.am 5 Jan 2003 06:26:25 -0000 1.37
+++ lib/Makefile.am 9 Jan 2003 09:29:58 -0000
@@ -17,7 +17,7 @@
 
 AM_CFLAGS = $(WARNING_CFLAGS)
 
-lib_LIBRARIES = @YACC_LIBRARY@
+lib_LIBRARIES = $(YACC_LIBRARY)
 EXTRA_LIBRARIES = liby.a
 noinst_LIBRARIES = libbison.a
 
@@ -60,5 +60,5 @@
 timevars_sources = \
        timevar.h timevar.c timevar.def
 
-libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
+libbison_a_LIBADD = $(LIBOBJS) $(ALLOCA)
 libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
Index: po/da.po
===================================================================
RCS file: /cvsroot/bison/bison/po/da.po,v
retrieving revision 1.4
diff -u -u -r1.4 da.po
--- po/da.po 1 Jan 2003 10:09:54 -0000 1.4
+++ po/da.po 9 Jan 2003 09:29:58 -0000
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.75b\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-11-28 22:16+0100\n"
 "Last-Translator: Byrial Ole Jensen <address@hidden>\n"
 "Language-Team: Danish <address@hidden>\n"
Index: po/de.po
===================================================================
RCS file: /cvsroot/bison/bison/po/de.po,v
retrieving revision 1.134
diff -u -u -r1.134 de.po
--- po/de.po 1 Jan 2003 10:09:54 -0000 1.134
+++ po/de.po 9 Jan 2003 09:29:59 -0000
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.75e\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-12-27 12:17:36+0100\n"
 "Last-Translator: Michael Piefel <address@hidden>\n"
 "Language-Team: German <address@hidden>\n"
Index: po/es.po
===================================================================
RCS file: /cvsroot/bison/bison/po/es.po,v
retrieving revision 1.134
diff -u -u -r1.134 es.po
--- po/es.po 1 Jan 2003 10:09:54 -0000 1.134
+++ po/es.po 9 Jan 2003 09:29:59 -0000
@@ -29,7 +29,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: GNU bison 1.49a\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-05-02 10:19+0200\n"
 "Last-Translator: Nicolás García-Pedrajas <address@hidden>\n"
 "Language-Team: Spanish <address@hidden>\n"
Index: po/et.po
===================================================================
RCS file: /cvsroot/bison/bison/po/et.po,v
retrieving revision 1.126
diff -u -u -r1.126 et.po
--- po/et.po 1 Jan 2003 10:09:54 -0000 1.126
+++ po/et.po 9 Jan 2003 09:29:59 -0000
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.75e\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-12-27 10:55+0200\n"
 "Last-Translator: Toomas Soome <address@hidden>\n"
 "Language-Team: Estonian <address@hidden>\n"
Index: po/fr.po
===================================================================
RCS file: /cvsroot/bison/bison/po/fr.po,v
retrieving revision 1.134
diff -u -u -r1.134 fr.po
--- po/fr.po 1 Jan 2003 10:09:54 -0000 1.134
+++ po/fr.po 9 Jan 2003 09:29:59 -0000
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: GNU bison 1.75b\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-11-13 08:00-0500\n"
 "Last-Translator: Michel Robitaille <address@hidden>\n"
 "Language-Team: French <address@hidden>\n"
Index: po/hr.po
===================================================================
RCS file: /cvsroot/bison/bison/po/hr.po,v
retrieving revision 1.47
diff -u -u -r1.47 hr.po
--- po/hr.po 1 Jan 2003 10:09:54 -0000 1.47
+++ po/hr.po 9 Jan 2003 09:29:59 -0000
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.34a\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-04-10 22:20+01\n"
 "Last-Translator: Denis Lackovic <address@hidden>\n"
 "Language-Team: Croatian <address@hidden>\n"
Index: po/id.po
===================================================================
RCS file: /cvsroot/bison/bison/po/id.po,v
retrieving revision 1.14
diff -u -u -r1.14 id.po
--- po/id.po 1 Jan 2003 10:09:54 -0000 1.14
+++ po/id.po 9 Jan 2003 09:29:59 -0000
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.75b\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-11-22 12:24GMT+0700\n"
 "Last-Translator: Tedi Heriyanto <address@hidden>\n"
 "Language-Team: Indonesian <address@hidden>\n"
Index: po/it.po
===================================================================
RCS file: /cvsroot/bison/bison/po/it.po,v
retrieving revision 1.70
diff -u -u -r1.70 it.po
--- po/it.po 1 Jan 2003 10:09:54 -0000 1.70
+++ po/it.po 9 Jan 2003 09:29:59 -0000
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.50\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-10-17 14:37+0100\n"
 "Last-Translator: Paolo Bonzini <address@hidden>\n"
 "Language-Team: Italian <address@hidden>\n"
Index: po/ja.po
===================================================================
RCS file: /cvsroot/bison/bison/po/ja.po,v
retrieving revision 1.125
diff -u -u -r1.125 ja.po
--- po/ja.po 1 Jan 2003 10:09:55 -0000 1.125
+++ po/ja.po 9 Jan 2003 09:29:59 -0000
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: GNU bison 1.30f\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-10-29 01:00-05:00\n"
 "Last-Translator: Daisuke Yamashita <address@hidden>\n"
 "Language-Team: Japanese <address@hidden>\n"
Index: po/nl.po
===================================================================
RCS file: /cvsroot/bison/bison/po/nl.po,v
retrieving revision 1.133
diff -u -u -r1.133 nl.po
--- po/nl.po 1 Jan 2003 10:09:55 -0000 1.133
+++ po/nl.po 9 Jan 2003 09:29:59 -0000
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.75b\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-11-16 11:43+0100\n"
 "Last-Translator: Tim Van Holder <address@hidden>\n"
 "Language-Team: Dutch <address@hidden>\n"
Index: po/pt_BR.po
===================================================================
RCS file: /cvsroot/bison/bison/po/pt_BR.po,v
retrieving revision 1.22
diff -u -u -r1.22 pt_BR.po
--- po/pt_BR.po 1 Jan 2003 10:09:55 -0000 1.22
+++ po/pt_BR.po 9 Jan 2003 09:29:59 -0000
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.75b\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-12-14 02:10-0300\n"
 "Last-Translator: Alexandre Folle de Menezes <address@hidden>\n"
 "Language-Team: Brazilian Portuguese <address@hidden>\n"
Index: po/ru.po
===================================================================
RCS file: /cvsroot/bison/bison/po/ru.po,v
retrieving revision 1.132
diff -u -u -r1.132 ru.po
--- po/ru.po 1 Jan 2003 10:09:55 -0000 1.132
+++ po/ru.po 9 Jan 2003 09:30:00 -0000
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.49a\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-07-20 13:23+0400\n"
 "Last-Translator: Dmitry S. Sivachenko <address@hidden>\n"
 "Language-Team: Russian <address@hidden>\n"
Index: po/sv.po
===================================================================
RCS file: /cvsroot/bison/bison/po/sv.po,v
retrieving revision 1.88
diff -u -u -r1.88 sv.po
--- po/sv.po 1 Jan 2003 10:09:55 -0000 1.88
+++ po/sv.po 9 Jan 2003 09:30:00 -0000
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.75e\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-12-28 20:27+0100\n"
 "Last-Translator: Göran Uddeborg <address@hidden>\n"
 "Language-Team: Swedish <address@hidden>\n"
Index: po/tr.po
===================================================================
RCS file: /cvsroot/bison/bison/po/tr.po,v
retrieving revision 1.87
diff -u -u -r1.87 tr.po
--- po/tr.po 1 Jan 2003 10:09:55 -0000 1.87
+++ po/tr.po 9 Jan 2003 09:30:00 -0000
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: bison 1.49a\n"
-"POT-Creation-Date: 2003-01-01 01:28-0800\n"
+"POT-Creation-Date: 2003-01-09 10:29+0100\n"
 "PO-Revision-Date: 2002-06-25 11:03GMT +02:00\n"
 "Last-Translator: Altuð Bayram <address@hidden>\n"
 "Language-Team: Turkish <address@hidden>\n"
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/src/Makefile.am,v
retrieving revision 1.60
diff -u -u -r1.60 Makefile.am
--- src/Makefile.am 5 Jan 2003 06:26:52 -0000 1.60
+++ src/Makefile.am 9 Jan 2003 09:30:00 -0000
@@ -29,7 +29,7 @@
 LDADD = ../lib/libbison.a $(LIBINTL)
 
 bin_PROGRAMS = bison
-bin_SCRIPTS = @YACC_SCRIPT@
+bin_SCRIPTS = $(YACC_SCRIPT)
 EXTRA_SCRIPTS = yacc
 
 bison_SOURCES =                                  \




Index: ChangeLog
from  +2003-01-09  Akim Demaille  <address@hidden>

        * automake.texi: Prefer $(FOO) to @FOO@ in the documentation.

Index: automake.texi
===================================================================
RCS file: /cvs/automake/automake/automake.texi,v
retrieving revision 1.315
diff -u -u -r1.315 automake.texi
--- automake.texi 11 Dec 2002 20:51:03 -0000 1.315
+++ automake.texi 9 Jan 2003 12:43:58 -0000
@@ -20,7 +20,7 @@
 @ifinfo
 This file documents GNU automake @value{VERSION}
 
-Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
@@ -393,8 +393,8 @@
 (@pxref{Directory Variables, , , standards, The GNU Coding Standards}).
 Automake extends this list with @code{pkglibdir}, @code{pkgincludedir},
 and @code{pkgdatadir}; these are the same as the address@hidden
-versions, but with @samp{@@PACKAGE@@} appended.  For instance,
address@hidden is defined as @code{$(libdir)/@@PACKAGE@@}.
+versions, but with @samp{$(PACKAGE)} appended.  For instance,
address@hidden is defined as @code{$(libdir)/$(PACKAGE)}.
 @cvindex PACKAGE, directory
 
 @cindex EXTRA_, prepending
@@ -417,7 +417,7 @@
 @example
 EXTRA_PROGRAMS = mt rmt
 bin_PROGRAMS = cpio pax
-sbin_PROGRAMS = @@MORE_PROGRAMS@@
+sbin_PROGRAMS = $(MORE_PROGRAMS)
 @end example
 
 Defining a primary without a prefix as a variable, e.g.,
@@ -788,7 +788,7 @@
 @example
 bin_PROGRAMS = hello
 hello_SOURCES = hello.c version.c getopt.c getopt1.c getopt.h system.h
-hello_LDADD = @@INTLLIBS@@ @@ALLOCA@@
+hello_LDADD = $(INTLLIBS) $(ALLOCA)
 localedir = $(datadir)/locale
 INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\"
 @end example
@@ -2125,11 +2125,11 @@
 is what cpio's @file{src/Makefile.am} looks like (abridged):
 
 @example
-bin_PROGRAMS = cpio pax @@MT@@
-libexec_PROGRAMS = @@RMT@@
+bin_PROGRAMS = cpio pax $(MT)
+libexec_PROGRAMS = $(RMT)
 EXTRA_PROGRAMS = mt rmt
 
-LDADD = ../lib/libcpio.a @@INTLLIBS@@
+LDADD = ../lib/libcpio.a $(INTLLIBS)
 rmt_LDADD =
 
 cpio_SOURCES = @dots{}
@@ -2158,8 +2158,8 @@
 Automake.  The automatically-assigned value is the contents of
 @address@hidden, with most configure substitutions, @samp{-l},
 @samp{-L}, @samp{-dlopen} and @samp{-dlpreopen} options removed.  The
-configure substitutions that are left in are only @samp{@@LIBOBJS@@} and
address@hidden@@ALLOCA@@}; these are left because it is known that they will not
+configure substitutions that are left in are only @samp{$(LIBOBJS)} and
address@hidden(ALLOCA)}; these are left because it is known that they will not
 cause an invalid value for @address@hidden to be
 generated.
 
@@ -2167,10 +2167,11 @@
 @node Conditional Sources, Conditional Programs, Linking, A Program
 @subsection Conditional compilation of sources
 
-You can't put a configure substitution (e.g., @samp{@@FOO@@}) into a
address@hidden variable.  The reason for this is a bit hard to explain,
-but suffice to say that it simply won't work.  Automake will give an
-error if you try to do this.
+You can't put a configure substitution (e.g., @samp{@@FOO@@} or
address@hidden(FOO)} where @code{FOO} is defined via @code{AC_SUBST}) into a
address@hidden variable.  The reason for this is a bit hard to
+explain, but suffice to say that it simply won't work.  Automake will
+give an error if you try to do this.
 
 Fortunately there are two other ways to achieve the same result.  One is
 to use configure substitutions in @code{_LDADD} variables, the other is
@@ -2191,12 +2192,12 @@
 bin_PROGRAMS = hello
 hello_SOURCES = hello-common.c
 EXTRA_hello_SOURCES = hello-linux.c hello-generic.c
-hello_LDADD = @@HELLO_SYSTEM@@
-hello_DEPENDENCIES = @@HELLO_SYSTEM@@
+hello_LDADD = $(HELLO_SYSTEM)
+hello_DEPENDENCIES = $(HELLO_SYSTEM)
 @end example
 
 @noindent
-You can then setup the @code{@@HELLO_SYSTEM@@} substitution from
+You can then setup the @code{$(HELLO_SYSTEM)} substitution from
 @file{configure.in}:
 
 @example
@@ -2567,8 +2568,8 @@
 The automatically-assigned value is the contents of @samp{_LDADD} or
 @samp{_LIBADD}, with most configure substitutions, @samp{-l}, @samp{-L},
 @samp{-dlopen} and @samp{-dlpreopen} options removed.  The configure
-substitutions that are left in are only @samp{@@LIBOBJS@@} and
address@hidden@@ALLOCA@@}; these are left because it is known that they will not
+substitutions that are left in are only @samp{$(LIBOBJS)} and
address@hidden(ALLOCA)}; these are left because it is known that they will not
 cause an invalid value for @samp{_DEPENDENCIES} to be generated.
 
 @item maude_SHORTNAME
@@ -2997,11 +2998,11 @@
 some @code{_PROGRAMS} or @code{_LTLIBRARIES} primary) contains source
 code that is a mixture of Fortran 77 and C and/or C++, then it requires
 that the macro @code{AC_F77_LIBRARY_LDFLAGS} be called in
address@hidden, and that either @code{$(FLIBS)} or @code{@@FLIBS@@}
address@hidden, and that either @code{$(FLIBS)}
 appear in the appropriate @code{_LDADD} (for programs) or @code{_LIBADD}
 (for shared libraries) variables.  It is the responsibility of the
 person writing the @file{Makefile.am} to make sure that @code{$(FLIBS)}
-or @code{@@FLIBS@@} appears in the appropriate @code{_LDADD} or
+appears in the appropriate @code{_LDADD} or
 @code{_LIBADD} variable.
 
 @cindex Mixed language example
@@ -3012,7 +3013,7 @@
 @example
 bin_PROGRAMS = foo
 foo_SOURCES  = main.cc foo.f
-foo_LDADD    = libfoo.la @@FLIBS@@
+foo_LDADD    = libfoo.la $(FLIBS)
 
 pkglib_LTLIBRARIES = libfoo.la
 libfoo_la_SOURCES  = bar.f baz.c zardoz.cc
@@ -3020,7 +3021,7 @@
 @end example
 
 In this case, Automake will insist that @code{AC_F77_LIBRARY_LDFLAGS}
-is mentioned in @file{configure.in}.  Also, if @code{@@FLIBS@@} hadn't
+is mentioned in @file{configure.in}.  Also, if @code{$(FLIBS)} hadn't
 been mentioned in @code{foo_LDADD} and @code{libfoo_la_LIBADD}, then
 Automake would have issued a warning.
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]