summaryrefslogtreecommitdiff
path: root/odk/examples/java/Spreadsheet/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/java/Spreadsheet/Makefile')
-rw-r--r--odk/examples/java/Spreadsheet/Makefile58
1 files changed, 30 insertions, 28 deletions
diff --git a/odk/examples/java/Spreadsheet/Makefile b/odk/examples/java/Spreadsheet/Makefile
index 4a251ae2..52d73a44 100644
--- a/odk/examples/java/Spreadsheet/Makefile
+++ b/odk/examples/java/Spreadsheet/Makefile
@@ -53,16 +53,17 @@ APP2_JAR=$(OUT_COMP_CLASS)/$(APP2_NAME).jar
APP3_NAME=ChartTypeChange
APP3_JAR=$(OUT_COMP_CLASS)/$(APP3_NAME).jar
-COMPONENT_NAME=CalcAddins
-COMPONENT_RDB_NAME=$(COMPONENT_NAME).uno.rdb
-COMPONENT_RDB=$(OUT_COMP_GEN)/$(COMPONENT_RDB_NAME)
-COMPONENT_PACKAGE=$(OUT_BIN)/$(COMPONENT_NAME).$(UNOOXT_EXT)
-COMPONENT_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT_NAME).$(UNOOXT_EXT)")
-COMPONENT_JAR_NAME=$(COMPONENT_NAME).uno.jar
-COMPONENT_JAR=$(OUT_COMP_CLASS)/$(COMPONENT_JAR_NAME)
-COMPONENT_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMPONENT_NAME).uno.Manifest
-COMPONENT_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMPONENT_NAME)/META-INF/manifest.xml
-REGISTERFLAG=$(OUT_MISC)$(PS)java_$(COMPONENT_NAME)_register_component.flag
+COMP_NAME=CalcAddins
+COMP_RDB_NAME=$(COMP_NAME).uno.rdb
+COMP_RDB=$(OUT_COMP_GEN)/$(COMP_RDB_NAME)
+COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
+COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
+COMP_JAR_NAME=$(COMP_NAME).uno.jar
+COMP_JAR=$(OUT_COMP_CLASS)/$(COMP_JAR_NAME)
+COMP_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
+COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
+COMP_REGISTERFLAG=$(OUT_MISC)$(PS)java_$(COMP_NAME)_register_component.flag
+COMP_COMPONENTS=$(COMP_NAME).components
IDLFILES = XCalcAddins.idl
@@ -80,11 +81,11 @@ GENURDFILES = $(patsubst %.idl,$(OUT_COMP_GEN)/%.urd,$(IDLFILES))
COMPCLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(COMPJAVAFILES))
#COMPCLASSFILES += $(subst $(OUT_COMP_GEN),$(OUT_COMP_CLASS),$(GENJAVAFILES:.java=.class))
-$(COMPONENT_NAME)_CLASSFILES = $(COMPONENT_NAME).class \
- $(COMPONENT_NAME)$(QUOTE)$$_$(COMPONENT_NAME).class
+$(COMP_NAME)_CLASSFILES = $(COMP_NAME).class \
+ $(COMP_NAME)$(QUOTE)$$_$(COMP_NAME).class
-#$(COMPONENT_NAME)_CLASSFILES += $(subst $(OUT_COMP_GEN)/,,$(GENJAVAFILES:.java=.class))
-$(COMPONENT_NAME)_CLASSFILES += $(subst $(OUT_COMP_CLASS)/,,$(GENCLASSFILES))
+#$(COMP_NAME)_CLASSFILES += $(subst $(OUT_COMP_GEN)/,,$(GENJAVAFILES:.java=.class))
+$(COMP_NAME)_CLASSFILES += $(subst $(OUT_COMP_CLASS)/,,$(GENCLASSFILES))
SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
$(PATH_SEPARATOR)$(OUT_COMP_CLASS))
@@ -110,10 +111,10 @@ $(OUT_COMP_GEN)/%.rdb : $(GENURDFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(REGMERGE) $@ /UCR $(GENURDFILES)
-#$(OUT_COMP_GEN)/%.java : $(COMPONENT_RDB)
-$(GENCLASSFILES) : $(COMPONENT_RDB)
+#$(OUT_COMP_GEN)/%.java : $(COMP_RDB)
+$(GENCLASSFILES) : $(COMP_RDB)
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GENTYPELIST) -O$(OUT_COMP_CLASS) $(COMPONENT_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
+ $(JAVAMAKER) -BUCR -nD $(GENTYPELIST) -O$(OUT_COMP_CLASS) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
$(OUT_COMP_CLASS)/%.class : %.java
-$(MKDIR) $(subst /,$(PS),$(@D))
@@ -139,7 +140,7 @@ $(OUT_COMP_CLASS)/%.jar : $(OUT_COMP_CLASS)/%.mf $(OUT_COMP_CLASS)/%.class
+$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
# rule for component jar file
-$(COMPONENT_JAR) : $(COMPONENT_MANIFESTFILE) $(COMPCLASSFILES)
+$(COMP_JAR) : $(COMP_MANIFESTFILE) $(COMPCLASSFILES)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
@@ -152,24 +153,25 @@ $(OUT_COMP_CLASS)/%/manifest.xml :
@echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
@echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
@echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
# rule for component package file
-$(COMPONENT_PACKAGE) : $(COMPONENT_RDB) $(COMPONENT_JAR) $(COMPONENT_UNOPKG_MANIFEST)
+$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_NAME).components
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
$(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_CLASS))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) ../../bin/$(@F) $(COMPONENT_RDB_NAME) $(COMPONENT_JAR_NAME)
+ $(SDK_ZIP) $@ -u $(COMP_NAME).components
+ cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(COMP_JAR_NAME)
cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_COMP_CLASS)/$(<F)))
-$(REGISTERFLAG) : $(COMPONENT_PACKAGE)
+$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMPONENT_PACKAGE_URL)
+ $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
@echo flagged > $(subst /,$(PS),$@)
else
@echo --------------------------------------------------------------------------------
@@ -183,7 +185,7 @@ $(APP1_JAR) : $(OUT_COMP_CLASS)/$(APP1_NAME).mf $(OUT_COMP_CLASS)/$(APP1_NAME).c
$(APP2_JAR) : $(OUT_COMP_CLASS)/$(APP2_NAME).mf $(OUT_COMP_CLASS)/$(APP2_NAME).class
$(APP3_JAR) : $(OUT_COMP_CLASS)/$(APP3_NAME).mf $(OUT_COMP_CLASS)/$(APP3_NAME).class
-$(EXAMPLE_NAME) : $(REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
+$(EXAMPLE_NAME) : $(COMP_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
@echo --------------------------------------------------------------------------------
@echo Please use the following command to execute the examples!
@echo -
@@ -202,12 +204,12 @@ $(EXAMPLE_NAME) : $(REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
%.run: $(OUT_COMP_CLASS)/%.jar
$(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $<
-CalcAddins.ods.load : $(REGISTERFLAG)
+CalcAddins.ods.load : $(COMP_REGISTERFLAG)
"$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
.PHONY: clean
clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_REGISTERFLAG)))