common/makefiles/IdlCompilation.gmk

changeset 839
174a54ce39c4
parent 768
dadf49495ab4
     1.1 --- a/common/makefiles/IdlCompilation.gmk	Wed Oct 09 18:51:32 2013 -0700
     1.2 +++ b/common/makefiles/IdlCompilation.gmk	Thu Oct 10 14:58:19 2013 +0200
     1.3 @@ -23,52 +23,52 @@
     1.4  # questions.
     1.5  #
     1.6  
     1.7 -PREFIXES=-pkgPrefix CORBA                org.omg \
     1.8 -	-pkgPrefix CosNaming             org.omg \
     1.9 -	-pkgPrefix CosTransactions       org.omg \
    1.10 -	-pkgPrefix CosTSInteroperation   org.omg \
    1.11 -	-pkgPrefix DynamicAny            org.omg \
    1.12 -	-pkgPrefix Dynamic               org.omg \
    1.13 -	-pkgPrefix IOP                   org.omg \
    1.14 -	-pkgPrefix Messaging             org.omg \
    1.15 -	-pkgPrefix PortableInterceptor   org.omg \
    1.16 -	-pkgPrefix PortableServer        org.omg \
    1.17 -	-pkgPrefix activation            com.sun.corba.se.spi \
    1.18 -	-pkgPrefix GIOP                  com.sun.corba.se \
    1.19 -	-pkgPrefix PortableActivationIDL com.sun.corba.se \
    1.20 -	-pkgPrefix messages              com.sun.corba.se 
    1.21 +PREFIXES=-pkgPrefix CORBA org.omg \
    1.22 +    -pkgPrefix CosNaming org.omg \
    1.23 +    -pkgPrefix CosTransactions org.omg \
    1.24 +    -pkgPrefix CosTSInteroperation org.omg \
    1.25 +    -pkgPrefix DynamicAny org.omg \
    1.26 +    -pkgPrefix Dynamic org.omg \
    1.27 +    -pkgPrefix IOP org.omg \
    1.28 +    -pkgPrefix Messaging org.omg \
    1.29 +    -pkgPrefix PortableInterceptor org.omg \
    1.30 +    -pkgPrefix PortableServer org.omg \
    1.31 +    -pkgPrefix activation com.sun.corba.se.spi \
    1.32 +    -pkgPrefix GIOP com.sun.corba.se \
    1.33 +    -pkgPrefix PortableActivationIDL com.sun.corba.se \
    1.34 +    -pkgPrefix messages com.sun.corba.se
    1.35  
    1.36  define add_idl_package
    1.37 -    # param 1 = MYPACKAGE
    1.38 -    # param 2 = src root
    1.39 -    # param 3 = gensrc root
    1.40 -    # param 4 = source idl to compile
    1.41 -    # param 5 = target idl package
    1.42 -    # param 6 = delete these files that were output from the idlj
    1.43 -    # param 7 = idls that match these patterns should be compiled with -oldImplBase
    1.44 -    # param 8 = the idlj command
    1.45 -    # Save the generated java files to a temporary directory so
    1.46 -    # that we can find them and create proper dependencies.
    1.47 -    # After that, we move them to the real gensrc target dir.
    1.48 -    $4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
    1.49 -    ifneq ($$(filter $7,$4),)
    1.50 -        $4_OLDIMPLBASE:=-oldImplBase
    1.51 -        $4_OLDIMPLBASE_MSG:=with -oldImplBase
    1.52 -    endif
    1.53 -    $5 : $4
    1.54 +  # param 1 = MYPACKAGE
    1.55 +  # param 2 = src root
    1.56 +  # param 3 = gensrc root
    1.57 +  # param 4 = source idl to compile
    1.58 +  # param 5 = target idl package
    1.59 +  # param 6 = delete these files that were output from the idlj
    1.60 +  # param 7 = idls that match these patterns should be compiled with -oldImplBase
    1.61 +  # param 8 = the idlj command
    1.62 +  # Save the generated java files to a temporary directory so
    1.63 +  # that we can find them and create proper dependencies.
    1.64 +  # After that, we move them to the real gensrc target dir.
    1.65 +  $4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
    1.66 +  ifneq ($$(filter $7,$4),)
    1.67 +    $4_OLDIMPLBASE:=-oldImplBase
    1.68 +    $4_OLDIMPLBASE_MSG:=with -oldImplBase
    1.69 +  endif
    1.70 +  $5 : $4
    1.71  	$(MKDIR) -p $3/$$($4_TMPDIR)
    1.72  	$(RM) -rf $3/$$($4_TMPDIR)
    1.73  	$(MKDIR) -p $(dir $5)
    1.74 -	$(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4) 
    1.75 +	$(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4)
    1.76  	$8 -td $3/$$($4_TMPDIR) \
    1.77 -		-i $2/org/omg/CORBA \
    1.78 -		-i $2/org/omg/PortableInterceptor \
    1.79 -		-i $2/org/omg/PortableServer \
    1.80 -		-D CORBA3 -corba 3.0 \
    1.81 -		-fall \
    1.82 -		$$($4_OLDIMPLBASE) \
    1.83 -		$(PREFIXES) \
    1.84 -		$4
    1.85 +	    -i $2/org/omg/CORBA \
    1.86 +	    -i $2/org/omg/PortableInterceptor \
    1.87 +	    -i $2/org/omg/PortableServer \
    1.88 +	    -D CORBA3 -corba 3.0 \
    1.89 +	    -fall \
    1.90 +	    $$($4_OLDIMPLBASE) \
    1.91 +	    $(PREFIXES) \
    1.92 +	    $4
    1.93  	$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
    1.94  	$(CP) -r $3/$$($4_TMPDIR)/* $3
    1.95  	($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
    1.96 @@ -76,31 +76,31 @@
    1.97  endef
    1.98  
    1.99  define SetupIdlCompilation
   1.100 -# param 1 is for example BUILD_IDLS
   1.101 -# param 2,3,4,5,6,7,8 are named args.
   1.102 -#    IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
   1.103 -$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   1.104 -$(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   1.105 -$(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
   1.106 +  # param 1 is for example BUILD_IDLS
   1.107 +  # param 2,3,4,5,6,7,8 are named args.
   1.108 +  #   IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
   1.109 +  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   1.110 +  $(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   1.111 +  $(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
   1.112  
   1.113 -# Find all existing java files and existing class files.
   1.114 -$$(eval $$(call MakeDir,$$($1_BIN)))
   1.115 -$1_SRCS     := $$(shell find $$($1_SRC) -name "*.idl")
   1.116 -$1_BINS     := $$(shell find $$($1_BIN) -name "*.java")
   1.117 -# Prepend the source/bin path to the filter expressions.
   1.118 -$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
   1.119 -$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
   1.120 -$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
   1.121 -$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
   1.122 -$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
   1.123 -# Now remove unwanted java/class files.
   1.124 -$1_SRCS     := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
   1.125 -$1_SRCS     := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
   1.126 -$1_BINS     := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
   1.127 -$1_BINS     := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
   1.128 -$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
   1.129 -# Now create the dependencies for each idl target.
   1.130 -$$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
   1.131 +  # Find all existing java files and existing class files.
   1.132 +  $$(eval $$(call MakeDir,$$($1_BIN)))
   1.133 +  $1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
   1.134 +  $1_BINS := $$(shell find $$($1_BIN) -name "*.java")
   1.135 +  # Prepend the source/bin path to the filter expressions.
   1.136 +  $1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
   1.137 +  $1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
   1.138 +  $1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
   1.139 +  $1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
   1.140 +  $1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
   1.141 +  # Now remove unwanted java/class files.
   1.142 +  $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
   1.143 +  $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
   1.144 +  $1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
   1.145 +  $1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
   1.146 +  $1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
   1.147 +  # Now create the dependencies for each idl target.
   1.148 +  $$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
   1.149  endef
   1.150  
   1.151  .SUFFIXES: .java .class .package

mercurial