]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* lib/am/progs.am (install-%DIR%PROGRAMS, uninstall-%DIR%PROGRAMS):
authorAlexandre Duret-Lutz <adl@gnu.org>
Sat, 20 Jul 2002 15:11:50 +0000 (15:11 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sat, 20 Jul 2002 15:11:50 +0000 (15:11 +0000)
Always strip the directory part before applying $(transform),
even for nobase_ targets.
* lib/am/scripts.am (install-%DIR%SCRIPTS, uninstall-%DIR%SCRIPTS):
Likewise.
* tests/nobase.test: Use --program-prefix while testing nobase
support.

ChangeLog
Makefile.in
lib/Automake/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/progs.am
lib/am/scripts.am
tests/nobase.test

index 83b3f855c71a7e65be86aea1ebd779557afcc81b..2cd149636dc3d815035ff9276a8d6ba3451872ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-07-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * lib/am/progs.am (install-%DIR%PROGRAMS, uninstall-%DIR%PROGRAMS):
+       Always strip the directory part before applying $(transform),
+       even for nobase_ targets.
+       * lib/am/scripts.am (install-%DIR%SCRIPTS, uninstall-%DIR%SCRIPTS):
+       Likewise.
+       * tests/nobase.test: Use --program-prefix while testing nobase
+       support.
+
 2002-07-19  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * tests/dirname.test: Delete.  We don't define _AM_DIRNAME anymore.
index 463ad0fbf37de59b9e4ca31811bdf363a6c535f6..ef5e4232d7af01768b228fa0e619acbc52399865 100644 (file)
@@ -52,6 +52,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LIBS = @LIBS@
 LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -160,9 +161,8 @@ install-binSCRIPTS: $(bin_SCRIPTS)
        $(mkinstalldirs) $(DESTDIR)$(bindir)
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
          if test -f $$d$$p; then \
-           f="`echo $$f|sed '$(transform)'`"; \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
            echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
            $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
          else :; fi; \
@@ -171,8 +171,7 @@ install-binSCRIPTS: $(bin_SCRIPTS)
 uninstall-binSCRIPTS:
        @$(NORMAL_UNINSTALL)
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
-         f="`echo $$f|sed '$(transform)'`"; \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
          echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
          rm -f $(DESTDIR)$(bindir)/$$f; \
        done
@@ -735,6 +734,10 @@ maintainer-check: automake aclocal
          echo 'Do not run "autoconf" in the above tests.  Use "$$AUTOCONF" instead.' 1>&2; \
          exit 1; \
        fi
+       @if grep -v '^#' $(srcdir)/tests/*.test | egrep ':[     ]*autoupdate'; then \
+         echo 'Do not run "autoupdate" in the above tests.  Use "$$AUTOUPDATE" instead.' 1>&2; \
+         exit 1; \
+       fi
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*automake'; then \
          echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" instead.' 1>&2;  \
          exit 1; \
index 8781e3525423b9a3fa39438c721f37e14518784f..30674e58b0206bf84528d8d8be2983f7f61aa6fd 100644 (file)
@@ -52,6 +52,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LIBS = @LIBS@
 LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
index 5e17ebbb0b5ebdb63dcfbbee88dd057cc2bae1e1..c23fd09745e8d654644172a43dca9bdaaa349056 100644 (file)
@@ -52,6 +52,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LIBS = @LIBS@
 LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
index 48cbafb436b2b6324d5e1d6af8f90eb5d9ef63c2..c16f247d1bd41c6919486e9c66ea74f08f0744c3 100644 (file)
@@ -52,6 +52,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LIBS = @LIBS@
 LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
index b923e7f1ca585574f26931f17b2c5f058e0cf0a4..66eecdf7f0aa8d5dc61aead6fe86c9aad36100a7 100644 (file)
@@ -43,8 +43,11 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
 ## Compute basename of source file.  Unless this is a nobase_ target, we
 ## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
 ## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
-?BASE?     p1=`echo "$$p1" | sed -e 's,^.*/,,'`; \
-           f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
+## However in all cases $(transform) applies only to the basename,
+## so we have to strip the directory part.
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+## Prepend the directory part if nobase_ is used.
+?!BASE?            f=`echo "$$p1" | sed 's|[^/]*$$||'`"$$f"; \
 ## Note that we explicitly set the libtool mode.  This avoids any
 ## lossage if the install program doesn't have a name that libtool
 ## expects.
@@ -66,8 +69,10 @@ if %?INSTALL%
 uninstall-%DIR%PROGRAMS:
        @$(NORMAL_UNINSTALL)
        @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-?BASE?   f=`echo "$$f" | sed -e 's,^.*/,,'`; \
+## Remove any leading directory before applying $(transform).
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+## Prepend the directory part if nobase_ is used.
+?!BASE?          f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
          echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
          rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
        done
index 9d4ea7ba058ff0a215722d2a9e76a946c29d5871..b99ba6860f1b469a54969a7e79f38dc330de9e79 100644 (file)
@@ -36,13 +36,15 @@ install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
 ## If the _SCRIPTS variable has an entry like foo/bar, install it as
 ## $(destdir)/bar, not $(destdir)/foo/bar.  The user can make a
 ## new dir variable or use a nobase_ target for the latter case.
-?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
-?!BASE?          f="$$p"; \
-         if test -f $$d$$p; then \
-           f="`echo $$f|sed '$(transform)'`"; \
+## However in all cases $(transform) applies only to the basename,
+## so we have to strip the directory part.
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+## Prepend the directory part if nobase_ is used.
+?!BASE?            f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
            echo " $(%DIR%SCRIPT_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
            $(%DIR%SCRIPT_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
          else :; fi; \
@@ -59,9 +61,10 @@ if %?INSTALL%
 uninstall-%DIR%SCRIPTS:
        @$(NORMAL_UNINSTALL)
        @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
-?BASE?   f="`echo $$p | sed -e 's|^.*/||'`"; \
-?!BASE?          f="$$p"; \
-         f="`echo $$f|sed '$(transform)'`"; \
+## Remove any leading directory before applying $(transform).
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+## Prepend the directory part if nobase_ is used.
+?!BASE?          f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
          echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
          rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
        done
index 898f9d6af61631fe7c93525f44887fb743d3ee74..97655b3e3cba7af75aa024af2030d85992edb2c4 100755 (executable)
@@ -47,22 +47,22 @@ test-install-data: install-data
        test   -f inst/foo/sub/nobase.dat
        test ! -f inst/foo/nobase.dat
        test   -f inst/foo/base.dat
-       test ! -f inst/foo/sub/nobase.sh
-       test ! -f inst/foo/base.sh
-       test ! -f inst/foo/sub/nobase$(EXEEXT)
-       test ! -f inst/foo/base$(EXEEXT)
+       test ! -f inst/foo/sub/pnobase.sh
+       test ! -f inst/foo/pbase.sh
+       test ! -f inst/foo/sub/pnobase$(EXEEXT)
+       test ! -f inst/foo/pbase$(EXEEXT)
        test ! -f inst/foo/sub/libnobase.a
        test ! -f inst/foo/libbase.a
        test ! -f inst/foo/sub/libnobase.la
        test ! -f inst/foo/libbase.la
 
 test-install-exec: install-exec
-       test   -f inst/foo/sub/nobase.sh
-       test ! -f inst/foo/nobase.sh
-       test   -f inst/foo/base.sh
-       test   -f inst/foo/sub/nobase$(EXEEXT)
-       test ! -f inst/foo/nobase$(EXEEXT)
-       test   -f inst/foo/base$(EXEEXT)
+       test   -f inst/foo/sub/pnobase.sh
+       test ! -f inst/foo/pnobase.sh
+       test   -f inst/foo/pbase.sh
+       test   -f inst/foo/sub/pnobase$(EXEEXT)
+       test ! -f inst/foo/pnobase$(EXEEXT)
+       test   -f inst/foo/pbase$(EXEEXT)
        test   -f inst/foo/sub/libnobase.a
        test ! -f inst/foo/libnobase.a
        test   -f inst/foo/libbase.a
@@ -93,7 +93,7 @@ libtoolize
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
-./configure --prefix `pwd`/inst
+./configure --prefix `pwd`/inst --program-prefix=p
 
 $MAKE
 $MAKE test-install-data