]> git.armaanb.net Git - st.git/commitdiff
Let the user specify CPPFLAGS
authorParide Legovini <pl@ninthfloor.org>
Thu, 10 Jan 2019 12:36:09 +0000 (13:36 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Thu, 10 Jan 2019 17:13:13 +0000 (18:13 +0100)
This complements the work done in d4928ed, allowing the user to specify
the preprocessor flags with the CPPFLAGS environment variable. This is
useful for example to specify preprocessor macros with -D.

CFLAGS could be used instead, but CPPFLAGS is more correct and is expected
to be honored in some cases. For example, the helper scripts to build
Debian packages make use of CPPFLAGS, but the variable is currently
being ignored unless manually appended to CFLAGS.

config.mk

index 64a1da92c7b5d4a45d7e6b47dad1a083af683751..5059632c0da6d75b134cca69253cc77750fbf37c 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -21,8 +21,8 @@ LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
        `$(PKG_CONFIG) --libs freetype2`
 
 # flags
        `$(PKG_CONFIG) --libs freetype2`
 
 # flags
-CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
-STCFLAGS = $(INCS) $(CPPFLAGS) $(CFLAGS)
+STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
+STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
 STLDFLAGS = $(LIBS) $(LDFLAGS)
 
 # OpenBSD:
 STLDFLAGS = $(LIBS) $(LDFLAGS)
 
 # OpenBSD: