automake-patches
[Top][All Lists]
Advanced

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

Patch: FYI: fix AR bug


From: Tom Tromey
Subject: Patch: FYI: fix AR bug
Date: 30 Dec 2001 19:55:08 -0700

I'm checking this in.
This fixes the AR problem noted on the main list.

Tom

Index: ChangeLog
from  Tom Tromey  <address@hidden>
        * automake.in (define_configure_variable): Define a user macro,
        not an automake macro.
        * tests/Makefile.am (TESTS): Added ar.test.
        * tests/ar.test: New file.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1250
diff -u -r1.1250 automake.in
--- automake.in 2001/12/31 01:01:02 1.1250
+++ automake.in 2001/12/31 02:43:17
@@ -6624,7 +6624,13 @@
 sub define_configure_variable ($)
 {
     my ($var) = @_;
-    define_variable ($var, subst $var);
+    if (! variable_defined ($var, 'TRUE'))
+    {
+       # A macro defined via configure is a `user' macro -- we should not
+       # override it.
+       macro_define ($var, 0, '', 'TRUE', subst $var, undef);
+       variable_pretty_output ($var, 'TRUE');
+    }
 }
 
 
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.363
diff -u -r1.363 Makefile.am
--- tests/Makefile.am 2001/12/31 01:01:03 1.363
+++ tests/Makefile.am 2001/12/31 02:43:17
@@ -24,6 +24,7 @@
 ansi3.test \
 ansi4.test \
 ansi5.test \
+ar.test \
 asm.test \
 auxdir.test \
 auxdir2.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.470
diff -u -r1.470 Makefile.in
--- tests/Makefile.in 2001/12/31 01:01:03 1.470
+++ tests/Makefile.in 2001/12/31 02:43:17
@@ -97,6 +97,7 @@
 ansi3.test \
 ansi4.test \
 ansi5.test \
+ar.test \
 asm.test \
 auxdir.test \
 auxdir2.test \
Index: tests/ar.test
===================================================================
RCS file: ar.test
diff -N ar.test
--- /dev/null   Tue May  5 13:32:27 1998
+++ tests/ar.test Sun Dec 30 18:43:17 2001
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+# Test for setting AR in configure.in.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE($me, 1.0)
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PATH_PROG(AR, arppc)
+AC_CONFIG_FILES(Makefile)
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = maude.c
+END
+
+$ACLOCAL || exit 1
+$AUTOMAKE || exit 1
+
+grep 'AR = ar' Makefile.in && exit 1
+exit 0



reply via email to

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