]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/commitdiff
frsh_configuration_parameters.h is now generated OMK
authorsojkam <sojkam@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Wed, 15 Oct 2008 13:01:35 +0000 (13:01 +0000)
committersojkam <sojkam@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Wed, 15 Oct 2008 13:01:35 +0000 (13:01 +0000)
This allows to have different configurations for different platforms (in
config.target) without modification of sources. Moreover, every developer can
modify default values (see config.omk-default) in his own config.omk.

The list of FRSH configuration parameters is automatically generated from the
original frsh_configuration_parameters.h.

git-svn-id: http://www.frescor.org/private/svn/frescor/frsh/trunk/include@1341 35b4ef3e-fd22-0410-ab77-dab3279adceb

Makefile.omk

index cab4696d13c7e2da4fa6af9557872f9c24bb7ffa..167e5a62b397e1cf4f5549fad2294a1de72fdb8a 100644 (file)
@@ -1,6 +1,12 @@
 include_HEADERS := $(notdir $(wildcard $(SOURCES_DIR)/*.h))
 
 ifeq ($(CONFIG_FRSH_FORB),y)
-UNWANTED_HEADERS = frsh_opaque_types.h
-include_HEADERS := $(filter-out $(UNWANTED_HEADERS),$(include_HEADERS))
+UNWANTED_HEADERS += frsh_opaque_types.h
 endif
+UNWANTED_HEADERS += frsh_configuration_parameters.h
+include_HEADERS := $(filter-out $(UNWANTED_HEADERS),$(include_HEADERS))
+
+default_CONFIG := $(shell grep '^\#define FRSH' $(SOURCES_DIR)/frsh_configuration_parameters.h|sed -e 's/\#define \([^ ]*\) *\(.*\)/\1=\2/' -e 's/ //g' -e 's|//.*||' -e 's|/\*.*\*/||g')
+
+config_include_HEADERS = frsh_configuration_parameters.h
+frsh_configuration_parameters_DEFINES := $(shell echo '$(default_CONFIG)' | sed -e 's/\([^=]*\)=[^ ]*/\1/g')