From: Tom Tromey Date: Mon, 31 Dec 2001 02:44:37 +0000 (+0000) Subject: * automake.in (define_configure_variable): Define a user macro, X-Git-Tag: v1.10.2~1516 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=876295085c51feb38fb81b2b10b71b0a118f5cc1;p=platform%2Fupstream%2Fautomake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 133f338..0a3fc91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-12-30 Tom Tromey + * 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. + For PR automake/211: * automake.in (object_compilation_map): New global. (initialize_per_input): Initialize it. diff --git a/automake.in b/automake.in index 725e871..2ece128 100755 --- a/automake.in +++ b/automake.in @@ -6624,7 +6624,13 @@ sub define_variable ($$) 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'); + } } diff --git a/tests/Makefile.am b/tests/Makefile.am index 6472ffe..4263cf1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,6 +24,7 @@ ansi2.test \ ansi3.test \ ansi4.test \ ansi5.test \ +ar.test \ asm.test \ auxdir.test \ auxdir2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 6e69068..23e9de9 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -97,6 +97,7 @@ ansi2.test \ ansi3.test \ ansi4.test \ ansi5.test \ +ar.test \ asm.test \ auxdir.test \ auxdir2.test \ diff --git a/tests/ar.test b/tests/ar.test new file mode 100755 index 0000000..60c1f47 --- /dev/null +++ b/tests/ar.test @@ -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