aboutsummaryrefslogtreecommitdiffstats
path: root/config.mk.in
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2022-11-30 00:27:48 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2022-12-08 06:41:08 -0300
commit87948b3ffe9e8e704c55509cd6c747547b3c7072 (patch)
treef43a175d6bced67b6daf75aaf511527437cb6cbc /config.mk.in
parentbuild: move library flags from EXTRA_LDFLAGS to LIBS (diff)
downloadfirejail-87948b3ffe9e8e704c55509cd6c747547b3c7072.tar.gz
firejail-87948b3ffe9e8e704c55509cd6c747547b3c7072.tar.zst
firejail-87948b3ffe9e8e704c55509cd6c747547b3c7072.zip
makefiles: stop overriding CFLAGS/LDFLAGS
From the manual of GNU Automake (version 1.16.5)[1] [2]: > 3.6 Variables reserved for the user > > Some `Makefile` variables are reserved by the GNU Coding Standards for > the use of the "user"—the person building the package. For instance, > `CFLAGS` is one such variable. > > Sometimes package developers are tempted to set user variables such > as `CFLAGS` because it appears to make their job easier. However, the > package itself should never set a user variable, particularly not to > include switches that are required for proper compilation of the > package. Since these variables are documented as being for the > package builder, that person rightfully expects to be able to override > any of these variables at build time. > > To get around this problem, Automake introduces an > automake-specific shadow variable for each user flag variable. > (Shadow variables are not introduced for variables like `CC`, where > they would make no sense.) The shadow variable is named by prepending > `AM_` to the user variable's name. For instance, the shadow variable > for `YFLAGS` is `AM_YFLAGS`. The package maintainer—that is, the > author(s) of the `Makefile.am` and `configure.ac` files—may adjust > these shadow variables however necessary. > > Note Flag Variables Ordering::, for more discussion about these > variables and how they interact with per-target variables. See also the description of CFLAGS in the GNU Autoconf manual[3]. Note: We do not use automake (save for aclocal) nor generally follow the GNU Coding Standards, but the concept still applies. Also, the closest analogous in the project to the `AM_` prefix would currently likely be `EXTRA_`. [1] https://www.gnu.org/software/automake/manual/1.16.5/html_node/User-Variables.html [2] https://www.gnu.org/software/automake/manual/1.16.5/html_node/Flag-Variables-Ordering.html [3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html
Diffstat (limited to 'config.mk.in')
-rw-r--r--config.mk.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.mk.in b/config.mk.in
index 45269afab..cfef6b8d3 100644
--- a/config.mk.in
+++ b/config.mk.in
@@ -51,9 +51,14 @@ HAVE_ONLY_SYSCFG_PROFILES=@HAVE_ONLY_SYSCFG_PROFILES@
51 51
52MANFLAGS = $(HAVE_LTS) $(HAVE_OUTPUT) $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_IDS) $(HAVE_OVERLAYFS) $(HAVE_USERTMPFS) $(HAVE_DBUSPROXY) $(HAVE_FIRETUNNEL) $(HAVE_GLOBALCFG) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_FILE_TRANSFER) $(HAVE_SELINUX) $(HAVE_SUID) $(HAVE_FORCE_NONEWPRIVS) $(HAVE_ONLY_SYSCFG_PROFILES) 52MANFLAGS = $(HAVE_LTS) $(HAVE_OUTPUT) $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_IDS) $(HAVE_OVERLAYFS) $(HAVE_USERTMPFS) $(HAVE_DBUSPROXY) $(HAVE_FIRETUNNEL) $(HAVE_GLOBALCFG) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_FILE_TRANSFER) $(HAVE_SELINUX) $(HAVE_SUID) $(HAVE_FORCE_NONEWPRIVS) $(HAVE_ONLY_SYSCFG_PROFILES)
53 53
54# User variables - should not be modified in the code (as they are reserved for
55# the user building the package); see the following for details:
56# https://www.gnu.org/software/automake/manual/1.16.5/html_node/User-Variables.html
54CC=@CC@ 57CC=@CC@
55CFLAGS=@CFLAGS@ 58CFLAGS=@CFLAGS@
56LDFLAGS=@LDFLAGS@ 59LDFLAGS=@LDFLAGS@
60
61# Project variables
57LIBS=@LIBS@ 62LIBS=@LIBS@
58 63
59ifdef NO_EXTRA_CFLAGS 64ifdef NO_EXTRA_CFLAGS