Skip to content

Commit 451a7db

Browse files
avargitster
authored andcommitted
Makefile: move -DPAGER_ENV from BASIC_CFLAGS to EXTRA_CPPFLAGS
Remove -DPAGER_ENV from the BASIC_CFLAGS and instead have it passed via the EXTRA_CPPFLAGS passed when compiling pager.c. This doesn't change anything except to make it clear that only pager.c needs this, as it's the only user of this define. See 995bc22 (pager: move pager-specific setup into the build, 2016-08-04) for the commit that originally added this. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9d7761 commit 451a7db

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,11 +2104,6 @@ ifdef DEFAULT_HELP_FORMAT
21042104
BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='"$(DEFAULT_HELP_FORMAT)"'
21052105
endif
21062106

2107-
PAGER_ENV_SQ = $(subst ','\'',$(PAGER_ENV))
2108-
PAGER_ENV_CQ = "$(subst ",\",$(subst \,\\,$(PAGER_ENV)))"
2109-
PAGER_ENV_CQ_SQ = $(subst ','\'',$(PAGER_ENV_CQ))
2110-
BASIC_CFLAGS += -DPAGER_ENV='$(PAGER_ENV_CQ_SQ)'
2111-
21122107
ALL_CFLAGS += $(BASIC_CFLAGS)
21132108
ALL_LDFLAGS += $(BASIC_LDFLAGS)
21142109

@@ -2223,6 +2218,12 @@ builtin/help.sp builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \
22232218
'-DGIT_MAN_PATH="$(mandir_relative_SQ)"' \
22242219
'-DGIT_INFO_PATH="$(infodir_relative_SQ)"'
22252220

2221+
PAGER_ENV_SQ = $(subst ','\'',$(PAGER_ENV))
2222+
PAGER_ENV_CQ = "$(subst ",\",$(subst \,\\,$(PAGER_ENV)))"
2223+
PAGER_ENV_CQ_SQ = $(subst ','\'',$(PAGER_ENV_CQ))
2224+
pager.sp pager.s pager.o: EXTRA_CPPFLAGS = \
2225+
-DPAGER_ENV='$(PAGER_ENV_CQ_SQ)'
2226+
22262227
version.sp version.s version.o: GIT-VERSION-FILE GIT-USER-AGENT
22272228
version.sp version.s version.o: EXTRA_CPPFLAGS = \
22282229
'-DGIT_VERSION="$(GIT_VERSION)"' \

0 commit comments

Comments
 (0)