Skip to content

Commit 507c63f

Browse files
ramsay-jonesgitster
authored andcommitted
Makefile: only set some BASIC_CFLAGS when RUNTIME_PREFIX is set
Several build variables only have any meaning when the RUNTIME_PREFIX variable has been set. In particular, the following build variables are otherwise ignored: HAVE_BSD_KERN_PROC_SYSCTL PROCFS_EXECUTABLE_PATH HAVE_NS_GET_EXECUTABLE_PATH HAVE_ZOS_GET_EXECUTABLE_PATH HAVE_WPGMPTR Make setting BASIC_CFLAGS, for each of these variables, conditional on the RUNTIME_PREFIX being defined. Signed-off-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d07e06 commit 507c63f

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

Makefile

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,10 +2179,6 @@ ifdef HAVE_BSD_SYSCTL
21792179
BASIC_CFLAGS += -DHAVE_BSD_SYSCTL
21802180
endif
21812181

2182-
ifdef HAVE_BSD_KERN_PROC_SYSCTL
2183-
BASIC_CFLAGS += -DHAVE_BSD_KERN_PROC_SYSCTL
2184-
endif
2185-
21862182
ifdef HAVE_GETDELIM
21872183
BASIC_CFLAGS += -DHAVE_GETDELIM
21882184
endif
@@ -2213,25 +2209,33 @@ ifneq ($(findstring openssl,$(CSPRNG_METHOD)),)
22132209
EXTLIBS += -lcrypto -lssl
22142210
endif
22152211

2216-
ifneq ($(PROCFS_EXECUTABLE_PATH),)
2217-
procfs_executable_path_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
2218-
BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(procfs_executable_path_SQ)"'
2219-
endif
2220-
22212212
ifndef HAVE_PLATFORM_PROCINFO
22222213
COMPAT_OBJS += compat/stub/procinfo.o
22232214
endif
22242215

2225-
ifdef HAVE_NS_GET_EXECUTABLE_PATH
2226-
BASIC_CFLAGS += -DHAVE_NS_GET_EXECUTABLE_PATH
2227-
endif
2216+
ifdef RUNTIME_PREFIX
22282217

2229-
ifdef HAVE_ZOS_GET_EXECUTABLE_PATH
2230-
BASIC_CFLAGS += -DHAVE_ZOS_GET_EXECUTABLE_PATH
2231-
endif
2218+
ifdef HAVE_BSD_KERN_PROC_SYSCTL
2219+
BASIC_CFLAGS += -DHAVE_BSD_KERN_PROC_SYSCTL
2220+
endif
2221+
2222+
ifneq ($(PROCFS_EXECUTABLE_PATH),)
2223+
pep_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
2224+
BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(pep_SQ)"'
2225+
endif
2226+
2227+
ifdef HAVE_NS_GET_EXECUTABLE_PATH
2228+
BASIC_CFLAGS += -DHAVE_NS_GET_EXECUTABLE_PATH
2229+
endif
2230+
2231+
ifdef HAVE_ZOS_GET_EXECUTABLE_PATH
2232+
BASIC_CFLAGS += -DHAVE_ZOS_GET_EXECUTABLE_PATH
2233+
endif
2234+
2235+
ifdef HAVE_WPGMPTR
2236+
BASIC_CFLAGS += -DHAVE_WPGMPTR
2237+
endif
22322238

2233-
ifdef HAVE_WPGMPTR
2234-
BASIC_CFLAGS += -DHAVE_WPGMPTR
22352239
endif
22362240

22372241
ifdef FILENO_IS_A_MACRO

0 commit comments

Comments
 (0)