For now, this is the last (proposed) patch of the series. It cleans up the per-rule *INSTALL variables, which are in most cases not needed any more because the rules now ensure that the respective directories exist.
These names have never been documented. However, some packages, notably coreutils[1], have come to use them in their rules. Dunno if we should keep them. Coreutils would be simple to fix, as would other packages, I'm rather a bit worried to introduce such an incompatibility at all for no other reason than saving a few lines of Makefile. Also, I don't know if anybody has come to rely on the flexibility of being able to override the install program on this special basis. I haven't pushed this yet. Comments appreciated. Thanks, Ralf [1] coreutils/src/Makefile.am: cu-install-binPROGRAMS and install_exec-am rules. Remove unneeded per-rule *INSTALL variables. * NEWS: Update. * lib/am/data.am (%DIR%%PRIMARY%_INSTALL): Remove. (install-%DIR%%PRIMARY%): Adjust. * lib/am/libs.am (%DIR%LIBRARIES_INSTALL): Remove. (install-%DIR%LIBRARIES): Adjust. * lib/am/progs.am (%DIR%PROGRAMS_INSTALL): Remove. (install-%DIR%PROGRAMS): Adjust. * lib/am/python.am (%DIR%PYTHON_INSTALL): Remove. (install-%DIR%PYTHON): Adjust. * lib/am/scripts.am (%DIR%SCRIPT_INSTALL): Remove. (install-%DIR%SCRIPTS): Adjust. diff --git a/NEWS b/NEWS index ad532bd..f63d839 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,13 @@ New in 1.10a: due to the use of associative arrays in awk. The increased use of awk matches a similar move in Autoconf to provide for better scaling. + Further, some undocumented per-rule install command variables such as + binSCRIPT_INSTALL have been removed because they are not needed any + more. Packages which use them should be using the appropriate one of + INSTALL_{DATA,PROGRAM,SCRIPT} or their install_sh_{DATA,PROGRAM,SCRIPT} + counterpart, depending on the type of files and the need for automatic + target directory creation. + - The "deleted header file problem" for *.m4 files is avoided by stub rules. This allows `make' to trigger a rerun of `aclocal' also if some previously needed macro file has been removed. diff --git a/lib/am/data.am b/lib/am/data.am index 63db01d..62383fa 100644 --- a/lib/am/data.am +++ b/lib/am/data.am @@ -25,7 +25,6 @@ endif %?INSTALL% if %?INSTALL% am__installdirs += "$(DESTDIR)$(%NDIR%dir)" -%DIR%%PRIMARY%_INSTALL = $(INSTALL_%ONE_PRIMARY%) .PHONY install-%EXEC?exec:data%-am: install-%DIR%%PRIMARY% install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%) @$(NORMAL_INSTALL) @@ -42,8 +41,8 @@ if %?BASE% echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ - echo " $(%DIR%%PRIMARY%_INSTALL) $$files '$(DESTDIR)$(%NDIR%dir)'"; \ - $(%DIR%%PRIMARY%_INSTALL) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \ + echo " $(INSTALL_%ONE_PRIMARY%) $$files '$(DESTDIR)$(%NDIR%dir)'"; \ + $(INSTALL_%ONE_PRIMARY%) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \ done else !%?BASE% @list='$(%DIR%_%PRIMARY%)'; $(am__nobase_list) | \ @@ -55,8 +54,8 @@ else !%?BASE% test "x$$dir" = x. || { \ echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \ - echo " $(%DIR%%PRIMARY%_INSTALL) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ - $(%DIR%%PRIMARY%_INSTALL) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \ + echo " $(INSTALL_%ONE_PRIMARY%) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ + $(INSTALL_%ONE_PRIMARY%) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \ done endif !%?BASE% endif %?INSTALL% diff --git a/lib/am/libs.am b/lib/am/libs.am index 0064009..ee0061e 100644 --- a/lib/am/libs.am +++ b/lib/am/libs.am @@ -25,7 +25,6 @@ endif %?INSTALL% if %?INSTALL% am__installdirs += "$(DESTDIR)$(%NDIR%dir)" -%DIR%LIBRARIES_INSTALL = $(INSTALL_DATA) .PHONY install-%EXEC?exec:data%-am: install-%DIR%LIBRARIES install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES) @$(NORMAL_INSTALL) @@ -39,8 +38,8 @@ if %?BASE% else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(%DIR%LIBRARIES_INSTALL) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \ - $(%DIR%LIBRARIES_INSTALL) $$list2 "$(DESTDIR)$(%NDIR%dir)" || exit $$?; } + echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \ + $(INSTALL_DATA) $$list2 "$(DESTDIR)$(%NDIR%dir)" || exit $$?; } else !%?BASE% ## Funny invocation because Makefile variable can be empty, leading to ## a syntax error in sh. @@ -52,8 +51,8 @@ else !%?BASE% test "x$$dir" = x. || { \ echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \ - echo " $(%DIR%%PRIMARY%_INSTALL) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ - $(%DIR%%PRIMARY%_INSTALL) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \ + echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ + $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \ done endif !%?BASE% ## We do two loops here so that $(POST_INSTALL) can be empty. If we diff --git a/lib/am/progs.am b/lib/am/progs.am index 2a7778c..b7570d7 100644 --- a/lib/am/progs.am +++ b/lib/am/progs.am @@ -21,7 +21,6 @@ if %?INSTALL% am__installdirs += "$(DESTDIR)$(%NDIR%dir)" -%DIR%PROGRAMS_INSTALL = $(INSTALL_PROGRAM) .PHONY install-%EXEC?exec:data%-am: install-%DIR%PROGRAMS install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS) @$(NORMAL_INSTALL) @@ -54,8 +53,8 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS) ?LIBTOOL??!BASE? echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ ?LIBTOOL??!BASE? $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; \ ?LIBTOOL??!BASE? else :; fi; \ -?LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(%DIR%PROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \ -?LIBTOOL? $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(%DIR%PROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \ +?LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \ +?LIBTOOL? $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \ ?LIBTOOL? done ## The following awk script turns that into one line containing directories ## and then lines of `target_name_or_directory sources...'. @@ -72,8 +71,8 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS) ?!LIBTOOL? while read dir files; do \ ?!LIBTOOL? if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ ?!LIBTOOL? test -z "$$files" || { \ -?!LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(%DIR%PROGRAMS_INSTALL) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \ -?!LIBTOOL? $(INSTALL_PROGRAM_ENV) $(%DIR%PROGRAMS_INSTALL) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \ +?!LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \ +?!LIBTOOL? $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \ ?!LIBTOOL? }; \ ?!LIBTOOL? done; } endif %?INSTALL% diff --git a/lib/am/python.am b/lib/am/python.am index 5d23486..7047452 100644 --- a/lib/am/python.am +++ b/lib/am/python.am @@ -25,7 +25,6 @@ endif %?INSTALL% if %?INSTALL% am__installdirs += "$(DESTDIR)$(%NDIR%dir)" -%DIR%PYTHON_INSTALL = $(INSTALL_DATA) .PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON install-%DIR%PYTHON: $(%DIR%_PYTHON) @$(NORMAL_INSTALL) @@ -46,8 +45,8 @@ if %?BASE% for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ ## Don't perform translation, since script name is important. - echo " $(%DIR%PYTHON_INSTALL) $$files '$(DESTDIR)$(%NDIR%dir)'"; \ - $(%DIR%PYTHON_INSTALL) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(%NDIR%dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \ done || exit $$?; \ ## Byte-compile must be done at install time, since file times are ## encoded in the actual files. @@ -71,8 +70,8 @@ else !%?BASE% echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \ ## Don't perform translation, since script name is important. - echo " $(%DIR%PYTHON_INSTALL) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ - $(%DIR%PYTHON_INSTALL) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \ + echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \ + $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \ ## Byte-compile must be done at install time, since file times are ## encoded in the actual files. if test -n "$$dlist"; then \ diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 6db83da..ca6d60c 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -26,7 +26,6 @@ endif %?INSTALL% if %?INSTALL% ## if doesn't work properly for Automake variables yet. am__installdirs += "$(DESTDIR)$(%NDIR%dir)" -%DIR%SCRIPT_INSTALL = $(INSTALL_SCRIPT) .PHONY install-%EXEC?exec:data%-am: install-%DIR%SCRIPTS install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS) @$(NORMAL_INSTALL) @@ -64,8 +63,8 @@ install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS) while read dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(%DIR%SCRIPT_INSTALL) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \ - $(%DIR%SCRIPT_INSTALL) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \ }; \ done; } endif %?INSTALL%