# Syntax: $(call include-pass-template,<include dir>,<keyword>)
define include-pass-template
- @$(foreach f, $($(2)_HEADERS), cmp --quiet $(SOURCES_DIR)/$(f) $(1)/$(notdir $(f)) \
- || $(call cp_cmd,$(SOURCES_DIR)/$(f),$(1)/$(notdir $(f))) || exit 1 ; )
- @$(foreach f, $($(2)_GEN_HEADERS), cmp --quiet $(f) $(1)/$(notdir $(f)) \
- || $(call cp_cmd,$(LOCAL_BUILD_DIR)/$(f),$(1)/$(notdir $(f))) || exit 1 ; ) # FIXME: Use correct build dir, then document it
- @$(foreach f, $(nobase_$(2)_HEADERS), cmp --quiet $(SOURCES_DIR)/$(f) $(1)/$(f) \
- || ( mkdir -p $(1)/$(dir $(f)) && $(call cp_cmd,$(SOURCES_DIR)/$(f),$(1)/$(f)) ) || exit 1 ; )
- @$(foreach f, $(renamed_$(2)_HEADERS), \
- srcfname=`echo '$(f)' | sed -e 's/^\(.*\)->.*$$/\1/'` ; destfname=`echo '$(f)' | sed -e 's/^.*->\(.*\)$$/\1/'` ; \
- cmp --quiet $(SOURCES_DIR)/$${srcfname} $(1)/$${destfname} \
- || ( mkdir -p `dirname $(1)/$${destfname}` && $(call cp_cmd,$(SOURCES_DIR)/$${srcfname},$(1)/$${destfname}) ) || exit 1 ; )
+include-pass-local: include-pass-local-$(2)
+include-pass-local-$(2): $$($(2)_GEN_HEADERS) $$(foreach f,$$(renamed_$(2)_GEN_HEADERS),$$(shell echo '$$(f)' | sed -e 's/^\(.*\)->.*$$$$/\1/'))
+ @$$(foreach f, $$($(2)_HEADERS), cmp --quiet $$(SOURCES_DIR)/$$(f) $(1)/$$(notdir $$(f)) \
+ || $$(call cp_cmd,$$(SOURCES_DIR)/$$(f),$(1)/$$(notdir $$(f))) || exit 1 ; )
+ @$$(foreach f, $$($(2)_GEN_HEADERS), cmp --quiet $$(f) $(1)/$$(notdir $$(f)) \
+ || $$(call cp_cmd,$$(LOCAL_BUILD_DIR)/$$(f),$(1)/$$(notdir $$(f))) || exit 1 ; ) # FIXME: Use correct build dir, then document it
+ @$$(foreach f, $$(nobase_$(2)_HEADERS), cmp --quiet $$(SOURCES_DIR)/$$(f) $(1)/$$(f) \
+ || ( mkdir -p $(1)/$$(dir $$(f)) && $$(call cp_cmd,$$(SOURCES_DIR)/$$(f),$(1)/$$(f)) ) || exit 1 ; )
+ @$$(foreach f, $$(renamed_$(2)_HEADERS), \
+ srcfname=`echo '$$(f)' | sed -e 's/^\(.*\)->.*$$$$/\1/'` ; destfname=`echo '$$(f)' | sed -e 's/^.*->\(.*\)$$$$/\1/'` ; \
+ cmp --quiet $$(SOURCES_DIR)/$$$${srcfname} $(1)/$$$${destfname} \
+ || ( mkdir -p `dirname $(1)/$$$${destfname}` && $$(call cp_cmd,$$(SOURCES_DIR)/$$$${srcfname},$(1)/$$$${destfname}) ) || exit 1 ; )
+ @$$(foreach f, $$(renamed_$(2)_GEN_HEADERS), \
+ srcfname=`echo '$$(f)' | sed -e 's/^\(.*\)->.*$$$$/\1/'` ; destfname=`echo '$$(f)' | sed -e 's/^.*->\(.*\)$$$$/\1/'` ; \
+ cmp --quiet $$$${srcfname} $(1)/$$$${destfname} \
+ || ( mkdir -p `dirname $(1)/$$$${destfname}` && $$(call cp_cmd,$$(LOCAL_BUILD_DIR)/$$$${srcfname},$(1)/$$$${destfname}) ) || exit 1 ; )
endef
# Local Variables:
install-local: # TODO
-include-pass-local: $(include_GEN_HEADERS)
- $(call include-pass-template,$(USER_INCLUDE_DIR),include)
- $(call include-pass-template,$(KERN_INCLUDE_DIR),kernel)
+$(eval $(call include-pass-template,$(USER_INCLUDE_DIR),include))
+$(eval $(call include-pass-template,$(KERN_INCLUDE_DIR),kernel))
ifeq ($(CONFIG_RTLINUX),y)
- $(call include-pass-template,$(KERN_INCLUDE_DIR),rtlinux)
+$(eval $(call include-pass-template,$(KERN_INCLUDE_DIR),rtlinux))
endif
+
ifdef USER_RULE_TEMPLATES
# User-space static libraries and applications object files
--- /dev/null
+module forb {
+
+ // Inter-ORB protocol
+ module iop {
+ typedef long long object_key;
+
+ enum message_type {
+ REQUEST,
+ REPLY
+ };
+
+ struct version {
+ octet major, minor;
+ };
+
+ typedef octet message_flags;
+
+ const message_flags LITTLE_ENDIAN = 1;
+
+ struct message_header {
+ version proto_version;
+ octet message_type;
+ message_flags flags;
+ unsigned long message_size;
+ };
+ struct request_header {
+ object_key objkey;
+ short method_index;
+ };
+ typedef short reply_flags;
+ const reply_flags FLAG_EX = 1;
+ struct reply_header {
+ unsigned short flags;
+ };
+ };
+
+ __declspec(pidl) interface orb {
+ typedef string ObjectId;
+ void register_reference(in ObjectId id, in Object object);
+ Object resolve_reference(in ObjectId id);
+ };
+};