diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-12-06 14:24:44 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-06 23:52:10 +0100 |
commit | ccfba9e0c45d85e980b3c83bf1e30bf4f1e25ccf (patch) | |
tree | 7ba5c0db75f0d457e37fe2c425dab638fa532503 /Makefile | |
parent | Makefile: extract script to massage Perl scripts (diff) | |
download | git-ccfba9e0c45d85e980b3c83bf1e30bf4f1e25ccf.tar.xz git-ccfba9e0c45d85e980b3c83bf1e30bf4f1e25ccf.zip |
Makefile: use "generate-perl.sh" to massage Perl library
Extend "generate-perl.sh" such that it knows to also massage the Perl
library files. There are two major differences:
- We do not read in the Perl header. This is handled by matching on
whether or not we have a Perl shebang.
- We substitute some more variables, which we read in via our
GIT-BUILD-OPTIONS.
Adapt both our Makefile and the CMake build instructions to use this.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -3095,13 +3095,9 @@ endif NO_PERL_CPAN_FALLBACKS_SQ = $(subst ','\'',$(NO_PERL_CPAN_FALLBACKS)) endif -perl/build/lib/%.pm: perl/%.pm GIT-PERL-DEFINES +perl/build/lib/%.pm: perl/%.pm generate-perl.sh GIT-BUILD-OPTIONS GIT-VERSION-FILE GIT-PERL-DEFINES $(call mkdir_p_parent_template) - $(QUIET_GEN) \ - sed -e 's|@LOCALEDIR@|$(perl_localedir_SQ)|g' \ - -e 's|@NO_GETTEXT@|$(NO_GETTEXT_SQ)|g' \ - -e 's|@NO_PERL_CPAN_FALLBACKS@|$(NO_PERL_CPAN_FALLBACKS_SQ)|g' \ - < $< > $@ + $(QUIET_GEN)$(SHELL_PATH) generate-perl.sh ./GIT-BUILD-OPTIONS ./GIT-VERSION-FILE GIT-PERL-HEADER "$<" "$@" perl/build/man/man3/Git.3pm: perl/Git.pm $(call mkdir_p_parent_template) @@ -3168,6 +3164,8 @@ GIT-BUILD-OPTIONS: FORCE -e "s|@SHELL_PATH@|\'$(SHELL_PATH_SQ)\'|" \ -e "s|@TEST_SHELL_PATH@|\'$(TEST_SHELL_PATH_SQ)\'|" \ -e "s|@PERL_PATH@|\'$(PERL_PATH_SQ)\'|" \ + -e "s|@PERL_LOCALEDIR@|\'$(perl_localedir_SQ)\'|" \ + -e "s|@NO_PERL_CPAN_FALLBACKS@|\'$(NO_PERL_CPAN_FALLBACKS_SQ)\'|" \ -e "s|@DIFF@|\'$(DIFF)\'|" \ -e "s|@PYTHON_PATH@|\'$(PYTHON_PATH_SQ)\'|" \ -e "s|@TAR@|\'$(TAR)\'|" \ |