comparison make/common/RMICompilation.gmk @ 58498:3e6ad3a4a05d

manual merge with default
author vromero
date Tue, 22 Oct 2019 20:49:40 -0400
parents ef0cd710989f
children
comparison
equal deleted inserted replaced
6:03c293f3e79f 7:105238dd710b
33 # CLASSES_DIR:=Directory where to look for classes 33 # CLASSES_DIR:=Directory where to look for classes
34 # STUB_CLASSES_DIR:=Directory in where to put stub classes 34 # STUB_CLASSES_DIR:=Directory in where to put stub classes
35 # RUN_V11:=Set to run rmic with -v1.1 35 # RUN_V11:=Set to run rmic with -v1.1
36 # RUN_V12:=Set to run rmic with -v1.2 36 # RUN_V12:=Set to run rmic with -v1.2
37 # KEEP_GENERATED:=Set to keep generated sources around 37 # KEEP_GENERATED:=Set to keep generated sources around
38 # STUB_SOURCES_DIR:=Directory to put generated sources in
38 SetupRMICompilation = $(NamedParamsMacroTemplate) 39 SetupRMICompilation = $(NamedParamsMacroTemplate)
39 define SetupRMICompilationBody 40 define SetupRMICompilationBody
40 41
41 $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/_the.$1_rmic.generated 42 $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/_the.$1_rmic.generated
42 43
56 57
57 $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f)) 58 $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
58 $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES))) 59 $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
59 $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES))) 60 $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
60 61
61 ifneq (,$$($1_KEEP_GENERATED)) 62 ifneq ($$($1_KEEP_GENERATED), )
62 $1_ARGS += -keepgenerated 63 $1_ARGS += -keepgenerated
63 $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS)) 64 $1_JAVA_TARGETS := $$(subst .class,.java,$$($1_TARGETS))
65 ifneq ($$($1_STUB_SOURCES_DIR), )
66 # This is where the java files are created by rmic
67 $1_JAVA_TARGETS_REL := $$(subst $$($1_STUB_CLASSES_DIR),, $$($1_JAVA_TARGETS))
68 # This is where the caller wants the java files
69 $1_JAVA_TARGETS := $$(addprefix $$($1_STUB_SOURCES_DIR), $$($1_JAVA_TARGETS_REL))
70 endif
71 $1_TARGETS += $$($1_JAVA_TARGETS)
64 endif 72 endif
65 73
66 $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES)) 74 $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
67 75
68 $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES) 76 $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
70 $$($1_DEP_FILE): $$($1_CLASS_FILES) 78 $$($1_DEP_FILE): $$($1_CLASS_FILES)
71 $$(call LogInfo, Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES)) 79 $$(call LogInfo, Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES))
72 $$(call MakeDir, $$($1_STUB_CLASSES_DIR)) 80 $$(call MakeDir, $$($1_STUB_CLASSES_DIR))
73 $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \ 81 $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
74 -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \ 82 -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
75 if [ "x$$($1_ARGS2)" != "x" ]; then \ 83 $$(if $$($1_STUB_SOURCES_DIR), \
76 $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \ 84 $$(foreach f, $$($1_JAVA_TARGETS_REL), \
77 $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \ 85 $(MKDIR) -p $$(dir $$($1_STUB_SOURCES_DIR)/$$f) ; \
78 -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \ 86 $(MV) $$($1_STUB_CLASSES_DIR)/$$f $$($1_STUB_SOURCES_DIR)/$$f ; \
79 fi; \ 87 ) \
88 ) \
80 $(TOUCH) $$@ 89 $(TOUCH) $$@
81 90
82 91
83 $1 := $$($1_TARGETS) $$($1_DEP_FILE) 92 $1 := $$($1_TARGETS) $$($1_DEP_FILE)
84 93