]> rtime.felk.cvut.cz Git - omk.git/commitdiff
There has to be copy of all config headers for kernel build too.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Wed, 19 Sep 2007 23:12:00 +0000 (23:12 +0000)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Wed, 19 Sep 2007 23:12:00 +0000 (23:12 +0000)
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

snippets/config_h
snippets/linux

index 6f23528985776dd780bd4387ecd8b4457ecd758b..03b65bf216d1f6c420daf70daf72997d023644ab 100644 (file)
@@ -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 ; \
        )
 
index 5904859dd205a52580c7630c30c89300c84d927c..eb69d87fe5dc2b79a0a8eb0addc990192e25733b 100644 (file)
@@ -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)))