{"thread":{"id":"57099","subject":"[PATCH] Makefile: remove -DPAGER_ENV from BASIC_CFLAGS","startedAt":"2021-12-17T00:19:21Z","lastAt":"2021-12-17T00:19:21Z","messageCount":1,"participants":["Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"444291","messageId":"patch-1.1-90d1e77ad5e-20211217T001628Z-avarab@gmail.com","threadId":"57099","inReplyTo":null,"subject":"[PATCH] Makefile: remove -DPAGER_ENV from BASIC_CFLAGS","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-12-17T00:19:15Z","receivedAt":"2021-12-17T00:19:21Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove -DPAGER_ENV from the BASIC_CFLAGS and instead have it passed\nvia the EXTRA_CPPFLAGS passed when compiling pager.c.\n\nThis doesn't change anything except to make it clear that only pager.c\nneeds this, as it's the only user of this define. See\n995bc22d7f8 (pager: move pager-specific setup into the build,\n2016-08-04) for the commit that originally added this.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\nA new trivial fix that wasn't in the ab/make-dependency topic.\n\nThis one doesn't really matter for now, before we over-provided\npager_env, now we don't. We can know we this change is OK because if\nwe get it wrong we'd get a compile error.\n\nBut in general these -D variables are broken in various ways, either\nthrough bad escaping, or us not re-building things when they\nchange. I've got some later fixes to address those, and having a\nstarting point where variables map to they files they're needed in\nwill help make those changes smaller and easier to review.\n\nRange-diff:\n 1:  1621ca72c1d <  -:  ----------- Makefile: don't invoke msgfmt with --statistics\n 2:  b7c36c9fea0 <  -:  ----------- Makefile: don't set up \"perl/build\" rules under NO_PERL=Y\n 3:  29b000eb0f1 <  -:  ----------- Makefile: use \"=\" not \":=\" for po/* and perl/*\n 4:  daead5ec293 <  -:  ----------- Makefile: clean perl/build/ even with NO_PERL=Y\n 5:  3c987590740 <  -:  ----------- Makefile: remove \"mv $@ $@+\" dance redundant to .DELETE_ON_ERROR\n 6:  b57f582ccd3 <  -:  ----------- Makefile: guard Perl-only variable assignments\n 7:  fcdee92f64c <  -:  ----------- Makefile: change \"ifndef NO_PERL\" to \"ifdef NO_PERL\"\n 8:  1e25b532ca2 <  -:  ----------- Makefile: adjust Perl-related comments & whitespace\n 9:  77d9855bfcf <  -:  ----------- Makefile: correct \"GIT-PERL-{DEFINES,HEADER}\" dependency graph\n10:  6004cdcd8d9 <  -:  ----------- Makefile: create a GIT-PYTHON-DEFINES, like \"PERL\"\n11:  17b30e96057 <  -:  ----------- Makefile: stop needing @@GIT_VERSION@@ in *.perl scripts\n12:  30ddf7da2c8 <  -:  ----------- Makefiles: add \"shared.mak\", move \".DELETE_ON_ERROR\" to it\n13:  f378a7dc35e <  -:  ----------- Makefile: move $(comma), $(empty) and $(space) to shared.mak\n14:  13cbb851d32 <  -:  ----------- Makefile: re-add and use the \"shellquote\" macros\n15:  337953e4994 <  -:  ----------- Makefile: add a \"TRACK_template\" for GIT-*{FLAGS,DEFINES,...}\n16:  5bb597c1993 <  -:  ----------- Makefile: add \"$(QUIET)\" boilerplate to shared.mak\n17:  3c4d0589667 <  -:  ----------- Makefile: use $(wspfx) for $(QUIET...) in shared.mak\n18:  be5882b2c99 <  -:  ----------- Makefiles: add and use wildcard \"mkdir -p\" template\n19:  2710f8af6cd <  -:  ----------- Makefile: correct the dependency graph of hook-list.h\n20:  59f22a0269a <  -:  ----------- Makefile: use $(file) I/O instead of \"FORCE\" when possible\n21:  dd569a59c74 <  -:  ----------- Makefile: disable GNU make built-in wildcard rules\n22:  4168a7e3b30 <  -:  ----------- Makefile: define $(LIB_H) in terms of $(FIND_SOURCE_FILES)\n23:  48a3927d972 <  -:  ----------- Makefile: move \".SUFFIXES\" rule to shared.mak\n -:  ----------- >  1:  90d1e77ad5e Makefile: remove -DPAGER_ENV from BASIC_CFLAGS\n\n Makefile | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 9c00a793e47..af0bbfb5d2f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2111,11 +2111,6 @@ ifdef DEFAULT_HELP_FORMAT\n BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='\"$(DEFAULT_HELP_FORMAT)\"'\n endif\n \n-PAGER_ENV_SQ = $(subst ','\\'',$(PAGER_ENV))\n-PAGER_ENV_CQ = \"$(subst \",\\\",$(subst \\,\\\\,$(PAGER_ENV)))\"\n-PAGER_ENV_CQ_SQ = $(subst ','\\'',$(PAGER_ENV_CQ))\n-BASIC_CFLAGS += -DPAGER_ENV='$(PAGER_ENV_CQ_SQ)'\n-\n ALL_CFLAGS += $(BASIC_CFLAGS)\n ALL_LDFLAGS += $(BASIC_LDFLAGS)\n \n@@ -2230,6 +2225,12 @@ builtin/help.sp builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \\\n \t'-DGIT_MAN_PATH=\"$(mandir_relative_SQ)\"' \\\n \t'-DGIT_INFO_PATH=\"$(infodir_relative_SQ)\"'\n \n+PAGER_ENV_SQ = $(subst ','\\'',$(PAGER_ENV))\n+PAGER_ENV_CQ = \"$(subst \",\\\",$(subst \\,\\\\,$(PAGER_ENV)))\"\n+PAGER_ENV_CQ_SQ = $(subst ','\\'',$(PAGER_ENV_CQ))\n+pager.sp pager.s pager.o: EXTRA_CPPFLAGS = \\\n+\t-DPAGER_ENV='$(PAGER_ENV_CQ_SQ)'\n+\n version.sp version.s version.o: GIT-VERSION-FILE GIT-USER-AGENT\n version.sp version.s version.o: EXTRA_CPPFLAGS = \\\n \t'-DGIT_VERSION=\"$(GIT_VERSION)\"' \\\n-- \n2.34.1.1119.g7a3fc8778ee\n\n"}]}