fi
endef
-# Syntax: $(call CMETRIC_o_h_template,<object_file>,<target_header>)
-define CMETRIC_o_h_template
-$(2): $(1)
- @$(QUIET_CMD_ECHO) " CMETRIC $$@"
- $(Q)if [ -n `dirname $$@` ] ; then \
- if [ ! -e `dirname $$@` ] ; then \
- mkdir -p `dirname $$@` ; fi ; fi
- $(Q)echo >$$@.tmp '/* Automatically generated from $$< */'
- $(Q)echo >>$$@.tmp '/* Conditionals to control compilation */'
-# Bellow, the tricks with redirection are for shells without set -o pipefail
-# (see http://www.mail-archive.com/dash@vger.kernel.org/msg00149.html)
- $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) $$<; echo $$$$? >&4; }\
- | $(SED4OMK) -n 's/^ *0*\(0[0-9A-Fa-f]*\) *A *_cmetric2cond_\([A-Za-z_0-9]*\) */#define \2 0x\1/p' \
- | sort >>$$@.tmp` && exit $$$$status
- $(Q)echo >>$$@.tmp '/* Defines from the values defined to symbols in hexadecimal format */'
- $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) $$<; echo $$$$? >&4; }\
- | $(SED4OMK) -n 's/^ *0*\(0[0-9A-Fa-f]*\) *A *_cmetric2def_\([A-Za-z_0-9]*\) */#define \2 0x\1/p' \
- | sort >>$$@.tmp` && exit $$$$status
- $(Q)echo >>$$@.tmp '/* Defines from the values defined to symbols in decimal format */'
- $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) -td $$<; echo $$$$? >&4; }\
- | $(SED4OMK) -n 's/^ *0*\(0\|[1-9][0-9]*\) *A *_cmetric2defdec_\([A-Za-z_0-9]*\) */#define \2 \1/p' \
- | sort >>$$@.tmp` && exit $$$$status
- $(Q)mv $$@.tmp $$@
-endef
-
idl_COMPILE = $(IDL_COMPILER)
define COMPILE_idl_template
-library-pass-local: $(addprefix $(USER_INCLUDE_DIR)/,$(cmetric_include_HEADERS)) \
- $(lib_LIBRARIES:%=$(USER_LIB_DIR)/lib%.a) $(shared_LIBRARIES:%=$(USER_LIB_DIR)/lib%.so)
+library-pass-local: $(lib_LIBRARIES:%=$(USER_LIB_DIR)/lib%.a) $(shared_LIBRARIES:%=$(USER_LIB_DIR)/lib%.so)
binary-pass-local: $(bin_PROGRAMS:%=$(USER_BIN_DIR)/%) $(utils_PROGRAMS:%=$(USER_UTILS_DIR)/%) $(test_PROGRAMS:%=$(USER_TESTS_DIR)/%)
-# Special rules for CMETRIC generated headers
-
-$(foreach cmetrh,$(cmetric_include_HEADERS),$(eval $(call COMPILE_c_o_template,\
- $(SOURCES_DIR)/$($(basename $(notdir $(cmetrh)))_CMETRIC_SOURCES),\
- $($(basename $(notdir $(cmetrh)))_CMETRIC_SOURCES:%.c=%.o),)))
-$(foreach cmetrh,$(cmetric_include_HEADERS),$(eval $(call CMETRIC_o_h_template,\
- $($(basename $(notdir $(cmetrh)))_CMETRIC_SOURCES:%.c=%.o),\
- $(addprefix $(USER_INCLUDE_DIR)/,$(cmetrh)))))
-
-GEN_HEADERS+=$(cmetric_include_HEADERS:%=$(USER_INCLUDE_DIR)/%)
GEN_HEADERS+=$(filter %.h,$(USER_IDLS:%.idl=%.h))
# Generate rules for compilation of programs and libraries