mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 05:36:32 +00:00
Factorize environment variables for config utilities
Instead of duplicating the definition of KCONFIG_AUTOCONFIG, KCONFIG_AUTOHEADER and BUILDROOT_CONFIG, let's define them in a COMMON_CONFIG_ENV variable, which is used by all the xconfig, gconfig, menuconfig, nconfig, config, oldconfig, randconfig, allyesconfig, allnoconfig, randpackageconfig, allyespackageconfig, allnopackageconfig, defconfig, %_defconfig targets. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
abba28ac7d
commit
1039eb74fa
66
Makefile
66
Makefile
@ -465,107 +465,87 @@ $(BUILD_DIR)/buildroot-config/%onf:
|
|||||||
mkdir -p $(@D)/lxdialog
|
mkdir -p $(@D)/lxdialog
|
||||||
$(MAKE) CC="$(HOSTCC)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
|
$(MAKE) CC="$(HOSTCC)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
|
||||||
|
|
||||||
|
COMMON_CONFIG_ENV = \
|
||||||
|
KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
||||||
|
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
||||||
|
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config
|
||||||
|
|
||||||
xconfig: $(BUILD_DIR)/buildroot-config/qconf
|
xconfig: $(BUILD_DIR)/buildroot-config/qconf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
|
|
||||||
test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
|
test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gconfig: $(BUILD_DIR)/buildroot-config/gconf
|
gconfig: $(BUILD_DIR)/buildroot-config/gconf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@if ! $(COMMON_CONFIG_ENV) srctree=$(TOPDIR) \
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
$< $(CONFIG_CONFIG_IN); then \
|
||||||
srctree=$(TOPDIR) \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
|
|
||||||
test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
|
test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
menuconfig: $(BUILD_DIR)/buildroot-config/mconf
|
menuconfig: $(BUILD_DIR)/buildroot-config/mconf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
|
|
||||||
test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
|
test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nconfig: $(BUILD_DIR)/buildroot-config/nconf
|
nconfig: $(BUILD_DIR)/buildroot-config/nconf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
|
|
||||||
test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
|
test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
config: $(BUILD_DIR)/buildroot-config/conf
|
config: $(BUILD_DIR)/buildroot-config/conf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN)
|
|
||||||
|
|
||||||
oldconfig: $(BUILD_DIR)/buildroot-config/conf
|
oldconfig: $(BUILD_DIR)/buildroot-config/conf
|
||||||
mkdir -p $(BUILD_DIR)/buildroot-config
|
mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --oldconfig $(CONFIG_CONFIG_IN)
|
|
||||||
|
|
||||||
randconfig: $(BUILD_DIR)/buildroot-config/conf
|
randconfig: $(BUILD_DIR)/buildroot-config/conf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN)
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --randconfig $(CONFIG_CONFIG_IN)
|
|
||||||
|
|
||||||
allyesconfig: $(BUILD_DIR)/buildroot-config/conf
|
allyesconfig: $(BUILD_DIR)/buildroot-config/conf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN)
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allyesconfig $(CONFIG_CONFIG_IN)
|
|
||||||
|
|
||||||
allnoconfig: $(BUILD_DIR)/buildroot-config/conf
|
allnoconfig: $(BUILD_DIR)/buildroot-config/conf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN)
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allnoconfig $(CONFIG_CONFIG_IN)
|
|
||||||
|
|
||||||
randpackageconfig: $(BUILD_DIR)/buildroot-config/conf
|
randpackageconfig: $(BUILD_DIR)/buildroot-config/conf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
|
@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) \
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --randconfig $(CONFIG_CONFIG_IN)
|
$< --randconfig $(CONFIG_CONFIG_IN)
|
||||||
@rm -f $(CONFIG_DIR)/.config.nopkg
|
@rm -f $(CONFIG_DIR)/.config.nopkg
|
||||||
|
|
||||||
allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf
|
allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
|
@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) \
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allyesconfig $(CONFIG_CONFIG_IN)
|
$< --allyesconfig $(CONFIG_CONFIG_IN)
|
||||||
@rm -f $(CONFIG_DIR)/.config.nopkg
|
@rm -f $(CONFIG_DIR)/.config.nopkg
|
||||||
|
|
||||||
allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf
|
allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
|
@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) \
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allnoconfig $(CONFIG_CONFIG_IN)
|
$< --allnoconfig $(CONFIG_CONFIG_IN)
|
||||||
@rm -f $(CONFIG_DIR)/.config.nopkg
|
@rm -f $(CONFIG_DIR)/.config.nopkg
|
||||||
|
|
||||||
defconfig: $(BUILD_DIR)/buildroot-config/conf
|
defconfig: $(BUILD_DIR)/buildroot-config/conf
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --defconfig $(CONFIG_CONFIG_IN)
|
|
||||||
|
|
||||||
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig
|
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig
|
||||||
@mkdir -p $(BUILD_DIR)/buildroot-config
|
@mkdir -p $(BUILD_DIR)/buildroot-config
|
||||||
@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
|
@$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
|
||||||
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
|
|
||||||
BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
|
|
||||||
|
|
||||||
# check if download URLs are outdated
|
# check if download URLs are outdated
|
||||||
source-check: allyesconfig
|
source-check: allyesconfig
|
||||||
|
Loading…
x
Reference in New Issue
Block a user