]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* lib/am/progs.am (install-%DIR%PROGRAMS): Test for `prog, not
authorTom Tromey <tromey@redhat.com>
Sun, 22 Jul 2001 21:50:18 +0000 (21:50 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 22 Jul 2001 21:50:18 +0000 (21:50 +0000)
`prog.exe' on Cygwin with libtool.  From Robert Collins.

ChangeLog
lib/am/progs.am

index e51cb9d0ec5d8343feb4795a0c23e247020f0824..3b82a94775b349d6e02a49cdab0eed04cbc723f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-22  Tom Tromey  <tromey@redhat.com>
+
+       * lib/am/progs.am (install-%DIR%PROGRAMS): Test for `prog, not
+       `prog.exe' on Cygwin with libtool.  From Robert Collins.
+
 2001-07-21  Tim Van Holder  <tim.van.holder@pandora.be>
 
        * tests/dirname.test: Explicitly use $SHELL to run the
index 537fd0b9431c8b49e1b5b1978e2c732731481160..191c52b1e6a3e5ab286e8742742760013b339c1b 100644 (file)
@@ -32,11 +32,16 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \
-         if test -f $$p; then \
+## On Cygwin with libtool test won't see `foo.exe' but instead `foo'.
+## So we check for both.
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+?LIBTOOL?           || test -f $$p1 \
+         ; then \
 ## Note that we explicitly set the libtool mode.  This avoids any
 ## lossage if the install program doesn't have a name that libtool
 ## expects.
-           f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+           f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
 ?LIBTOOL?         echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
 ?LIBTOOL?         $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
 ?!LIBTOOL?        echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \