This topic is split-up from v4 of ab/make-dependency[1]. Range-diff to
it below. As noted in [2] I opted to split up that series rather than
having it grow too large.
This is miscellanious cleanups related to the "Perl" rules, and some
fixes for bad dependency rules in 08/11. Then in 10/11 we make the
"Python" rules use the new template we created for "Perl",
We are then able to speed up "make" re-builds a bit in 11/11, as we
don't need to inject @@GIT_VERSION@@ into the Perl scripts anymore.
The 09/11 is new. It's a trivial sorting of the PERL_DEFINES list,
which'll help to maintain it in the future.
1. https://lore.kernel.org/git/cover-v4-00.23-00000000000-20211117T101807Z-avarab@gmail.com/
2. https://lore.kernel.org/git/211217.86a6h09km9.gmgdl@evledraar.gmail.com/
Ævar Arnfjörð Bjarmason (11):
Makefile: clean perl/build/ even with NO_PERL=Y
Makefile: don't set up "perl/build" rules under NO_PERL=Y
Makefile: use "=" not ":=" for po/* and perl/*
Makefile: remove "mv $@ $@+" dance redundant to .DELETE_ON_ERROR
Makefile: guard Perl-only variable assignments
Makefile: change "ifndef NO_PERL" to "ifdef NO_PERL"
Makefile: adjust Perl-related comments & whitespace
Makefile: correct "GIT-PERL-{DEFINES,HEADER}" dependency graph
Makefile: sort PERL_DEFINES list
Makefile: create a GIT-PYTHON-DEFINES, like "PERL"
Makefile: stop needing @@GIT_VERSION@@ in *.perl scripts
.gitignore | 2 +-
Makefile | 160 +++++++++++++++++++++++---------------------
git-cvsserver.perl | 6 +-
git-send-email.perl | 7 +-
git-svn.perl | 2 +-
5 files changed, 90 insertions(+), 87 deletions(-)
Range-diff:
1: 1621ca72c1d < -: ----------- Makefile: don't invoke msgfmt with --statistics
4: daead5ec293 = 1: 185f5a9a9cf Makefile: clean perl/build/ even with NO_PERL=Y
2: b7c36c9fea0 = 2: 37eeccc5646 Makefile: don't set up "perl/build" rules under NO_PERL=Y
3: 29b000eb0f1 = 3: 572a82c71a1 Makefile: use "=" not ":=" for po/* and perl/*
5: 3c987590740 = 4: 5baff22f5af Makefile: remove "mv $@ $@+" dance redundant to .DELETE_ON_ERROR
6: b57f582ccd3 = 5: 992e325491d Makefile: guard Perl-only variable assignments
7: fcdee92f64c = 6: 5e94ef729fe Makefile: change "ifndef NO_PERL" to "ifdef NO_PERL"
8: 1e25b532ca2 = 7: 4eeef8571aa Makefile: adjust Perl-related comments & whitespace
9: 77d9855bfcf = 8: 8aa35537b08 Makefile: correct "GIT-PERL-{DEFINES,HEADER}" dependency graph
-: ----------- > 9: 5ff768a5cec Makefile: sort PERL_DEFINES list
10: 6004cdcd8d9 = 10: fe79797f45e Makefile: create a GIT-PYTHON-DEFINES, like "PERL"
11: 17b30e96057 = 11: defbd9b6db2 Makefile: stop needing @@GIT_VERSION@@ in *.perl scripts
12: 30ddf7da2c8 < -: ----------- Makefiles: add "shared.mak", move ".DELETE_ON_ERROR" to it
13: f378a7dc35e < -: ----------- Makefile: move $(comma), $(empty) and $(space) to shared.mak
14: 13cbb851d32 < -: ----------- Makefile: re-add and use the "shellquote" macros
15: 337953e4994 < -: ----------- Makefile: add a "TRACK_template" for GIT-*{FLAGS,DEFINES,...}
16: 5bb597c1993 < -: ----------- Makefile: add "$(QUIET)" boilerplate to shared.mak
17: 3c4d0589667 < -: ----------- Makefile: use $(wspfx) for $(QUIET...) in shared.mak
18: be5882b2c99 < -: ----------- Makefiles: add and use wildcard "mkdir -p" template
19: 2710f8af6cd < -: ----------- Makefile: correct the dependency graph of hook-list.h
20: 59f22a0269a < -: ----------- Makefile: use $(file) I/O instead of "FORCE" when possible
21: dd569a59c74 < -: ----------- Makefile: disable GNU make built-in wildcard rules
22: 4168a7e3b30 < -: ----------- Makefile: define $(LIB_H) in terms of $(FIND_SOURCE_FILES)
23: 48a3927d972 < -: ----------- Makefile: move ".SUFFIXES" rule to shared.mak
--
2.34.1.1119.g7a3fc8778ee
Fix a regression in 499c29394ce (Makefile: allow building without
perl, 2009-04-03) where we'd stop cleaning the perl/* directory
because NO_PERL was defined, thus leaving behind litter if the flag at
"clean" time didn't match that of build time.
In 499c29394ce this was done to avoid relying on the perl/Makefile.PL,
but since my 20d2a30f8ff (Makefile: replace perl/Makefile.PL with
simple make rules, 2017-12-10) we can clean things in that directory
unconditionally.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 <redacted>
---
Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
@@ -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=Yperl/build/man/man3/Git.3pm:perl/Git.pm$(QUIET_GEN)mkdir-p$(dir$@)&&\pod2man$<$@
Change these variable definitions from being simply-expanded to be
recursively expanded instead. I.e. they'll be lazily expanded when
used.
I added these in 5e9637c6297 (i18n: add infrastructure for translating
Git with gettext, 2011-11-18) and 20d2a30f8ff (Makefile: replace
perl/Makefile.PL with simple make rules, 2017-12-10), the reason for
using ":=" over "=" was that I didn't know the difference in 2011 (I
think I copied some POC code), and in 2017 I used the 2011 commit for
reference.
This doesn't make much if any of a practical difference, doing this is
cheap either way, but as simply-expanded variables in our Makefile
generally indicate special behavior (e.g. making a copy now, and
modifying the RHS later) let's change these to show that nothing odd
is going on here).
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
Makefile | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
Since 7b76d6bf221 (Makefile: add and use the ".DELETE_ON_ERROR" flag,
2021-06-29) we don't need to guard the clobbering of $@ with this sort
of "mv $@+ $@" pattern in these cases where we're merely generating a
file that'll be used as a dependency for other files, as in this case
for GIT-PERL-HEADER.
We have had a hard dependency on .DELETE_ON_ERROR since
7b76d6bf221 (Makefile: add and use the ".DELETE_ON_ERROR" flag,
2021-06-29), so this is a pure cleanup as a follow-up to that
commit. Support for the ".DELETE_ON_ERROR" target itself is much older
than any GNU make version we support, it was added to GNU make in
1994.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Move the "ifndef NO_PERL" a few lines earlier to encompass the
"perl_localedir_SQ" variable. We'll only use it under !NO_PERL.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -2301,11 +2301,11 @@ git.res: git.rc GIT-VERSION-FILE GIT-PREFIX# This makes sure we depend on the NO_PERL setting itself.$(SCRIPT_PERL_GEN):GIT-BUILD-OPTIONS+ifndef NO_PERL# Used for substitution in Perl modules. Disabled when using RUNTIME_PREFIX# since the locale directory is injected.perl_localedir_SQ=$(localedir_SQ)-ifndef NO_PERLPERL_HEADER_TEMPLATE=perl/header_templates/fixed_prefix.template.plPERL_DEFINES=PERL_DEFINES+=$(PERL_PATH_SQ)
@@ -2301,7 +2301,15 @@ git.res: git.rc GIT-VERSION-FILE GIT-PREFIX# This makes sure we depend on the NO_PERL setting itself.$(SCRIPT_PERL_GEN):GIT-BUILD-OPTIONS-ifndef NO_PERL+ifdef NO_PERL+$(SCRIPT_PERL_GEN) git-instaweb:% : unimplemented.sh+$(QUIET_GEN)\+sed-e'1s|#!.*/sh|#!$(SHELL_PATH_SQ)|'\+-e's|@@REASON@@|NO_PERL=$(NO_PERL)|g'\+unimplemented.sh>$@+&&\+chmod+x$@+&&\+mv$@+$@+else # NO_PERL# Used for substitution in Perl modules. Disabled when using RUNTIME_PREFIX# since the locale directory is injected.perl_localedir_SQ=$(localedir_SQ)
@@ -2373,14 +2381,6 @@ git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES$(QUIET_GEN)$(cmd_munge_script)&&\chmod+x$@+&&\mv$@+$@-else # NO_PERL-$(SCRIPT_PERL_GEN) git-instaweb:% : unimplemented.sh-$(QUIET_GEN)\-sed-e'1s|#!.*/sh|#!$(SHELL_PATH_SQ)|'\--e's|@@REASON@@|NO_PERL=$(NO_PERL)|g'\-unimplemented.sh>$@+&&\-chmod+x$@+&&\-mv$@+$@endif # NO_PERL# This makes sure we depend on the NO_PYTHON setting itself.
Folllow-up my 4070c9e09fc (Makefile: don't re-define PERL_DEFINES,
2021-05-05) and move the rest of the assignments to PERL_DEFINES to
one place.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
Makefile | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
@@ -2322,21 +2322,19 @@ PERL_DEFINES += $(perllibdir_SQ)PERL_DEFINES+=$(RUNTIME_PREFIX)PERL_DEFINES+=$(NO_PERL_CPAN_FALLBACKS)PERL_DEFINES+=$(NO_GETTEXT)+PERL_DEFINES+=$(gitexecdir)+PERL_DEFINES+=$(perllibdir)+PERL_DEFINES+=$(localedir)+PERL_DEFINES:=$(subst$(space),:,$(PERL_DEFINES))-# Support Perl runtime prefix. In this mode, a different header is installed-# into Perl scripts.ifdef RUNTIME_PREFIX-PERL_HEADER_TEMPLATE=perl/header_templates/runtime_prefix.template.pl-# Don't export a fixed $(localedir) path; it will be resolved by the Perl header-# at runtime.+# The RUNTIME_PREFIX header defines $Git::I18N::TEXTDOMAINDIR, so+# $(perl_localedir_SQ) won't be neededperl_localedir_SQ=-endif-PERL_DEFINES+=$(gitexecdir)$(perllibdir)$(localedir)-$(SCRIPT_PERL_GEN):% : %.perlGIT-PERL-DEFINESGIT-PERL-HEADERGIT-VERSION-FILE$(QUIET_GEN)\sed-e'1{'\
@@ -2349,7 +2347,6 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILEchmod+x$@+&&\mv$@+$@-PERL_DEFINES:=$(subst$(space),:,$(PERL_DEFINES))GIT-PERL-DEFINES:FORCE@FLAGS='$(PERL_DEFINES)';\ if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \
Fix several small issues with the dependency graph of the generated
"GIT-PERL-DEFINES" and "GIT-PERL-HEADER" files:
1. Don't have "GIT-PERL-HEADER" depend on the "Makefile". That was a
lazy way to over-declare the dependencies added in
f6a0ad4be71 (Makefile: generate Perl header from template file,
2018-04-10). Let's correct our dependency graph instead.
2. Don't have $(SCRIPT_PERL_GEN) (such as "git-send-email") depend on
GIT-BUILD-OPTIONS. Let's instead use GIT-PERL-DEFINES.
The reason for depending on "GIT-BUILD-OPTIONS" was to trigger a
re-build if NO_PERL=Y was defined. We can instead add that variable
to "PERL_DEFINES", and have "GIT-PERL-DEFINES" created and updated
if "NO_PERL=Y" is defined.
3. Due to #2 we'll need to have GIT-PERL-DEFINES be generated even
under NO_PERL, since that variable will be used by the
"unimplemented.sh" script.
4. Don't depend on $(gitexecdir), $(perllibdir) and $(localedir),
instead depend on the $(*_relative_SQ) versions of those.
The latter is what we'll actually use, while it's unlikely to
matter in practice (we'd just skip re-building these under
RUNTIME_PREFIX if the relative path was the same) it makes the code
easier to read.
That's because this brings us to a 1=1 mapping of these variables
and what's subsequently used in the "GIT-PERL-DEFINES",
"GIT-PERL-HEADER" and "perl/build/lib/%.pm" rules below.
5. We don't need the substitution of " " for ":" added in
07d90eadb50 (Makefile: add Perl runtime prefix support,
2018-04-10), let's drop it. This doesn't matter for the correctness
of these files, because unlike GIT-BUILD-OPTIONS nothing is
consuming them except the Makefile itself.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
Makefile | 42 +++++++++++++++++++++++++-----------------
1 file changed, 25 insertions(+), 17 deletions(-)
@@ -2298,10 +2298,14 @@ git.res: git.rc GIT-VERSION-FILE GIT-PREFIX$(shellecho$(GIT_VERSION)0000|tr'.a-zA-Z-'' ')))\-DGIT_VERSION="\\\"$(GIT_VERSION)\\\""-i$<-o$@-# This makes sure we depend on the NO_PERL setting itself.-$(SCRIPT_PERL_GEN):GIT-BUILD-OPTIONS+# Under NO_PERL=Y we'll still make GIT-PERL-DEFINES. We need to depend+# on NO_PERL=Y itself for creating "unimplemented.sh" scripts.+PERL_DEFINES=+$(SCRIPT_PERL_GEN):GIT-PERL-DEFINESifdef NO_PERL+PERL_DEFINES+=$(NO_PERL)+$(SCRIPT_PERL_GEN) git-instaweb:% : unimplemented.sh$(QUIET_GEN)\sed-e'1s|#!.*/sh|#!$(SHELL_PATH_SQ)|'\
@@ -2310,22 +2314,26 @@ $(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.shchmod+x$@+&&\mv$@+$@else # NO_PERL-# Used for substitution in Perl modules. Disabled when using RUNTIME_PREFIX-# since the locale directory is injected.+# The localedir is only used in Perl modules if !NO_GETTEXT+ifndef NO_GETTEXTperl_localedir_SQ=$(localedir_SQ)+endifPERL_HEADER_TEMPLATE=perl/header_templates/fixed_prefix.template.pl-PERL_DEFINES=+PERL_DEFINES+=$(PERL_PATH_SQ)PERL_DEFINES+=$(PERLLIB_EXTRA_SQ)PERL_DEFINES+=$(perllibdir_SQ)PERL_DEFINES+=$(RUNTIME_PREFIX)PERL_DEFINES+=$(NO_PERL_CPAN_FALLBACKS)PERL_DEFINES+=$(NO_GETTEXT)-PERL_DEFINES+=$(gitexecdir)-PERL_DEFINES+=$(perllibdir)-PERL_DEFINES+=$(localedir)-PERL_DEFINES:=$(subst$(space),:,$(PERL_DEFINES))+ifdef RUNTIME_PREFIX+PERL_DEFINES+=$(gitexecdir_relative_SQ)+PERL_DEFINES+=$(perllibdir_relative_SQ)+PERL_DEFINES+=$(localedir_relative_SQ)+else+PERL_DEFINES+=$(perllocaledir_SQ)+endififdef RUNTIME_PREFIXPERL_HEADER_TEMPLATE=perl/header_templates/runtime_prefix.template.pl
@@ -2347,14 +2355,7 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILEchmod+x$@+&&\mv$@+$@-GIT-PERL-DEFINES:FORCE-@FLAGS='$(PERL_DEFINES)';\- if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \-echo>&2" * new perl-specific parameters";\-echo"$$FLAGS">$@;\-fi--GIT-PERL-HEADER:$(PERL_HEADER_TEMPLATE)GIT-PERL-DEFINESMakefile+GIT-PERL-HEADER:$(PERL_HEADER_TEMPLATE)GIT-PERL-DEFINES$(QUIET_GEN)\INSTLIBDIR='$(perllibdir_SQ)'&&\INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)'&&\
@@ -2380,6 +2381,13 @@ git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINESmv$@+$@endif # NO_PERL+GIT-PERL-DEFINES:FORCE+@FLAGS='$(PERL_DEFINES)';\+ if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \+echo>&2" * new perl-specific parameters";\+echo"$$FLAGS">$@;\+fi+# This makes sure we depend on the NO_PYTHON setting itself.$(SCRIPT_PYTHON_GEN):GIT-BUILD-OPTIONS
Sort the PERL_DEFINES list, this will make it easier to maintain it in
the future.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Create a new "GIT-PYTHON-DEFINES" file, and untangle the dependency
issues of the Python by copying over the patterns established for
building the adjacent Perl code in preceding commits.
As with Perl, there's no real reason to depend on GIT-BUILD-OPTIONS or
GIT-CFLAGS when building the Python code, nor did we need
GIT-PREFIX. Let's instead add those variables we care about to a
"GIT-PYTHON-DEFINES" and depend on that.
This changes code originally added in ca3bcabf118 (auto-detect changed
prefix and/or changed build flags, 2006-06-15), and adjusted in
96a4647fca5 (Makefile: detect when PYTHON_PATH changes, 2012-12-18).
The relevant code for the "Perl" targets was then added in
07981dce81e (Makefile: rebuild perl scripts when perl paths change,
2013-11-18), and has been adjusted in preceding commits.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
.gitignore | 2 +-
Makefile | 49 +++++++++++++++++++++++++------------------------
2 files changed, 26 insertions(+), 25 deletions(-)
@@ -2388,18 +2388,15 @@ GIT-PERL-DEFINES: FORCEecho"$$FLAGS">$@;\fi-# This makes sure we depend on the NO_PYTHON setting itself.-$(SCRIPT_PYTHON_GEN):GIT-BUILD-OPTIONS+# As with NO_PERL=Y we'll still make GIT-PYTHON-DEFINES if "NO_PYTHON"+# is defined, for creating the "unimplemented.sh" scripts.+PYTHON_DEFINES=+$(SCRIPT_PYTHON_GEN):GIT-PYTHON-DEFINES++ifdef NO_PYTHON+PYTHON_DEFINES+=$(SHELL_PATH_SQ)+PYTHON_DEFINES+=$(NO_PYTHON)-ifndef NO_PYTHON-$(SCRIPT_PYTHON_GEN):GIT-CFLAGSGIT-PREFIXGIT-PYTHON-VARS-$(SCRIPT_PYTHON_GEN):% : %.py-$(QUIET_GEN)\-sed-e'1s|#!.*python|#!$(PYTHON_PATH_SQ)|'\-$<>$@+&&\-chmod+x$@+&&\-mv$@+$@-else # NO_PYTHON$(SCRIPT_PYTHON_GEN):% : unimplemented.sh$(QUIET_GEN)\sed-e'1s|#!.*/sh|#!$(SHELL_PATH_SQ)|'\
@@ -2407,8 +2404,24 @@ $(SCRIPT_PYTHON_GEN): % : unimplemented.shunimplemented.sh>$@+&&\chmod+x$@+&&\mv$@+$@+else # NO_PYTHON+PYTHON_DEFINES+=$(PYTHON_PATH_SQ)++$(SCRIPT_PYTHON_GEN):% : %.pyGIT-PYTHON-DEFINES+$(QUIET_GEN)\+sed-e'1s|#!.*python|#!$(PYTHON_PATH_SQ)|'\+$<>$@+&&\+chmod+x$@+&&\+mv$@+$@endif # NO_PYTHON+GIT-PYTHON-DEFINES:FORCE+@FLAGS='$(PYTHON_DEFINES)';\+ if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \+echo>&2" * new python-specific parameters";\+echo"$$FLAGS">$@;\+fi+CONFIGURE_RECIPE=sed-e's/@@GIT_VERSION@@/$(GIT_VERSION)/g'\configure.ac>configure.ac+&&\autoconf-oconfigureconfigure.ac+&&\
@@ -2895,18 +2908,6 @@ elseendif@ifcmp$@+$@>/dev/null2>&1;then$(RM)$@+;elsemv$@+$@;fi-### Detect Python interpreter path changes-ifndef NO_PYTHON-TRACK_PYTHON=$(subst','\'',-DPYTHON_PATH='$(PYTHON_PATH_SQ)')--GIT-PYTHON-VARS:FORCE-@VARS='$(TRACK_PYTHON)';\- if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \-echo>&2" * new Python interpreter location";\-echo"$$VARS">$@;\-fi-endif-test_bindir_programs:=$(patsubst%,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X)$(BINDIR_PROGRAMS_NO_X)$(TEST_PROGRAMS_NEED_X))all::$(TEST_PROGRAMS)$(test_bindir_programs)
Change the hardcoding of @@GIT_VERSION@@ in generated *.perl scripts
to instead shell out to "git version". This means that we can stop
re-building during development every time the HEAD changes.
These codepaths are not "hot", so shelling out to get the version
shouldn't matter to users, in the one case where it potentially would
in send-email (the loop for each E-Mail we send) we now cache the
value, so we'll only retrieve it once.
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
Makefile | 2 +-
git-cvsserver.perl | 6 +++---
git-send-email.perl | 7 ++-----
git-svn.perl | 2 +-
4 files changed, 7 insertions(+), 10 deletions(-)
@@ -1504,6 +1504,7 @@ sub file_name_is_absolute {## If an error occurs sending the email, this just dies.+my$gitversion;subsend_message{my@recipients=unique_email_list(@to);@cc=(grep{my$cc=extract_valid_address_or_die($_);
@@ -1514,11 +1515,6 @@ sub send_message {@recipients=unique_email_list(@recipients,@cc,@initial_bcc);@recipients=(map{extract_valid_address_or_die($_)}@recipients);my$date=format_2822_time($time++);-my$gitversion='@@GIT_VERSION@@';-if($gitversion=~m/..GIT_VERSION../){-$gitversion=Git::version();-}-my$cc=join(",\n\t",unique_email_list(@cc));my$ccline="";if($ccne''){
@@ -1533,6 +1529,7 @@ sub send_message {Message-Id:$message_id";if($use_xmailer){+$gitversion||=Git::version();$header.="X-Mailer: git-send-email $gitversion\n";}if($in_reply_to){
On Fri, Dec 17 2021, Ævar Arnfjörð Bjarmason wrote:
A gentle reminder about considering picking up this topic that got lost
around the holidays.
This thread doesn't have any reviews, but as the linked-to range-diff
shows it's all had reviews already as part of the larger topic I split
it up from (except for the trivial addition noted below).
This topic is split-up from v4 of ab/make-dependency[1]. Range-diff to
it below. As noted in [2] I opted to split up that series rather than
having it grow too large.
This is miscellanious cleanups related to the "Perl" rules, and some
fixes for bad dependency rules in 08/11. Then in 10/11 we make the
"Python" rules use the new template we created for "Perl",
We are then able to speed up "make" re-builds a bit in 11/11, as we
don't need to inject @@GIT_VERSION@@ into the Perl scripts anymore.
The 09/11 is new. It's a trivial sorting of the PERL_DEFINES list,
which'll help to maintain it in the future.
1. https://lore.kernel.org/git/cover-v4-00.23-00000000000-20211117T101807Z-avarab@gmail.com/
2. https://lore.kernel.org/git/211217.86a6h09km9.gmgdl@evledraar.gmail.com/
Ævar Arnfjörð Bjarmason (11):
Makefile: clean perl/build/ even with NO_PERL=Y
Makefile: don't set up "perl/build" rules under NO_PERL=Y
Makefile: use "=" not ":=" for po/* and perl/*
Makefile: remove "mv $@ $@+" dance redundant to .DELETE_ON_ERROR
Makefile: guard Perl-only variable assignments
Makefile: change "ifndef NO_PERL" to "ifdef NO_PERL"
Makefile: adjust Perl-related comments & whitespace
Makefile: correct "GIT-PERL-{DEFINES,HEADER}" dependency graph
Makefile: sort PERL_DEFINES list
Makefile: create a GIT-PYTHON-DEFINES, like "PERL"
Makefile: stop needing @@GIT_VERSION@@ in *.perl scripts
.gitignore | 2 +-
Makefile | 160 +++++++++++++++++++++++---------------------
git-cvsserver.perl | 6 +-
git-send-email.perl | 7 +-
git-svn.perl | 2 +-
5 files changed, 90 insertions(+), 87 deletions(-)
Range-diff:
1: 1621ca72c1d < -: ----------- Makefile: don't invoke msgfmt with --statistics
4: daead5ec293 = 1: 185f5a9a9cf Makefile: clean perl/build/ even with NO_PERL=Y
2: b7c36c9fea0 = 2: 37eeccc5646 Makefile: don't set up "perl/build" rules under NO_PERL=Y
3: 29b000eb0f1 = 3: 572a82c71a1 Makefile: use "=" not ":=" for po/* and perl/*
5: 3c987590740 = 4: 5baff22f5af Makefile: remove "mv $@ $@+" dance redundant to .DELETE_ON_ERROR
6: b57f582ccd3 = 5: 992e325491d Makefile: guard Perl-only variable assignments
7: fcdee92f64c = 6: 5e94ef729fe Makefile: change "ifndef NO_PERL" to "ifdef NO_PERL"
8: 1e25b532ca2 = 7: 4eeef8571aa Makefile: adjust Perl-related comments & whitespace
9: 77d9855bfcf = 8: 8aa35537b08 Makefile: correct "GIT-PERL-{DEFINES,HEADER}" dependency graph
-: ----------- > 9: 5ff768a5cec Makefile: sort PERL_DEFINES list
10: 6004cdcd8d9 = 10: fe79797f45e Makefile: create a GIT-PYTHON-DEFINES, like "PERL"
11: 17b30e96057 = 11: defbd9b6db2 Makefile: stop needing @@GIT_VERSION@@ in *.perl scripts
12: 30ddf7da2c8 < -: ----------- Makefiles: add "shared.mak", move ".DELETE_ON_ERROR" to it
13: f378a7dc35e < -: ----------- Makefile: move $(comma), $(empty) and $(space) to shared.mak
14: 13cbb851d32 < -: ----------- Makefile: re-add and use the "shellquote" macros
15: 337953e4994 < -: ----------- Makefile: add a "TRACK_template" for GIT-*{FLAGS,DEFINES,...}
16: 5bb597c1993 < -: ----------- Makefile: add "$(QUIET)" boilerplate to shared.mak
17: 3c4d0589667 < -: ----------- Makefile: use $(wspfx) for $(QUIET...) in shared.mak
18: be5882b2c99 < -: ----------- Makefiles: add and use wildcard "mkdir -p" template
19: 2710f8af6cd < -: ----------- Makefile: correct the dependency graph of hook-list.h
20: 59f22a0269a < -: ----------- Makefile: use $(file) I/O instead of "FORCE" when possible
21: dd569a59c74 < -: ----------- Makefile: disable GNU make built-in wildcard rules
22: 4168a7e3b30 < -: ----------- Makefile: define $(LIB_H) in terms of $(FIND_SOURCE_FILES)
23: 48a3927d972 < -: ----------- Makefile: move ".SUFFIXES" rule to shared.mak