mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
Makefile: extract script to massage Perl scripts
Extract the script to inject various build-time parameters into our Perl scripts into a standalone script. This is done such that we can reuse it in other build systems. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
c2a3b847ed
commit
e4b488049a
12
Makefile
12
Makefile
@@ -2606,16 +2606,8 @@ endif
|
||||
|
||||
PERL_DEFINES += $(gitexecdir) $(perllibdir) $(localedir)
|
||||
|
||||
$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
|
||||
$(QUIET_GEN) \
|
||||
sed -e '1{' \
|
||||
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
|
||||
-e ' r GIT-PERL-HEADER' \
|
||||
-e ' G' \
|
||||
-e '}' \
|
||||
-e 's/@GIT_VERSION@/$(GIT_VERSION)/g' \
|
||||
$< >$@+ && \
|
||||
chmod +x $@+ && \
|
||||
$(SCRIPT_PERL_GEN): % : %.perl generate-perl.sh GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
|
||||
$(QUIET_GEN)$(SHELL_PATH) generate-perl.sh ./GIT-BUILD-OPTIONS ./GIT-VERSION-FILE GIT-PERL-HEADER "$<" "$@+" && \
|
||||
mv $@+ $@
|
||||
|
||||
PERL_DEFINES := $(subst $(space),:,$(PERL_DEFINES))
|
||||
|
||||
Reference in New Issue
Block a user