summaryrefslogtreecommitdiff
path: root/lib/am/scripts.am
diff options
context:
space:
mode:
authorAkim Demaille <akim@epita.fr>2001-03-06 14:44:44 +0000
committerAkim Demaille <akim@epita.fr>2001-03-06 14:44:44 +0000
commit93229961336e85097aeff324582089595f7ad287 (patch)
tree43c0d2c820b80adb9b7f36dc5a8dbb8e999ee43e /lib/am/scripts.am
parentdb434bde5680bc45a540d95dd3e340599081baf6 (diff)
downloadautomake-93229961336e85097aeff324582089595f7ad287.tar.gz
* header.am, scripts.am: Use ?INSTALL? in the install and
uninstall rules.
Diffstat (limited to 'lib/am/scripts.am')
-rw-r--r--lib/am/scripts.am65
1 files changed, 40 insertions, 25 deletions
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index a01018c46..f7234e492 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -16,33 +16,48 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-_am_installdirs += $(DESTDIR)$(%NDIR%dir)
-?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
-?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
-install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
+
+## ------------ ##
+## Installing. ##
+## ------------ ##
+
+?INSTALL?_am_installdirs += $(DESTDIR)$(%NDIR%dir)
+?INSTALL??EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
+?INSTALL??!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
+?INSTALL?install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
+?INSTALL? @$(NORMAL_INSTALL)
+?INSTALL? $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
- f="`echo $$p|sed '$(transform)'`"; \
- if test -f $$p; then \
- echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
- $(INSTALL_SCRIPT) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
- elif test -f $(srcdir)/$$p; then \
- echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
- $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
- else :; fi; \
- done
-
-.PHONY uninstall-am: uninstall-%DIR%SCRIPTS
-uninstall-%DIR%SCRIPTS:
- @$(NORMAL_UNINSTALL)
- @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
- f="`echo $$p|sed '$(transform)'`"; \
- echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
- rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
- done
+?INSTALL? @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
+?INSTALL? f="`echo $$p|sed '$(transform)'`"; \
+?INSTALL? if test -f $$p; then \
+?INSTALL? echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?INSTALL? $(INSTALL_SCRIPT) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+?INSTALL? elif test -f $(srcdir)/$$p; then \
+?INSTALL? echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?INSTALL? $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+?INSTALL? else :; fi; \
+?INSTALL? done
+
+
+## -------------- ##
+## Uninstalling. ##
+## -------------- ##
+
+?INSTALL?.PHONY uninstall-am: uninstall-%DIR%SCRIPTS
+?INSTALL?uninstall-%DIR%SCRIPTS:
+?INSTALL? @$(NORMAL_UNINSTALL)
+?INSTALL? @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
+?INSTALL? f="`echo $$p|sed '$(transform)'`"; \
+?INSTALL? echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?INSTALL? rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
+?INSTALL? done
+
+
+## ---------- ##
+## Checking. ##
+## ---------- ##
## Uncomment line in handle_scripts when this is uncommented.
## check-%DIR%SCRIPTS: