+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.
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBS = @LIBS@
LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
$(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; \
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
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; \
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBS = @LIBS@
LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBS = @LIBS@
LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBS = @LIBS@
LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
## 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.
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
@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; \
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
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
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
-./configure --prefix `pwd`/inst
+./configure --prefix `pwd`/inst --program-prefix=p
$MAKE
$MAKE test-install-data