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>
This commit is contained in:
committed by
Petr Štetiar
parent
ccad1d6817
commit
8636a17214
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user