]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Makefile: consistently use PERL_PATH
authorPatrick Steinhardt <ps@pks.im>
Fri, 6 Dec 2024 13:24:42 +0000 (14:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Dec 2024 22:52:09 +0000 (07:52 +0900)
When injecting the Perl path into our scripts we sometimes use '@PERL@'
while we othertimes use '@PERL_PATH@'. Refactor the code use the latter
consistently, which makes it easier to reuse the same logic for multiple
scripts.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
contrib/buildsystems/CMakeLists.txt
git-instaweb.sh
git-request-pull.sh

index 1255d222c2dec9a034dee2621192bf97afe905ee..0e289d1dbcbfa48e4566fb3e6d4eedd87ae2d141 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2554,7 +2554,7 @@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
     -e 's/@USE_GETTEXT_SCHEME@/$(USE_GETTEXT_SCHEME)/g' \
     -e $(BROKEN_PATH_FIX) \
     -e 's|@GITWEBDIR@|$(gitwebdir_SQ)|g' \
-    -e 's|@PERL@|$(PERL_PATH_SQ)|g' \
+    -e 's|@PERL_PATH@|$(PERL_PATH_SQ)|g' \
     -e 's|@PAGER_ENV@|$(PAGER_ENV_SQ)|g' \
     $@.sh >$@+
 endef
index 865b3af9fb2c1e7bdc1e7cecd0f021ee460971dd..ecaae8965cd43d4a5a36201b8760296b52147dc2 100644 (file)
@@ -846,7 +846,7 @@ foreach(script ${git_shell_scripts})
        string(REPLACE "@NO_CURL@" "" content "${content}")
        string(REPLACE "@USE_GETTEXT_SCHEME@" "" content "${content}")
        string(REPLACE "# @BROKEN_PATH_FIX@" "" content "${content}")
-       string(REPLACE "@PERL@" "${PERL_PATH}" content "${content}")
+       string(REPLACE "@PERL_PATH@" "${PERL_PATH}" content "${content}")
        string(REPLACE "@PAGER_ENV@" "LESS=FRX LV=-c" content "${content}")
        file(WRITE ${CMAKE_BINARY_DIR}/${script} ${content})
 endforeach()
index c8efb1205a8e2a66a6aced840980978897e122bc..5ad50160bb035885d8c180bee3ebb0a8e9622abc 100755 (executable)
@@ -3,7 +3,7 @@
 # Copyright (c) 2006 Eric Wong
 #
 
-PERL='@PERL@'
+PERL='@PERL_PATH@'
 OPTIONS_KEEPDASHDASH=
 OPTIONS_STUCKLONG=
 OPTIONS_SPEC="\
@@ -716,7 +716,7 @@ EOF
 
 gitweb_conf() {
        cat > "$fqgitdir/gitweb/gitweb_config.perl" <<EOF
-#!@PERL@
+#!@PERL_PATH@
 our \$projectroot = "$(dirname "$fqgitdir")";
 our \$git_temp = "$fqgitdir/gitweb/tmp";
 our \$projects_list = \$projectroot;
index 10c88639e28c02650ffea3d4671afa9a9f0bb182..775ba8ea11aa0fce90ae9bfaea8eac5b8bc584a4 100755 (executable)
@@ -112,7 +112,7 @@ find_matching_ref='
        }
 '
 
-set fnord $(git ls-remote "$url" | @PERL@ -e "$find_matching_ref" "${remote:-HEAD}" "$headrev")
+set fnord $(git ls-remote "$url" | @PERL_PATH@ -e "$find_matching_ref" "${remote:-HEAD}" "$headrev")
 remote_sha1=$2
 ref=$3