mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
build system: Remove need for $(Q) macro in recipes, use --silent in MAKEFLAGS instead
This commit is contained in:
parent
07f36a9437
commit
341593f7d2
@ -21,10 +21,10 @@ BOOTLOADER_MAKE=+$(MAKE) -C $(BOOTLOADER_COMPONENT_PATH)/src \
|
|||||||
.PHONY: bootloader-clean bootloader-flash bootloader $(BOOTLOADER_BIN)
|
.PHONY: bootloader-clean bootloader-flash bootloader $(BOOTLOADER_BIN)
|
||||||
|
|
||||||
$(BOOTLOADER_BIN): $(SDKCONFIG_MAKEFILE)
|
$(BOOTLOADER_BIN): $(SDKCONFIG_MAKEFILE)
|
||||||
$(Q) $(BOOTLOADER_MAKE) $@
|
$(BOOTLOADER_MAKE) $@
|
||||||
|
|
||||||
bootloader-clean:
|
bootloader-clean:
|
||||||
$(Q) $(BOOTLOADER_MAKE) app-clean
|
$(BOOTLOADER_MAKE) app-clean
|
||||||
|
|
||||||
clean: bootloader-clean
|
clean: bootloader-clean
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ bootloader-flash: $(BOOTLOADER_BIN)
|
|||||||
$(ESPTOOLPY_WRITE_FLASH) 0x1000 $^
|
$(ESPTOOLPY_WRITE_FLASH) 0x1000 $^
|
||||||
|
|
||||||
$(BOOTLOADER_BUILD_DIR):
|
$(BOOTLOADER_BUILD_DIR):
|
||||||
$(Q) mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
else
|
else
|
||||||
CFLAGS += -D BOOTLOADER_BUILD=1 -I $(IDF_PATH)/components/esp32/include
|
CFLAGS += -D BOOTLOADER_BUILD=1 -I $(IDF_PATH)/components/esp32/include
|
||||||
|
@ -24,14 +24,14 @@ ESPTOOLPY_WRITE_FLASH=$(ESPTOOLPY_SERIAL) write_flash $(if $(CONFIG_ESPTOOLPY_CO
|
|||||||
ESPTOOL_ALL_FLASH_ARGS += $(CONFIG_APP_OFFSET) $(APP_BIN)
|
ESPTOOL_ALL_FLASH_ARGS += $(CONFIG_APP_OFFSET) $(APP_BIN)
|
||||||
|
|
||||||
$(APP_BIN): $(APP_ELF) $(ESPTOOLPY_SRC)
|
$(APP_BIN): $(APP_ELF) $(ESPTOOLPY_SRC)
|
||||||
$(Q) $(ESPTOOLPY) elf2image $(ESPTOOL_FLASH_OPTIONS) -o $@ $<
|
$(ESPTOOLPY) elf2image $(ESPTOOL_FLASH_OPTIONS) -o $@ $<
|
||||||
|
|
||||||
flash: all_binaries $(ESPTOOLPY_SRC)
|
flash: all_binaries $(ESPTOOLPY_SRC)
|
||||||
@echo "Flashing binaries to serial port $(ESPPORT) (app at offset $(CONFIG_APP_OFFSET))..."
|
@echo "Flashing binaries to serial port $(ESPPORT) (app at offset $(CONFIG_APP_OFFSET))..."
|
||||||
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
|
$(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
|
||||||
|
|
||||||
app-flash: $(APP_BIN) $(ESPTOOLPY_SRC)
|
app-flash: $(APP_BIN) $(ESPTOOLPY_SRC)
|
||||||
@echo "Flashing app to serial port $(ESPPORT), offset $(CONFIG_APP_OFFSET)..."
|
@echo "Flashing app to serial port $(ESPPORT), offset $(CONFIG_APP_OFFSET)..."
|
||||||
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(CONFIG_APP_OFFSET) $(APP_BIN)
|
$(ESPTOOLPY_WRITE_FLASH) $(CONFIG_APP_OFFSET) $(APP_BIN)
|
||||||
|
|
||||||
$(eval $(call SubmoduleCheck,$(ESPTOOLPY_SRC),$(COMPONENT_PATH)/esptool))
|
$(eval $(call SubmoduleCheck,$(ESPTOOLPY_SRC),$(COMPONENT_PATH)/esptool))
|
||||||
|
@ -20,7 +20,7 @@ PARTITION_TABLE_BIN := $(BUILD_DIR_BASE)/$(notdir $(PARTITION_TABLE_CSV_PATH:.cs
|
|||||||
|
|
||||||
$(PARTITION_TABLE_BIN): $(PARTITION_TABLE_CSV_PATH)
|
$(PARTITION_TABLE_BIN): $(PARTITION_TABLE_CSV_PATH)
|
||||||
@echo "Building partitions from $(PARTITION_TABLE_CSV_PATH)..."
|
@echo "Building partitions from $(PARTITION_TABLE_CSV_PATH)..."
|
||||||
$(Q) $(GEN_ESP32PART) $< $@
|
$(GEN_ESP32PART) $< $@
|
||||||
|
|
||||||
all_binaries: $(PARTITION_TABLE_BIN)
|
all_binaries: $(PARTITION_TABLE_BIN)
|
||||||
|
|
||||||
@ -30,16 +30,16 @@ ESPTOOL_ALL_FLASH_ARGS += 0x4000 $(PARTITION_TABLE_BIN)
|
|||||||
partition_table: $(PARTITION_TABLE_BIN)
|
partition_table: $(PARTITION_TABLE_BIN)
|
||||||
@echo "Partition table binary generated. Contents:"
|
@echo "Partition table binary generated. Contents:"
|
||||||
@echo $(SEPARATOR)
|
@echo $(SEPARATOR)
|
||||||
$(Q) $(GEN_ESP32PART) $<
|
$(GEN_ESP32PART) $<
|
||||||
@echo $(SEPARATOR)
|
@echo $(SEPARATOR)
|
||||||
@echo "Partition flashing command:"
|
@echo "Partition flashing command:"
|
||||||
@echo "$(PARTITION_TABLE_FLASH_CMD)"
|
@echo "$(PARTITION_TABLE_FLASH_CMD)"
|
||||||
|
|
||||||
partition_table-flash: $(PARTITION_TABLE_BIN)
|
partition_table-flash: $(PARTITION_TABLE_BIN)
|
||||||
@echo "Flashing partition table..."
|
@echo "Flashing partition table..."
|
||||||
$(Q) $(PARTITION_TABLE_FLASH_CMD)
|
$(PARTITION_TABLE_FLASH_CMD)
|
||||||
|
|
||||||
partition_table-clean:
|
partition_table-clean:
|
||||||
$(Q) rm -f $(PARTITION_TABLE_BIN)
|
rm -f $(PARTITION_TABLE_BIN)
|
||||||
|
|
||||||
clean: partition_table-clean
|
clean: partition_table-clean
|
||||||
|
@ -275,6 +275,18 @@ Second Level: Component Makefiles
|
|||||||
|
|
||||||
To better understand the component make process, have a read through the ``component_wrapper.mk`` file and some of the ``component.mk`` files included with esp-idf.
|
To better understand the component make process, have a read through the ``component_wrapper.mk`` file and some of the ``component.mk`` files included with esp-idf.
|
||||||
|
|
||||||
|
Debugging The Make Process
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Some tips for debugging the esp-idf build system:
|
||||||
|
|
||||||
|
- Appending ``V=1`` to the make arguments (or setting it as an environment variable) will cause make to echo all commands executed, and also each directory as it is entered for a sub-make.
|
||||||
|
- Running ``make -w`` will cause make to echo each directory as it is entered for a sub-make - same as ``V=1`` but without also echoing all commands.
|
||||||
|
- Running ``make --trace`` (possibly in addition to one of the above arguments) will print out every target as it is built, and the dependency which caused it to be built.
|
||||||
|
- Running ``make -p`` prints a (very verbose) summary of every generated target in each makefile.
|
||||||
|
|
||||||
|
For more debugging tips and general make information, see the `GNU Make Manual`.
|
||||||
|
|
||||||
Overriding Parts of the Project
|
Overriding Parts of the Project
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
@ -395,24 +407,6 @@ component's name would have to be added to the other component's
|
|||||||
``COMPONENT_DEPENDS`` list to ensure that the components were built
|
``COMPONENT_DEPENDS`` list to ensure that the components were built
|
||||||
in-order.
|
in-order.
|
||||||
|
|
||||||
Cosmetic Improvements
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
The above example will work just fine, but there's one last cosmetic
|
|
||||||
improvement that can be done. The make system tries to make the make
|
|
||||||
process somewhat easier on the eyes by hiding the commands (unless you
|
|
||||||
run make with the V=1 switch) and this does not do that yet. Here's an
|
|
||||||
improved version that will output in the same style as the rest of the
|
|
||||||
make process::
|
|
||||||
|
|
||||||
COMPONENT_EXTRA_CLEAN := test_tjpgd_logo.h
|
|
||||||
|
|
||||||
graphics_lib.o: logo.h
|
|
||||||
|
|
||||||
logo.h: $(COMPONENT_PATH)/logo.bmp
|
|
||||||
$(summary) BMP2H $@
|
|
||||||
$(Q) bmp2h -i $^ -o $@
|
|
||||||
|
|
||||||
|
|
||||||
Fully Overriding The Component Makefile
|
Fully Overriding The Component Makefile
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
@ -16,13 +16,14 @@ export SDKCONFIG_MAKEFILE # sub-makes (like bootloader) will reuse this path
|
|||||||
# if V is unset or not 1, $(summary) echoes a summary and $(details) does nothing
|
# if V is unset or not 1, $(summary) echoes a summary and $(details) does nothing
|
||||||
V ?= $(VERBOSE)
|
V ?= $(VERBOSE)
|
||||||
ifeq ("$(V)","1")
|
ifeq ("$(V)","1")
|
||||||
Q :=
|
|
||||||
summary := @true
|
summary := @true
|
||||||
details := @echo
|
details := @echo
|
||||||
else
|
else
|
||||||
Q := @
|
|
||||||
summary := @echo
|
summary := @echo
|
||||||
details := @true
|
details := @true
|
||||||
|
|
||||||
|
# disable echoing of commands, directory names
|
||||||
|
MAKEFLAGS += --silent
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Pseudo-target to check a git submodule has been properly initialised
|
# Pseudo-target to check a git submodule has been properly initialised
|
||||||
@ -36,8 +37,8 @@ endif
|
|||||||
define SubmoduleCheck
|
define SubmoduleCheck
|
||||||
$(1):
|
$(1):
|
||||||
@echo "WARNING: Missing submodule $(2) for $$@..."
|
@echo "WARNING: Missing submodule $(2) for $$@..."
|
||||||
$(Q) [ -d ${IDF_PATH}/.git ] || ( echo "ERROR: esp-idf must be cloned from git to work."; exit 1)
|
[ -d ${IDF_PATH}/.git ] || ( echo "ERROR: esp-idf must be cloned from git to work."; exit 1)
|
||||||
$(Q) [ -x $(which git) ] || ( echo "ERROR: Need to run 'git submodule --init' in esp-idf root directory."; exit 1)
|
[ -x $(which git) ] || ( echo "ERROR: Need to run 'git submodule --init' in esp-idf root directory."; exit 1)
|
||||||
@echo "Attempting 'git submodule update --init' in esp-idf root directory..."
|
@echo "Attempting 'git submodule update --init' in esp-idf root directory..."
|
||||||
cd ${IDF_PATH} && git submodule update --init $(2)
|
cd ${IDF_PATH} && git submodule update --init $(2)
|
||||||
|
|
||||||
|
@ -129,8 +129,8 @@ build: $(COMPONENT_LIBRARY)
|
|||||||
# an archive when multiple filenames have the same name (src1/test.o and src2/test.o)
|
# an archive when multiple filenames have the same name (src1/test.o and src2/test.o)
|
||||||
$(COMPONENT_LIBRARY): $(COMPONENT_OBJS)
|
$(COMPONENT_LIBRARY): $(COMPONENT_OBJS)
|
||||||
$(summary) AR $@
|
$(summary) AR $@
|
||||||
$(Q) rm -f $@
|
rm -f $@
|
||||||
$(Q) $(AR) cru $@ $(COMPONENT_OBJS)
|
$(AR) cru $@ $(COMPONENT_OBJS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If COMPONENT_OWNCLEANTARGET is not set, define a phony clean target
|
# If COMPONENT_OWNCLEANTARGET is not set, define a phony clean target
|
||||||
@ -139,7 +139,7 @@ CLEAN_FILES = $(COMPONENT_LIBRARY) $(COMPONENT_OBJS) $(COMPONENT_OBJS:.o=.d) $(C
|
|||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(summary) RM $(CLEAN_FILES)
|
$(summary) RM $(CLEAN_FILES)
|
||||||
$(Q) rm -f $(CLEAN_FILES)
|
rm -f $(CLEAN_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Include all dependency files already generated
|
# Include all dependency files already generated
|
||||||
@ -150,15 +150,15 @@ define GenerateCompileTargets
|
|||||||
# $(1) - directory containing source files, relative to $(COMPONENT_PATH)
|
# $(1) - directory containing source files, relative to $(COMPONENT_PATH)
|
||||||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.c | $(1)
|
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.c | $(1)
|
||||||
$$(summary) CC $$@
|
$$(summary) CC $$@
|
||||||
$$(Q) $$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
$$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
||||||
|
|
||||||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp | $(1)
|
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp | $(1)
|
||||||
$$(summary) CXX $$@
|
$$(summary) CXX $$@
|
||||||
$$(Q) $$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
||||||
|
|
||||||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.S | $(1)
|
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.S | $(1)
|
||||||
$$(summary) AS $$@
|
$$(summary) AS $$@
|
||||||
$$(Q) $$(CC) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
$$(CC) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
||||||
|
|
||||||
# CWD is build dir, create the build subdirectory if it doesn't exist
|
# CWD is build dir, create the build subdirectory if it doesn't exist
|
||||||
$(1):
|
$(1):
|
||||||
|
@ -238,7 +238,7 @@ COMPONENT_LIBRARIES = $(filter $(notdir $(COMPONENT_PATHS_BUILDABLE)),$(APP_LIBR
|
|||||||
# the rules to build these are emitted as part of GenerateComponentTarget below
|
# the rules to build these are emitted as part of GenerateComponentTarget below
|
||||||
$(APP_ELF): $(foreach libcomp,$(COMPONENT_LIBRARIES),$(BUILD_DIR_BASE)/$(libcomp)/lib$(libcomp).a)
|
$(APP_ELF): $(foreach libcomp,$(COMPONENT_LIBRARIES),$(BUILD_DIR_BASE)/$(libcomp)/lib$(libcomp).a)
|
||||||
$(summary) LD $(notdir $@)
|
$(summary) LD $(notdir $@)
|
||||||
$(Q) $(CC) $(LDFLAGS) -o $@ -Wl,-Map=$(APP_MAP)
|
$(CC) $(LDFLAGS) -o $@ -Wl,-Map=$(APP_MAP)
|
||||||
|
|
||||||
# Generation of $(APP_BIN) from $(APP_ELF) is added by the esptool
|
# Generation of $(APP_BIN) from $(APP_ELF) is added by the esptool
|
||||||
# component's Makefile.projbuild
|
# component's Makefile.projbuild
|
||||||
@ -257,7 +257,7 @@ $(BUILD_DIR_BASE):
|
|||||||
#
|
#
|
||||||
# Is recursively expanded by the GenerateComponentTargets macro
|
# Is recursively expanded by the GenerateComponentTargets macro
|
||||||
define ComponentMake
|
define ComponentMake
|
||||||
$(Q) +$(MAKE) -C $(BUILD_DIR_BASE)/$(2) -f $(IDF_PATH)/make/component_wrapper.mk COMPONENT_MAKEFILE=$(1)/component.mk
|
+$(MAKE) -C $(BUILD_DIR_BASE)/$(2) -f $(IDF_PATH)/make/component_wrapper.mk COMPONENT_MAKEFILE=$(1)/component.mk
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Generate top-level component-specific targets for each component
|
# Generate top-level component-specific targets for each component
|
||||||
@ -303,7 +303,7 @@ $(foreach component,$(COMPONENT_PATHS_BUILDABLE),$(eval $(call GenerateComponent
|
|||||||
|
|
||||||
app-clean: $(addsuffix -clean,$(notdir $(COMPONENT_PATHS_BUILDABLE)))
|
app-clean: $(addsuffix -clean,$(notdir $(COMPONENT_PATHS_BUILDABLE)))
|
||||||
$(summary) RM $(APP_ELF)
|
$(summary) RM $(APP_ELF)
|
||||||
$(Q) rm -f $(APP_ELF) $(APP_BIN) $(APP_MAP)
|
rm -f $(APP_ELF) $(APP_BIN) $(APP_MAP)
|
||||||
|
|
||||||
clean: app-clean
|
clean: app-clean
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ KCONFIG_TOOL_ENV=KCONFIG_AUTOHEADER=$(abspath $(BUILD_DIR_BASE)/include/sdkconfi
|
|||||||
|
|
||||||
menuconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig
|
menuconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig
|
||||||
$(summary) MENUCONFIG
|
$(summary) MENUCONFIG
|
||||||
$(Q) $(KCONFIG_TOOL_ENV) $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig
|
$(KCONFIG_TOOL_ENV) $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig
|
||||||
|
|
||||||
ifeq ("$(wildcard $(SDKCONFIG))","")
|
ifeq ("$(wildcard $(SDKCONFIG))","")
|
||||||
ifeq ("$(filter defconfig,$(MAKECMDGOALS))","")
|
ifeq ("$(filter defconfig,$(MAKECMDGOALS))","")
|
||||||
@ -36,8 +36,8 @@ endif
|
|||||||
|
|
||||||
defconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig $(BUILD_DIR_BASE)
|
defconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig $(BUILD_DIR_BASE)
|
||||||
$(summary) DEFCONFIG
|
$(summary) DEFCONFIG
|
||||||
$(Q) mkdir -p $(BUILD_DIR_BASE)/include/config
|
mkdir -p $(BUILD_DIR_BASE)/include/config
|
||||||
$(Q) $(KCONFIG_TOOL_ENV) $(KCONFIG_TOOL_DIR)/conf --olddefconfig $(IDF_PATH)/Kconfig
|
$(KCONFIG_TOOL_ENV) $(KCONFIG_TOOL_DIR)/conf --olddefconfig $(IDF_PATH)/Kconfig
|
||||||
|
|
||||||
# Work out of whether we have to build the Kconfig makefile
|
# Work out of whether we have to build the Kconfig makefile
|
||||||
# (auto.conf), or if we're in a situation where we don't need it
|
# (auto.conf), or if we're in a situation where we don't need it
|
||||||
@ -56,9 +56,9 @@ endif
|
|||||||
|
|
||||||
$(AUTO_CONF_REGEN_TARGET) $(BUILD_DIR_BASE)/include/sdkconfig.h: $(SDKCONFIG) $(KCONFIG_TOOL_DIR)/conf $(COMPONENT_KCONFIGS) $(COMPONENT_KCONFIGS_PROJBUILD)
|
$(AUTO_CONF_REGEN_TARGET) $(BUILD_DIR_BASE)/include/sdkconfig.h: $(SDKCONFIG) $(KCONFIG_TOOL_DIR)/conf $(COMPONENT_KCONFIGS) $(COMPONENT_KCONFIGS_PROJBUILD)
|
||||||
$(summary) GENCONFIG
|
$(summary) GENCONFIG
|
||||||
$(Q) mkdir -p $(BUILD_DIR_BASE)/include/config
|
mkdir -p $(BUILD_DIR_BASE)/include/config
|
||||||
$(Q) cd $(BUILD_DIR_BASE); $(KCONFIG_TOOL_ENV) $(KCONFIG_TOOL_DIR)/conf --silentoldconfig $(IDF_PATH)/Kconfig
|
cd $(BUILD_DIR_BASE); $(KCONFIG_TOOL_ENV) $(KCONFIG_TOOL_DIR)/conf --silentoldconfig $(IDF_PATH)/Kconfig
|
||||||
$(Q) touch $(AUTO_CONF_REGEN_TARGET) $(BUILD_DIR_BASE)/include/sdkconfig.h
|
touch $(AUTO_CONF_REGEN_TARGET) $(BUILD_DIR_BASE)/include/sdkconfig.h
|
||||||
# touch to ensure both output files are newer - as 'conf' can also update sdkconfig (a dependency). Without this,
|
# touch to ensure both output files are newer - as 'conf' can also update sdkconfig (a dependency). Without this,
|
||||||
# sometimes you can get an infinite make loop on Windows where sdkconfig always gets regenerated newer
|
# sometimes you can get an infinite make loop on Windows where sdkconfig always gets regenerated newer
|
||||||
# than the target(!)
|
# than the target(!)
|
||||||
@ -68,4 +68,4 @@ clean: config-clean
|
|||||||
config-clean:
|
config-clean:
|
||||||
$(summary RM CONFIG)
|
$(summary RM CONFIG)
|
||||||
$(MAKE) -C $(KCONFIG_TOOL_DIR) clean
|
$(MAKE) -C $(KCONFIG_TOOL_DIR) clean
|
||||||
$(Q) rm -rf $(BUILD_DIR_BASE)/include/config $(BUILD_DIR_BASE)/include/sdkconfig.h
|
rm -rf $(BUILD_DIR_BASE)/include/config $(BUILD_DIR_BASE)/include/sdkconfig.h
|
||||||
|
@ -41,13 +41,13 @@ nconfig: nconf
|
|||||||
$< $(silent) $(Kconfig)
|
$< $(silent) $(Kconfig)
|
||||||
|
|
||||||
silentoldconfig: conf
|
silentoldconfig: conf
|
||||||
$(Q)mkdir -p include/config include/generated
|
mkdir -p include/config include/generated
|
||||||
$< $(silent) --$@ $(Kconfig)
|
$< $(silent) --$@ $(Kconfig)
|
||||||
|
|
||||||
localyesconfig localmodconfig: streamline_config.pl conf
|
localyesconfig localmodconfig: streamline_config.pl conf
|
||||||
$(Q)mkdir -p include/config include/generated
|
mkdir -p include/config include/generated
|
||||||
$(Q)perl $< --$@ . $(Kconfig) > .tmp.config
|
perl $< --$@ . $(Kconfig) > .tmp.config
|
||||||
$(Q)if [ -f .config ]; then \
|
if [ -f .config ]; then \
|
||||||
cmp -s .tmp.config .config || \
|
cmp -s .tmp.config .config || \
|
||||||
(mv -f .config .config.old.1; \
|
(mv -f .config .config.old.1; \
|
||||||
mv -f .tmp.config .config; \
|
mv -f .tmp.config .config; \
|
||||||
@ -57,7 +57,7 @@ localyesconfig localmodconfig: streamline_config.pl conf
|
|||||||
mv -f .tmp.config .config; \
|
mv -f .tmp.config .config; \
|
||||||
conf $(silent) --silentoldconfig $(Kconfig); \
|
conf $(silent) --silentoldconfig $(Kconfig); \
|
||||||
fi
|
fi
|
||||||
$(Q)rm -f .tmp.config
|
rm -f .tmp.config
|
||||||
|
|
||||||
|
|
||||||
# These targets map 1:1 to the commandline options of 'conf'
|
# These targets map 1:1 to the commandline options of 'conf'
|
||||||
@ -84,22 +84,22 @@ ifeq ($(KBUILD_DEFCONFIG),)
|
|||||||
else
|
else
|
||||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
|
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
|
||||||
@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
|
@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
|
||||||
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
|
$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
|
||||||
else
|
else
|
||||||
@$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
|
@$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
|
||||||
$(Q) $(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
|
$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%_defconfig: conf
|
%_defconfig: conf
|
||||||
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
|
$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
|
||||||
|
|
||||||
configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
|
configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
|
||||||
|
|
||||||
%.config: conf
|
%.config: conf
|
||||||
$(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
|
$(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
|
||||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
|
$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
|
||||||
+$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
|
+yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
|
||||||
|
|
||||||
PHONY += kvmconfig
|
PHONY += kvmconfig
|
||||||
kvmconfig: kvm_guest.config
|
kvmconfig: kvm_guest.config
|
||||||
@ -111,7 +111,7 @@ xenconfig: xen.config
|
|||||||
|
|
||||||
PHONY += tinyconfig
|
PHONY += tinyconfig
|
||||||
tinyconfig:
|
tinyconfig:
|
||||||
$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
|
$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
|
||||||
|
|
||||||
# Help text used by make help
|
# Help text used by make help
|
||||||
help:
|
help:
|
||||||
@ -181,7 +181,7 @@ clean-files += $(conf-objs) $(mconf-objs) conf mconf $(lxdialog)
|
|||||||
PHONY += dochecklxdialog
|
PHONY += dochecklxdialog
|
||||||
$(addprefix ,$(lxdialog)): dochecklxdialog
|
$(addprefix ,$(lxdialog)): dochecklxdialog
|
||||||
dochecklxdialog:
|
dochecklxdialog:
|
||||||
$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(CC) $(CFLAGS) $(LOADLIBES_mconf)
|
$(CONFIG_SHELL) $(check-lxdialog) -check $(CC) $(CFLAGS) $(LOADLIBES_mconf)
|
||||||
|
|
||||||
always := dochecklxdialog
|
always := dochecklxdialog
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ quiet_cmd_moc = MOC $@
|
|||||||
|
|
||||||
# Extract gconf menu items for i18n support
|
# Extract gconf menu items for i18n support
|
||||||
gconf.glade.h: gconf.glade
|
gconf.glade.h: gconf.glade
|
||||||
$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
|
intltool-extract --type=gettext/glade --srcdir=$(srctree) \
|
||||||
gconf.glade
|
gconf.glade
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user