]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
bin_PROGRAMS = $(EXTRA_PROGRAMS) should work.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 13 Apr 2009 11:29:25 +0000 (13:29 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 13 Apr 2009 11:30:37 +0000 (13:30 +0200)
* automake.in (am_install_var): For `PROGRAMS' primary, strip
`$(EXEEXT)' here already, so the name uniquifying works even
when we look at names repeatedly, with inconsistent executable
extension; through variable references, we might have added
the extension ourselves earlier.
(handle_programs): No need to strip `$(EXEEXT)' here any more.
* tests/extra8.test: New test.
* tests/Makefile.am: Update.
* THANKS: Update.
Report by Daniel Richard G.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
THANKS
automake.in
tests/Makefile.am
tests/Makefile.in
tests/extra8.test [new file with mode: 0755]

index 31149999732062ce5b61a496fbfdc56f86728c3d..fc419d78d9ada2a9634daffcc10896820cbeaf45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-04-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       bin_PROGRAMS = $(EXTRA_PROGRAMS) should work.
+       * automake.in (am_install_var): For `PROGRAMS' primary, strip
+       `$(EXEEXT)' here already, so the name uniquifying works even
+       when we look at names repeatedly, with inconsistent executable
+       extension; through variable references, we might have added
+       the extension ourselves earlier.
+       (handle_programs): No need to strip `$(EXEEXT)' here any more.
+       * tests/extra8.test: New test.
+       * tests/Makefile.am: Update.
+       * THANKS: Update.
+       Report by Daniel Richard G.
+
 2009-04-10  Jim Meyering  <meyering@redhat.com>
 
        Fix grammar in comments and documentation.
diff --git a/THANKS b/THANKS
index 9f91c9c4c20294653c4f5498a23c58eab92ff52a..c041fbb3eca05f6bb56adfb1d1df76f8402a7234 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -62,6 +62,7 @@ Dalibor Topic         robilad@kaffe.org
 danbp                  danpb@nospam.postmaster.co.uk
 Daniel Jacobowitz      drow@false.org
 Daniel Kahn Gillmor    dkg@fifthhorseman.net
+Daniel Richard G.      danielg@teragram.com
 Dave Brolley           brolley@redhat.com
 Dave Morrison          dave@bnl.gov
 David A. Swierczek     swiercze@mr.med.ge.com
index cdbe24ae2aad3ee5382e6f49d04a55c51798f7dd..3549bdb751539e8e82f2b549785358735c9870e6 100755 (executable)
@@ -2471,11 +2471,6 @@ sub handle_programs
       my $seen_libobjs = 0;
       my $obj = get_object_extension '.$(OBJEXT)';
 
-      # Strip any $(EXEEXT) suffix the user might have added, or this
-      # will confuse &handle_source_transform and &check_canonical_spelling.
-      # We'll add $(EXEEXT) back later anyway.
-      $one_file =~ s/\$\(EXEEXT\)$//;
-
       $known_programs{$one_file} = $where;
 
       # Canonicalize names and check for misspellings.
@@ -7144,6 +7139,14 @@ sub am_install_var
            }
          else
            {
+             # Strip any $(EXEEXT) suffix the user might have added, or this
+             # will confuse &handle_source_transform and &check_canonical_spelling.
+             # We'll add $(EXEEXT) back later anyway.
+             # Do it here rather than in handle_programs so the uniquifying at the
+             # end of this function works.
+             ${$locvals}[1] =~ s/\$\(EXEEXT\)$//
+               if $primary eq 'PROGRAMS';
+
              push (@result, $locvals);
            }
        }
index 027e3f5c5cb75155778046822a0a2d18877a1ce2..9af851205c92e9cd7a003a8fc444fdca8eb29f34 100644 (file)
@@ -263,6 +263,7 @@ extra4.test \
 extra5.test \
 extra6.test \
 extra7.test \
+extra8.test \
 f90only.test \
 flibs.test \
 fn99.test \
index 138e043fd37a3581a175df52c94950996dca1a64..40fcf15449663334e56fab55c0e13b6bd6e06af0 100644 (file)
@@ -418,6 +418,7 @@ extra4.test \
 extra5.test \
 extra6.test \
 extra7.test \
+extra8.test \
 f90only.test \
 flibs.test \
 fn99.test \
diff --git a/tests/extra8.test b/tests/extra8.test
new file mode 100755 (executable)
index 0000000..02272d4
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Copyright (C) 2009  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 3, 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., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Ensure defining bin_PROGRAMS in terms of EXTRA_PROGRAMS works,
+# and that referring to the same program with inconsistent addition
+# of $(EXEEXT) works, too.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+cat >Makefile.am <<'END'
+EXTRA_PROGRAMS = foo bar
+bin_PROGRAMS = $(EXTRA_PROGRAMS) baz
+noinst_PROGRAMS = baz$(EXEEXT)
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+: