]> sourceware.org Git - automake.git/commitdiff
* lib/am/python.am (install-%DIR%PYTHON, uninstall-%DIR%PYTHON):
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 25 Oct 2001 12:56:15 +0000 (12:56 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 25 Oct 2001 12:56:15 +0000 (12:56 +0000)
Have the basename step optional and use %NDIR% instead of %DIR% in
filenames in order to support 'nobase_'.

ChangeLog
lib/am/python.am

index b4448de3823514ca3bc9625595faaaccefa88d2a..a8b964945d90f00ffb9e48da37c6a3a719e6312a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-25  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * lib/am/python.am (install-%DIR%PYTHON, uninstall-%DIR%PYTHON):
+       Have the basename step optional and use %NDIR% instead of %DIR% in
+       filenames in order to support 'nobase_'.
+
 2001-10-24  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * automake.in (handle_languages, handle_single_transform_list,
index 558e701928fe4e3480794deb854ef9ade211a1ab..c0fd5dc0f2b5bc62149f049de0c69c99e2b67cfe 100644 (file)
 ## ------------ ##
 
 if %?INSTALL%
-_am_installdirs += $(DESTDIR)$(%DIR%dir)
+_am_installdirs += $(DESTDIR)$(%NDIR%dir)
 ?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
 ?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
 install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%DIR%dir)
+       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
        @list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
          if test -f $(srcdir)/$$p; then \
-## Compute basename of source file.  We want to install 'python/foo.py'
-## as '$(DESTDIR)$(%DIR%dir)/foo.yo', not '$(DESTDIR)$(%DIR%dir)/python/foo.yo'
-           d=`echo "$$p" | sed -e 's,^.*/,,'`; \
+## 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?     d=`echo "$$p" | sed -e 's,^.*/,,'`; \
+?!BASE?            d="$$p"; \
            dlist="$$dlist $$d"; \
 ## Don't perform translation, since script name is important.
-           echo " $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)$(%DIR%dir)/$$d"; \
-           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(%DIR%dir)/$$d; \
+           echo " $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)$(%NDIR%dir)/$$d"; \
+           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(%NDIR%dir)/$$d; \
          else :; fi; \
        done; \
 ## Byte-compile must be done at install time, since file times are
 ## encoded in the actual files.
-       PYTHON=$(PYTHON) $(py_compile) --basedir $(DESTDIR)$(%DIR%dir) $$dlist
+       PYTHON=$(PYTHON) $(py_compile) --basedir $(DESTDIR)$(%NDIR%dir) $$dlist
 endif %?INSTALL%
 
 
@@ -54,12 +56,13 @@ if %?INSTALL%
 uninstall-%DIR%PYTHON:
        @$(NORMAL_UNINSTALL)
        list='$(%DIR%_PYTHON)'; for p in $$list; do \
-         d=`echo "$$p" | sed -e 's,^.*/,,'`; \
-         rm -f $(DESTDIR)$(%DIR%dir)/$$d; \
+?BASE?   d=`echo "$$p" | sed -e 's,^.*/,,'`; \
+?!BASE?          d="$$p"; \
+         rm -f $(DESTDIR)$(%NDIR%dir)/$$d; \
 ## This is to remove the .pyc and .pyo byte compiled versions (a bit
 ## of a hack).
-         rm -f $(DESTDIR)$(%DIR%dir)/$${d}c; \
-         rm -f $(DESTDIR)$(%DIR%dir)/$${d}o; \
+         rm -f $(DESTDIR)$(%NDIR%dir)/$${d}c; \
+         rm -f $(DESTDIR)$(%NDIR%dir)/$${d}o; \
        done
 endif %?INSTALL%
 
This page took 0.040534 seconds and 5 git commands to generate.