aboutsummaryrefslogtreecommitdiffstats
path: root/include/toplevel.mk
diff options
context:
space:
mode:
authorEneas U de Queiroz <cotequeiroz@gmail.com>2020-04-07 17:07:22 -0300
committerPetr Štetiar <ynezz@true.cz>2020-04-09 12:51:10 +0200
commit8636a172146f3b78474c61a7021ca2628b3370b1 (patch)
tree7559405992fa3e31091023792defe8381c16eebb /include/toplevel.mk
parentccad1d681782fdebaea3631fa623653c2188185a (diff)
downloadupstream-8636a172146f3b78474c61a7021ca2628b3370b1.tar.gz
upstream-8636a172146f3b78474c61a7021ca2628b3370b1.tar.bz2
upstream-8636a172146f3b78474c61a7021ca2628b3370b1.zip
build: simplify building *config targets
Instead of passing pkg-config location through a variable when building qconf (make xconfig), prepend its parent directory to the PATH, as it is being done for other conf targets. Use a Makefile pattern rule to group all 'scripts/config/%onf' (currently conf, mconf, qconf) targets in a single rule. Add -O2 to CFLAGS when building them as well. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Diffstat (limited to 'include/toplevel.mk')
-rw-r--r--include/toplevel.mk15
1 files changed, 4 insertions, 11 deletions
diff --git a/include/toplevel.mk b/include/toplevel.mk
index 2b3b55db9f..2965f75c7c 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -100,21 +100,14 @@ prepare-tmpinfo: FORCE
fi
ifneq ($(DISTRO_PKG_CONFIG),)
-scripts/config/mconf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
endif
-scripts/config/mconf:
- @$(_SINGLE)$(SUBMAKE) -s -C scripts/config all CC="$(HOSTCC_WRAPPER)"
+scripts/config/%onf: CFLAGS+= -O2
+scripts/config/%onf:
+ @$(_SINGLE)$(SUBMAKE) -s -C scripts/config $(notdir $@) CC="$(HOSTCC_WRAPPER)"
$(eval $(call rdep,scripts/config,scripts/config/mconf))
-scripts/config/qconf:
- @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf \
- CC="$(HOSTCC_WRAPPER)" \
- DISTRO-PKG-CONFIG="$(DISTRO_PKG_CONFIG)"
-
-scripts/config/conf:
- @$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
-
config: scripts/config/conf prepare-tmpinfo FORCE
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
$< Config.in