]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/commitdiff
Added current (fixed) version of Makefile.rules which correctly supports IDL compilation
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 26 Aug 2008 15:53:34 +0000 (17:53 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 26 Aug 2008 15:53:34 +0000 (17:53 +0200)
Makefile.rules
forb-idl.idl [new file with mode: 0644]

index e8947ee032653d72122cb1de467c65f45541998d..c20f1190d933e391ba74c820edb065d9597670b2 100644 (file)
@@ -346,16 +346,22 @@ endif
 
 # 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:
@@ -1003,13 +1009,13 @@ check-dir:
 
 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
diff --git a/forb-idl.idl b/forb-idl.idl
new file mode 100644 (file)
index 0000000..2215b13
--- /dev/null
@@ -0,0 +1,42 @@
+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);
+       };
+};