From cc8345431abe17dd39657df8b02ab7962121ea85 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 22 Jul 2001 21:50:18 +0000 Subject: [PATCH] * lib/am/progs.am (install-%DIR%PROGRAMS): Test for `prog, not `prog.exe' on Cygwin with libtool. From Robert Collins. --- ChangeLog | 5 +++++ lib/am/progs.am | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e51cb9d0..3b82a947 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-07-22 Tom Tromey + + * 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 * tests/dirname.test: Explicitly use $SHELL to run the diff --git a/lib/am/progs.am b/lib/am/progs.am index 537fd0b9..191c52b1 100644 --- a/lib/am/progs.am +++ b/lib/am/progs.am @@ -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"; \ -- 2.43.5