]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (append_exeext): Do not append $(EXEEXT) to
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 21 Nov 2003 19:16:12 +0000 (19:16 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 21 Nov 2003 19:16:12 +0000 (19:16 +0000)
@substitutions@.
* tests/exeext4.test: New file.
* tests/Makefile.am (TESTS): Add exeext4.test.

ChangeLog
automake.in
tests/Makefile.am
tests/Makefile.in
tests/exeext4.test [new file with mode: 0755]

index 46044a5fa588e4ca78cef5b213b5e230ea9838d5..f24e6c506b0c3a7decd2287ae14621156f8428c4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-11-21  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * automake.in (append_exeext): Do not append $(EXEEXT) to
+       @substitutions@.
+       * tests/exeext4.test: New file.
+       * tests/Makefile.am (TESTS): Add exeext4.test.
+
 2003-11-19  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * lib/am/configure.am (%MAKEFILE%): Remove %MAINTAINER-MODE%,
index 12a8b658ba553db559466d33c5ad29d9b3eadd61..f37c3afc94af965282fbfea25a389fcce4656438 100755 (executable)
@@ -6084,8 +6084,9 @@ sub append_exeext ($)
     ($macro, $macro, 'am__EXEEXT', 0, INTERNAL,
      sub {
        my ($subvar, $val, $cond, $full_cond) = @_;
-       # Append $(EXEEXT) unless the user did it already.
-       $val .= '$(EXEEXT)' unless $val =~ /\$\(EXEEXT\)$/;
+       # Append $(EXEEXT) unless the user did it already, or it's a
+       # @substitution@.
+       $val .= '$(EXEEXT)' unless $val =~ /(?:\$\(EXEEXT\)$|^[@]\w+[@]$)/;
        return $val;
      });
 }
index cc46859bae1fba990f74c97633f82f9247f2504e..1bc548f38e31414f4b51c45644ad31fca3b5b779 100644 (file)
@@ -194,6 +194,7 @@ exdir2.test \
 exeext.test \
 exeext2.test \
 exeext3.test \
+exeext4.test \
 exsource.test \
 ext.test \
 ext2.test \
index 8f6a273d1e2475634c9054746fa6a5f5922b6b81..a999b708353a67d6f0dcb9839b51bf7d8f37f8d1 100644 (file)
@@ -308,6 +308,7 @@ exdir2.test \
 exeext.test \
 exeext2.test \
 exeext3.test \
+exeext4.test \
 exsource.test \
 ext.test \
 ext2.test \
diff --git a/tests/exeext4.test b/tests/exeext4.test
new file mode 100755 (executable)
index 0000000..951ada1
--- /dev/null
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2003  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Make sure $(EXEEXT) is not appended to @substitutions@.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([programs], ['prg1$(EXEEXT) prg2$(EXEEXT)'])
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+EXEEXT = .bin
+bin_PROGRAMS = $(programs) @programs@ prg3
+EXTRA_PROGRAMS = prg1 prg2 prg3
+print-bin:
+       echo BEG: $(bin_PROGRAMS) :END
+print-extra:
+       echo BEG: $(EXTRA_PROGRAMS) :END
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE print-bin > output
+cat output
+grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin' output
+$MAKE print-extra > output
+cat output
+grep 'prg1.bin prg2.bin prg3.bin' output