From 99f62fca621f54a91cd29e71457804e679d0c1c1 Mon Sep 17 00:00:00 2001 From: Larry Doolittle Date: Fri, 5 Jun 2026 03:53:50 -0700 Subject: [PATCH] Adjust installredirect Makefile action to not write to ${srcdir} (#7715) --- Makefile.in | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index ffe23c5a4..9d92056ae 100644 --- a/Makefile.in +++ b/Makefile.in @@ -292,15 +292,14 @@ installbin: | mkbindirs done installredirect: installbin | mkbindirs - cp ${srcdir}/bin/redirect ${srcdir}/bin/redirect.tmp - perl -p -i -e 'use File::Spec;' \ - -e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(bindir))", "$(realpath $(DESTDIR)$(pkgdatadir)/bin)");' \ - -e 's/RELPATH.*/"$$path";/g' -- "${srcdir}/bin/redirect.tmp" - cd $(srcdir)/bin; \ + REDIR_SCRATCH=$$(mktemp redir_XXXXXX); \ + perl -p -e 'use File::Spec;' \ + -e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(bindir))", "$(realpath $(DESTDIR)$(pkgdatadir)/bin)");' \ + -e 's/RELPATH.*/"$$path";/g' -- "${srcdir}/bin/redirect" > $$REDIR_SCRATCH; \ for p in $(VL_INST_PUBLIC_SCRIPT_FILES) $(VL_INST_PUBLIC_BIN_FILES) ; do \ - $(INSTALL_PROGRAM) redirect.tmp $(DESTDIR)$(pkgdatadir)/bin/$$p; \ - done - rm ${srcdir}/bin/redirect.tmp + $(INSTALL_PROGRAM) $$REDIR_SCRATCH $(DESTDIR)$(pkgdatadir)/bin/$$p; \ + done; \ + rm $$REDIR_SCRATCH # Man files can either be part of the original kit, or built in current directory # So important we use $^ so VPATH is searched