From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Phillip Wood" <phillip.wood123@gmail.com>,
"Jeff King" <peff@peff.net>, "Dan Jacques" <dnj@google.com>,
"Eric Wong" <e@80x24.org>, "Jonathan Nieder" <jrnieder@gmail.com>,
"Mike Hommey" <mh@glandium.org>,
"Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
"Victoria Dye" <vdye@github.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 02/11] Makefile: don't set up "perl/build" rules under NO_PERL=Y
Date: Fri, 17 Dec 2021 01:26:18 +0100 [thread overview]
Message-ID: <patch-02.11-37eeccc5646-20211217T002023Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-00.11-00000000000-20211217T002023Z-avarab@gmail.com>
Do not define LIB_{PERL,CPAN}{,_GEN} if NO_PERL is defined. This
changes no functionality, but makes it clear which of these rules are
needed under NO_PERL=Y. See 20d2a30f8ff (Makefile: replace
perl/Makefile.PL with simple make rules, 2017-12-10) for the initial
implementation.
We do for better or worse rely on "install-doc" calling
"install-man-perl" regardless of whether NO_PERL=Y is defined or not,
i.e. we'll always end up with that manual page, even if we don't have
any of the Perl code installed. Let's add a comment about that
adjacent to the rules that build perl/build.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index b21ffe25c2a..d4c31a2718f 100644
--- a/Makefile
+++ b/Makefile
@@ -2731,19 +2731,12 @@ endif
po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
$(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $<
+ifndef NO_PERL
LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
LIB_CPAN := $(wildcard perl/FromCPAN/*.pm perl/FromCPAN/*/*.pm)
LIB_CPAN_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_CPAN))
-ifndef NO_PERL
-all:: $(LIB_PERL_GEN)
-ifndef NO_PERL_CPAN_FALLBACKS
-all:: $(LIB_CPAN_GEN)
-endif
-NO_PERL_CPAN_FALLBACKS_SQ = $(subst ','\'',$(NO_PERL_CPAN_FALLBACKS))
-endif
-
perl/build/lib/%.pm: perl/%.pm GIT-PERL-DEFINES
$(QUIET_GEN)mkdir -p $(dir $@) && \
sed -e 's|@@LOCALEDIR@@|$(perl_localedir_SQ)|g' \
@@ -2751,6 +2744,14 @@ perl/build/lib/%.pm: perl/%.pm GIT-PERL-DEFINES
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|$(NO_PERL_CPAN_FALLBACKS_SQ)|g' \
< $< > $@
+all:: $(LIB_PERL_GEN)
+ifndef NO_PERL_CPAN_FALLBACKS
+all:: $(LIB_CPAN_GEN)
+endif
+NO_PERL_CPAN_FALLBACKS_SQ = $(subst ','\'',$(NO_PERL_CPAN_FALLBACKS))
+endif
+
+# install-man depends on Git.3pm even with NO_PERL=Y
perl/build/man/man3/Git.3pm: perl/Git.pm
$(QUIET_GEN)mkdir -p $(dir $@) && \
pod2man $< $@
--
2.34.1.1119.g7a3fc8778ee
next prev parent reply other threads:[~2021-12-17 0:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 0:26 [PATCH 00/11] Makefile: fix "Perl" and "Python" rules, speed up re-builds Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 01/11] Makefile: clean perl/build/ even with NO_PERL=Y Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` Ævar Arnfjörð Bjarmason [this message]
2021-12-17 0:26 ` [PATCH 03/11] Makefile: use "=" not ":=" for po/* and perl/* Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 04/11] Makefile: remove "mv $@ $@+" dance redundant to .DELETE_ON_ERROR Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 05/11] Makefile: guard Perl-only variable assignments Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 06/11] Makefile: change "ifndef NO_PERL" to "ifdef NO_PERL" Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 07/11] Makefile: adjust Perl-related comments & whitespace Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 08/11] Makefile: correct "GIT-PERL-{DEFINES,HEADER}" dependency graph Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 09/11] Makefile: sort PERL_DEFINES list Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 10/11] Makefile: create a GIT-PYTHON-DEFINES, like "PERL" Ævar Arnfjörð Bjarmason
2021-12-17 0:26 ` [PATCH 11/11] Makefile: stop needing @@GIT_VERSION@@ in *.perl scripts Ævar Arnfjörð Bjarmason
2022-02-21 20:14 ` [PATCH 00/11] Makefile: fix "Perl" and "Python" rules, speed up re-builds Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=patch-02.11-37eeccc5646-20211217T002023Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=congdanhqx@gmail.com \
--cc=dnj@google.com \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=mh@glandium.org \
--cc=peff@peff.net \
--cc=phillip.wood123@gmail.com \
--cc=vdye@github.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).