+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,
## ------------ ##
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%
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%