From: Pavel Pisa Date: Wed, 19 Sep 2007 23:12:00 +0000 (+0000) Subject: There has to be copy of all config headers for kernel build too. X-Git-Tag: v0.1~96 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/commitdiff_plain/d2a88ab4e96f2b861f58890e0f5cf584b88bd15c There has to be copy of all config headers for kernel build too. The previous solution has generated config files when they have been required by kernel objects build. It is not possible now. The kernel config headers are generated only, if there is some kernel related activity expected in the directory. There could be problem if only kernel configs should be build in some directory. darcs-hash:20070919231226-ff715-35ae6b751ff0befe4a96a96feed017c25e82799e.gz --- diff --git a/snippets/config_h b/snippets/config_h index 6f23528..03b65bf 100644 --- a/snippets/config_h +++ b/snippets/config_h @@ -54,10 +54,27 @@ config_h_stamp_files = $(addprefix $(USER_OBJS_DIR)/,$(notdir $(addsuffix .stamp # Add some hooks to standard passes include-pass-local: $(config_h_stamp_files) +ifneq ($(KERN_CONFIG_HEADERS_REQUIRED),) + +ifdef LOCAL_CONFIG_H +$(eval $(call BUILD_CONFIG_H_template,$(KERN_OBJS_DIR),$(KERN_OBJS_DIR)/$(LOCAL_CONFIG_H),default_CONFIG,_LOCAL_CONFIG_H) ) +endif + +$(foreach confh,$(config_include_HEADERS),$(eval $(call BUILD_CONFIG_H_template,$(KERN_OBJS_DIR),$(addprefix $(KERN_INCLUDE_DIR)/,$(confh)),$(basename $(notdir $(confh)))_DEFINES,\ +_$(basename $(notdir $(confh)))_H \ +))) + +kern_config_h_stamp_files = $(addprefix $(KERN_OBJS_DIR)/,$(notdir $(addsuffix .stamp,$(config_include_HEADERS) $(LOCAL_CONFIG_H)))) + +# Add some hooks to standard passes +include-pass-local: $(kern_config_h_stamp_files) + +endif + clean-local: clean-local-config-h clean-local-config-h: - @$(foreach confh,$(config_h_stamp_files),\ + @$(foreach confh,$(config_h_stamp_files) $(kern_config_h_stamp_files),\ if [ -e $(confh) ] ; then rm $(confh) ; fi ; \ ) diff --git a/snippets/linux b/snippets/linux index 5904859..eb69d87 100644 --- a/snippets/linux +++ b/snippets/linux @@ -536,6 +536,11 @@ endif #===================================================================== +# Kernel requires its own set of configuration header-files +ifneq ($(kernel_LIBRARIES)$(rtlinux_LIBRARIES),$(kernel_MODULES)$(rtlinux_MODULES),$(kernel_INCLUDES),$(rtlinux_INCLUDES)) +KERN_CONFIG_HEADERS_REQUIRED = y +endif + $(eval $(call omk_pass_template, kernel-lib-pass,$(KERN_OBJS_DIR),KERN_RULE_TEMPLATES=y,$(kernel_LIBRARIES)$(rtlinux_LIBRARIES))) $(eval $(call omk_pass_template, kernel-mod-pass,$(KERN_OBJS_DIR),KERN_RULE_TEMPLATES=y,$(kernel_MODULES)$(rtlinux_MODULES)))