diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | header.am | 56 | ||||
-rw-r--r-- | lib/am/header.am | 56 | ||||
-rw-r--r-- | lib/am/scripts.am | 65 | ||||
-rw-r--r-- | scripts.am | 65 |
5 files changed, 151 insertions, 96 deletions
@@ -1,5 +1,10 @@ 2001-03-05 Pavel Roskin <proski@gnu.org> + * header.am, scripts.am: Use ?INSTALL? in the install and + uninstall rules. + +2001-03-05 Pavel Roskin <proski@gnu.org> + * tests/copy.test: Never use `rm' without `-f' - it may ask questions, notably for read-only files during `make distcheck'. * tests/insh.test: Likewise. @@ -16,29 +16,39 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -_am_installdirs += $(DESTDIR)$(%NDIR%dir) -?EXEC?.PHONY install-exec-am: install-%DIR%HEADERS -?!EXEC?.PHONY install-data-am: install-%DIR%HEADERS -install-%DIR%HEADERS: $(%DIR%_HEADERS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir) + +## ------------ ## +## Installing. ## +## ------------ ## + +?INSTALL?_am_installdirs += $(DESTDIR)$(%NDIR%dir) +?INSTALL??EXEC?.PHONY install-exec-am: install-%DIR%HEADERS +?INSTALL??!EXEC?.PHONY install-data-am: install-%DIR%HEADERS +?INSTALL?install-%DIR%HEADERS: $(%DIR%_HEADERS) +?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%_HEADERS)'; for p in $$list; do \ +?INSTALL? @list='$(%DIR%_HEADERS)'; for p in $$list; do \ ## A header file can be in the source directory or the build directory. - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \ -?!BASE? f="$$p"; \ - echo " $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \ - $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \ - done - -.PHONY uninstall-am: uninstall-%DIR%HEADERS -uninstall-%DIR%HEADERS: - @$(NORMAL_UNINSTALL) - @list='$(%DIR%_HEADERS)'; for p in $$list; do \ -?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \ -?!BASE? f="$$p"; \ - echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \ - rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \ - done +?INSTALL? if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +?INSTALL??BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \ +?INSTALL??!BASE? f="$$p"; \ +?INSTALL? echo " $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \ +?INSTALL? $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \ +?INSTALL? done + + +## -------------- ## +## Uninstalling. ## +## -------------- ## + +?INSTALL?.PHONY uninstall-am: uninstall-%DIR%HEADERS +?INSTALL?uninstall-%DIR%HEADERS: +?INSTALL? @$(NORMAL_UNINSTALL) +?INSTALL? @list='$(%DIR%_HEADERS)'; for p in $$list; do \ +?INSTALL??BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \ +?INSTALL??!BASE? f="$$p"; \ +?INSTALL? echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \ +?INSTALL? rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \ +?INSTALL? done diff --git a/lib/am/header.am b/lib/am/header.am index 41fd59938..76bd6a0e7 100644 --- a/lib/am/header.am +++ b/lib/am/header.am @@ -16,29 +16,39 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -_am_installdirs += $(DESTDIR)$(%NDIR%dir) -?EXEC?.PHONY install-exec-am: install-%DIR%HEADERS -?!EXEC?.PHONY install-data-am: install-%DIR%HEADERS -install-%DIR%HEADERS: $(%DIR%_HEADERS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir) + +## ------------ ## +## Installing. ## +## ------------ ## + +?INSTALL?_am_installdirs += $(DESTDIR)$(%NDIR%dir) +?INSTALL??EXEC?.PHONY install-exec-am: install-%DIR%HEADERS +?INSTALL??!EXEC?.PHONY install-data-am: install-%DIR%HEADERS +?INSTALL?install-%DIR%HEADERS: $(%DIR%_HEADERS) +?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%_HEADERS)'; for p in $$list; do \ +?INSTALL? @list='$(%DIR%_HEADERS)'; for p in $$list; do \ ## A header file can be in the source directory or the build directory. - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \ -?!BASE? f="$$p"; \ - echo " $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \ - $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \ - done - -.PHONY uninstall-am: uninstall-%DIR%HEADERS -uninstall-%DIR%HEADERS: - @$(NORMAL_UNINSTALL) - @list='$(%DIR%_HEADERS)'; for p in $$list; do \ -?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \ -?!BASE? f="$$p"; \ - echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \ - rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \ - done +?INSTALL? if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +?INSTALL??BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \ +?INSTALL??!BASE? f="$$p"; \ +?INSTALL? echo " $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \ +?INSTALL? $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \ +?INSTALL? done + + +## -------------- ## +## Uninstalling. ## +## -------------- ## + +?INSTALL?.PHONY uninstall-am: uninstall-%DIR%HEADERS +?INSTALL?uninstall-%DIR%HEADERS: +?INSTALL? @$(NORMAL_UNINSTALL) +?INSTALL? @list='$(%DIR%_HEADERS)'; for p in $$list; do \ +?INSTALL??BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \ +?INSTALL??!BASE? f="$$p"; \ +?INSTALL? echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \ +?INSTALL? rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \ +?INSTALL? done 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: diff --git a/scripts.am b/scripts.am index a01018c46..f7234e492 100644 --- a/scripts.am +++ b/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: |