From: Ramsay Jones <ramsay@ramsayjones•plus.com>
To: GIT Mailing-list <git@vger•kernel.org>
Cc: Junio C Hamano <gitster@pobox•com>,
Patrick Steinhardt <ps@pks•im>,
Adam Dinwoodie <git@dinwoodie•org>,
Ramsay Jones <ramsay@ramsayjones•plus.com>
Subject: [PATCH v2 02/13] Makefile: only set some BASIC_CFLAGS when RUNTIME_PREFIX is set
Date: Sun, 6 Apr 2025 20:38:28 +0100 [thread overview]
Message-ID: <8df541634aedbba40d8b0fa57dbf9cb0e495f11b.1743859985.git.ramsay@ramsayjones.plus.com> (raw)
In-Reply-To: <cover.1743859985.git.ramsay@ramsayjones.plus.com>
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 <ramsay@ramsayjones•plus.com>
---
Makefile | 38 +++++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/Makefile b/Makefile
index 7315507381..818dde32a9 100644
--- a/Makefile
+++ b/Makefile
@@ -2179,10 +2179,6 @@ ifdef HAVE_BSD_SYSCTL
BASIC_CFLAGS += -DHAVE_BSD_SYSCTL
endif
-ifdef HAVE_BSD_KERN_PROC_SYSCTL
- BASIC_CFLAGS += -DHAVE_BSD_KERN_PROC_SYSCTL
-endif
-
ifdef HAVE_GETDELIM
BASIC_CFLAGS += -DHAVE_GETDELIM
endif
@@ -2213,25 +2209,33 @@ ifneq ($(findstring openssl,$(CSPRNG_METHOD)),)
EXTLIBS += -lcrypto -lssl
endif
-ifneq ($(PROCFS_EXECUTABLE_PATH),)
- procfs_executable_path_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
- BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(procfs_executable_path_SQ)"'
-endif
-
ifndef HAVE_PLATFORM_PROCINFO
COMPAT_OBJS += compat/stub/procinfo.o
endif
-ifdef HAVE_NS_GET_EXECUTABLE_PATH
- BASIC_CFLAGS += -DHAVE_NS_GET_EXECUTABLE_PATH
-endif
+ifdef RUNTIME_PREFIX
-ifdef HAVE_ZOS_GET_EXECUTABLE_PATH
- BASIC_CFLAGS += -DHAVE_ZOS_GET_EXECUTABLE_PATH
-endif
+ ifdef HAVE_BSD_KERN_PROC_SYSCTL
+ BASIC_CFLAGS += -DHAVE_BSD_KERN_PROC_SYSCTL
+ endif
+
+ ifneq ($(PROCFS_EXECUTABLE_PATH),)
+ pep_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
+ BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(pep_SQ)"'
+ endif
+
+ ifdef HAVE_NS_GET_EXECUTABLE_PATH
+ BASIC_CFLAGS += -DHAVE_NS_GET_EXECUTABLE_PATH
+ endif
+
+ ifdef HAVE_ZOS_GET_EXECUTABLE_PATH
+ BASIC_CFLAGS += -DHAVE_ZOS_GET_EXECUTABLE_PATH
+ endif
+
+ ifdef HAVE_WPGMPTR
+ BASIC_CFLAGS += -DHAVE_WPGMPTR
+ endif
-ifdef HAVE_WPGMPTR
- BASIC_CFLAGS += -DHAVE_WPGMPTR
endif
ifdef FILENO_IS_A_MACRO
--
2.49.0
next prev parent reply other threads:[~2025-04-06 19:42 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-15 2:46 [PATCH 00/12] miscellaneous build mods (part 1) Ramsay Jones
2025-04-06 19:38 ` [PATCH v2 00/13] " Ramsay Jones
2025-04-06 19:38 ` [PATCH v2 01/13] meson.build: remove -DCURL_DISABLE_TYPECHECK Ramsay Jones
2025-04-06 19:38 ` Ramsay Jones [this message]
2025-04-14 7:54 ` [PATCH v2 02/13] Makefile: only set some BASIC_CFLAGS when RUNTIME_PREFIX is set Patrick Steinhardt
2025-04-06 19:38 ` [PATCH v2 03/13] meson.build: only set build variables for non-default values Ramsay Jones
2025-04-06 19:49 ` Ramsay Jones
2025-04-14 7:54 ` Patrick Steinhardt
2025-04-14 19:19 ` [-SPAM-] " Ramsay Jones
2025-04-15 5:59 ` Patrick Steinhardt
2025-04-06 19:38 ` [PATCH v2 04/13] meson.build: set default help format to html on windows Ramsay Jones
2025-04-06 20:16 ` Ramsay Jones
2025-04-14 7:54 ` Patrick Steinhardt
2025-04-06 19:38 ` [PATCH v2 05/13] Makefile: remove NEEDS_LIBRT build variable Ramsay Jones
2025-04-06 19:38 ` [PATCH v2 06/13] config.mak.uname: add a note about NO_STRLCPY for Linux Ramsay Jones
2025-04-06 19:38 ` [PATCH v2 07/13] config.mak.uname: only set NO_REGEX on cygwin for v1.7 Ramsay Jones
2025-04-14 7:55 ` Patrick Steinhardt
2025-04-14 20:03 ` [-SPAM-] " Ramsay Jones
2025-04-15 5:59 ` Patrick Steinhardt
2025-04-15 15:05 ` Junio C Hamano
2025-04-06 19:38 ` [PATCH v2 08/13] config.mak.uname: add HAVE_GETDELIM to the cygwin section Ramsay Jones
2025-04-06 19:38 ` [PATCH v2 09/13] config.mak.uname: add clock_gettime() to the cygwin build Ramsay Jones
2025-04-14 7:55 ` Patrick Steinhardt
2025-04-14 20:05 ` [-SPAM-] " Ramsay Jones
2025-04-06 19:38 ` [PATCH v2 10/13] builtin/gc.c: correct RAM calculation when using sysinfo Ramsay Jones
2025-04-14 7:55 ` Patrick Steinhardt
2025-04-14 20:11 ` [-SPAM-] " Ramsay Jones
2025-04-06 19:38 ` [PATCH v2 11/13] config.mak.uname: add sysinfo() configuration for cygwin Ramsay Jones
2025-04-14 7:55 ` Patrick Steinhardt
2025-04-06 19:38 ` [PATCH v2 12/13] config.mak.uname: add arc4random to the cygwin build Ramsay Jones
2025-04-06 19:38 ` [PATCH v2 13/13] config.mak.uname: set CSPRNG_METHOD to getrandom on Linux Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 00/13] miscellaneous build mods (part 1) Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 01/13] meson.build: remove -DCURL_DISABLE_TYPECHECK Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 02/13] Makefile: only set some BASIC_CFLAGS when RUNTIME_PREFIX is set Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 03/13] meson.build: only set build variables for non-default values Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 04/13] meson.build: set default help format to html on windows Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 05/13] Makefile: remove NEEDS_LIBRT build variable Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 06/13] config.mak.uname: add a note about NO_STRLCPY for Linux Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 07/13] config.mak.uname: only set NO_REGEX on cygwin for v1.7 Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 08/13] config.mak.uname: add HAVE_GETDELIM to the cygwin section Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 09/13] config.mak.uname: add clock_gettime() to the cygwin build Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 10/13] builtin/gc.c: correct RAM calculation when using sysinfo Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 11/13] config.mak.uname: add sysinfo() configuration for cygwin Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 12/13] config.mak.uname: add arc4random to the cygwin build Ramsay Jones
2025-04-16 23:18 ` [PATCH v3 13/13] config.mak.uname: set CSPRNG_METHOD to getrandom on Linux Ramsay Jones
2025-04-17 13:55 ` Junio C Hamano
2025-04-17 18:27 ` Ramsay Jones
2025-04-17 20:13 ` Junio C Hamano
2025-04-17 22:06 ` Ramsay Jones
2025-04-17 3:45 ` [PATCH v3 00/13] miscellaneous build mods (part 1) Junio C Hamano
2025-04-17 8:36 ` Patrick Steinhardt
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8df541634aedbba40d8b0fa57dbf9cb0e495f11b.1743859985.git.ramsay@ramsayjones.plus.com \
--to=ramsay@ramsayjones$(echo .)plus.com \
--cc=git@dinwoodie$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=ps@pks$(echo .)im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox