automake-patches
[Top][All Lists]
Advanced

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

mumble+= foo


From: Alexandre Duret-Lutz
Subject: mumble+= foo
Date: 22 May 2001 16:41:33 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

I'm just checking Automake 1.4f against a project for
which I presently use plain 1.4.

~/enst/palm/tlp224e % automake                                        15:56 #60
8: bad macro name `LDFLAGS+'
Use of uninitialized value in string eq at /home/adl/usr/bin/automake line 5192.
Use of uninitialized value in hash element at /home/adl/usr/bin/automake line 
1751.
Use of uninitialized value in string eq at /home/adl/usr/bin/automake line 5192.
Use of uninitialized value in hash element at /home/adl/usr/bin/automake line 
1751.
Use of uninitialized value in string eq at /home/adl/usr/bin/automake line 5192.
Use of uninitialized value in hash element at /home/adl/usr/bin/automake line 
1751.

The uninitialized values are another instance of the `unknown' source
extensions bug reported earlier.  The bad macro name comes from here:

~/enst/palm/tlp224e % fgrep LDFLAGS+ src/Mak*                         Err 1 #61
src/Makefile.am:LDFLAGS+= -nostartfiles
src/Makefile.in:LDFLAGS+ = -nostartfiles

Ouch!

2001-05-22  Alexandre Duret-Lutz  <address@hidden>

        * automake.in (ASSIGNMENT_PATTERN): Forbid : and + in variable names.

--- automake.in.orig    Tue May 22 16:02:15 2001
+++ automake.in Tue May 22 16:02:17 2001
@@ -124,7 +124,7 @@
 # leading tabs here then we need to make the reader smarter, because
 # otherwise it will think rules like `foo=bar; \' are errors.
 my $MACRO_PATTERN = 'address@hidden';
-my $ASSIGNMENT_PATTERN = '^ *([^ \t=]*)\s*([:+]?)=\s*(.*)$';
+my $ASSIGNMENT_PATTERN = '^ *([^ \t=:+]*)\s*([:+]?)=\s*(.*)$';
 # This pattern recognizes a Gnits version id and sets $1 if the
 # release is an alpha release.  We also allow a suffix which can be
 # used to extend the version number with a "fork" identifier.


Now, with this patch applied I get this:

~/enst/palm/tlp224e % automake                                        16:12 #71
src/Makefile.am: LDFLAGS must be set with `=' before using `+='
Use of uninitialized value in string eq at /home/adl/usr/bin/automake line 5192.
Use of uninitialized value in hash element at /home/adl/usr/bin/automake line 
1751.
Use of uninitialized value in string eq at /home/adl/usr/bin/automake line 5192.
Use of uninitialized value in hash element at /home/adl/usr/bin/automake line 
1751.
src/Makefile.am:8: LDFLAGS was set with `+=' and is now set with `='
Use of uninitialized value in string eq at /home/adl/usr/bin/automake line 5192.
Use of uninitialized value in hash element at /home/adl/usr/bin/automake line 
1751.
~/enst/palm/tlp224e %                                                 Err 1 #72

In Automake 1.4 my `LDFLAGS+= -nostartfiles' line was output as
`LDFLAGS= -nostartfiles' in Makefile.in, thanks to those warnings I
just realized that.  But that's not what I want: basically I'd like to
inherit @LDFLAGS@ from Autoconf and append -nostartfiles to it.
Apparently automake is just trying to do that in the opposite way
(append first, and define after).

Of course I will fix my Makefile.am by using `LDFLAGS= @LDFLAGS@ -nostartfiles'
but if would be nice if the += could work for inherited variables,
it sounds pretty natural to me.

-- 
Alexandre Duret-Lutz





reply via email to

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