]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Do not apply --program-transform-name to build-aux scripts.
authorZack Weinberg <zackw@panix.com>
Thu, 5 Nov 2020 15:19:26 +0000 (10:19 -0500)
committerZack Weinberg <zackw@panix.com>
Thu, 5 Nov 2020 15:19:26 +0000 (10:19 -0500)
autoreconf expects to find $(pkgdatadir)/build-aux/config.sub etc
under those names, not names modified by --program-transform-name.
Placing them in $(pkgdatadir) is sufficient to keep parallel
installations of autoconf separate: anyone doing that would need
to adjust @PACKAGE@ anyway.

* lib/local.mk: Use a _DATA rule, not a _SCRIPTS rule, to install
  config.guess, config.sub, and install-sh.
  (install-data-hook-make-aux-scripts-executable): New hook rule.

lib/local.mk

index d4ecf3cb3da902db046c003b7bb26972e1fa6681..e380403ff70696c1a07f33869296ce01d0a997f8 100644 (file)
@@ -201,8 +201,27 @@ lib/autotest/autotest.m4f: $(autotest_m4f_dependencies)
 ## Install auxiliary scripts.  ##
 ## --------------------------- ##
 
-buildauxdir = $(pkgdatadir)/build-aux
-dist_buildaux_SCRIPTS = \
+# These are declared as _DATA so that they are not subject to
+# --program-transform-name; $(pkgdatadir) is sufficient to keep
+# multiple installations separate, and autoreconf looks for them by
+# their unadorned names.  However, autoreconf copies the executable
+# bit when it copies these files into a source tree, and _DATA items
+# are installed as not-executable, so we have to make them executable
+# in a hook rule.
+
+AUXSCRIPTS = \
   build-aux/config.guess \
   build-aux/config.sub \
   build-aux/install-sh
+
+buildauxdir = $(pkgdatadir)/build-aux
+dist_buildaux_DATA = \
+  $(AUXSCRIPTS)
+
+install-data-hook: install-data-hook-make-aux-scripts-executable
+install-data-hook-make-aux-scripts-executable:
+       for s in $(AUXSCRIPTS); do \
+         chmod +x "$(DESTDIR)$(pkgdatadir)/$$s"; \
+       done
+
+.PHONY: install-data-hook install-data-hook-make-aux-scripts-executable