From 472c390157cbfd94ba5232e08300cac9e1919226 Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Tue, 28 Nov 2017 16:48:57 +0100 Subject: [PATCH] Put the /dev/null in $(CAT) Also do not build library checks with $(CFG_CFLAGS), because they are neither needed nor available at that point. --- config.gnu.mk | 7 ++++--- config.vs2013.mk | 1 + rules.mk | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.gnu.mk b/config.gnu.mk index edd8e53..9e1f745 100644 --- a/config.gnu.mk +++ b/config.gnu.mk @@ -35,6 +35,7 @@ AR= $(CROSS_COMPILE:%=%-)ar -rcs RANLIB= $(CROSS_COMPILE:%=%-)ranlib LIBTOOL= libtool -no_warning_for_no_symbols INSTALL= install +CAT= cat /dev/null #------------------------------------------------------------------------------ @@ -115,12 +116,12 @@ CFG_TEST= \ CFG_UNDEF0= \ | sed -e 's|^\#define \(.*\) 0$$|/* \#undef \1 */|g' > "$@"; \ [ -f "$<".out ] && cat >> "$@" "$<".out; true -CFG_CFLAGS= $(CFLAGS) $(shell cat $(PKG_CFLAGS) $(PKG_LDFLAGS) /dev/null) -CFG_CXXFLAGS= $(CXXFLAGS) $(shell cat $(PKG_CFLAGS) $(PKG_LDFLAGS) /dev/null) +CFG_CFLAGS= $(CFLAGS) $(shell $(CAT) $(PKG_CFLAGS) $(PKG_LDFLAGS)) +CFG_CXXFLAGS= $(CXXFLAGS) $(shell $(CAT) $(PKG_CFLAGS) $(PKG_LDFLAGS)) CFG_CC_CMD= `$(CC) $(CFG_CFLAGS) $(CFLAGS_CONFIG_$*) $(CFG_TEST)` CFG_CXX_CMD= `$(CXX) $(CFG_CXXFLAGS) $(CXXFLAGS_CONFIG_$*) $(CFG_TEST)` -CFG_LIB_CMD= `$(CC) $(CFG_CFLAGS) $(CFLAGS_CONFIG_$*) -l$* $(CFG_TEST)` +CFG_LIB_CMD= `$(CC) $(CFLAGS_CONFIG_$*) -l$* $(CFG_TEST)` CFG_FN_CMD= `$(CC) $(CFG_CFLAGS) $(CFLAGS_CONFIG_$*) $(CFG_TEST)` CC_CONFIG= $(CFG_DEF) HAVE_$(CFG_UPPER)_H $(CFG_CC_CMD) $(CFG_UNDEF0) diff --git a/config.vs2013.mk b/config.vs2013.mk index 02cc7f8..b3a371e 100644 --- a/config.vs2013.mk +++ b/config.vs2013.mk @@ -35,6 +35,7 @@ PYTHON= python AR= no-ar-on-windows RANLIB= no-ranlib-on-windows INSTALL=install +CAT= type #------------------------------------------------------------------------------ diff --git a/rules.mk b/rules.mk index dc9caac..8aaa79f 100644 --- a/rules.mk +++ b/rules.mk @@ -379,7 +379,7 @@ PKG_LIBS= $(patsubst %,$(OBJDIR)%.cfg.ldflags,$(filter lib%,$(CONFIG))) PKG_DEPS= $(MAKEFILE_DEPS) $(OBJDIR).mkdir $(OBJDIR)pkg-config.mk: $(PKG_CFLAGS) $(PKG_LDFLAGS) $(PKG_LIBS) - $(PRINT_COMMAND) (echo CFLAGS_PKGCONFIG=`cat $(PKG_CFLAGS)`; echo LDFLAGS_PKGCONFIG=`cat $(PKG_LDFLAGS) $(PKG_LIBS)`) > $@ + $(PRINT_COMMAND) (echo CFLAGS_PKGCONFIG=`$(CAT) $(PKG_CFLAGS)`; echo LDFLAGS_PKGCONFIG=`$(CAT) $(PKG_LDFLAGS) $(PKG_LIBS)`) > $@ -include $(PKGCONFIGS:%=$(OBJDIR)pkg-config.mk) $(OBJDIR)%?.pkg-config.cflags: $(PKG_DEPS)