1*122c3632SJürgen Schmidt#************************************************************** 2*122c3632SJürgen Schmidt# 3*122c3632SJürgen Schmidt# Licensed to the Apache Software Foundation (ASF) under one 4*122c3632SJürgen Schmidt# or more contributor license agreements. See the NOTICE file 5*122c3632SJürgen Schmidt# distributed with this work for additional information 6*122c3632SJürgen Schmidt# regarding copyright ownership. The ASF licenses this file 7*122c3632SJürgen Schmidt# to you under the Apache License, Version 2.0 (the 8*122c3632SJürgen Schmidt# "License"); you may not use this file except in compliance 9*122c3632SJürgen Schmidt# with the License. You may obtain a copy of the License at 10*122c3632SJürgen Schmidt# 11*122c3632SJürgen Schmidt# http://www.apache.org/licenses/LICENSE-2.0 12*122c3632SJürgen Schmidt# 13*122c3632SJürgen Schmidt# Unless required by applicable law or agreed to in writing, 14*122c3632SJürgen Schmidt# software distributed under the License is distributed on an 15*122c3632SJürgen Schmidt# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*122c3632SJürgen Schmidt# KIND, either express or implied. See the License for the 17*122c3632SJürgen Schmidt# specific language governing permissions and limitations 18*122c3632SJürgen Schmidt# under the License. 19cdf0e10cSrcweir# 20*122c3632SJürgen Schmidt#************************************************************** 21cdf0e10cSrcweir 22cdf0e10cSrcweir# Builds the SpreadSheet examples of the Developers Guide. 23cdf0e10cSrcweir 24cdf0e10cSrcweirPRJ=../../.. 25cdf0e10cSrcweirSETTINGS=$(PRJ)/settings 26cdf0e10cSrcweir 27cdf0e10cSrcweirinclude $(SETTINGS)/settings.mk 28cdf0e10cSrcweirinclude $(SETTINGS)/std.mk 29cdf0e10cSrcweirinclude $(SETTINGS)/dk.mk 30cdf0e10cSrcweir 31cdf0e10cSrcweir# Define non-platform/compiler specific settings 32cdf0e10cSrcweirSAMPLE_NAME=DevGuideSpreadsheetExamples 33cdf0e10cSrcweirSAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME) 34cdf0e10cSrcweirSAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME) 35cdf0e10cSrcweir 36cdf0e10cSrcweir# Example add-in component 37cdf0e10cSrcweirCOMP1_NAME=ExampleAddIn 38cdf0e10cSrcweirCOMP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP1_NAME) 39cdf0e10cSrcweirCOMP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP1_NAME) 40cdf0e10cSrcweirCOMP1_RDB_NAME=$(COMP1_NAME).uno.rdb 41cdf0e10cSrcweirCOMP1_RDB=$(COMP1_GEN_OUT)/$(COMP1_RDB_NAME) 42cdf0e10cSrcweirCOMP1_PACKAGE=$(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT) 43cdf0e10cSrcweirCOMP1_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)") 44cdf0e10cSrcweirCOMP1_JAR_NAME=$(COMP1_NAME).uno.jar 45cdf0e10cSrcweirCOMP1_JAR=$(SAMPLE_CLASS_OUT)/$(COMP1_JAR_NAME) 46cdf0e10cSrcweirCOMP1_MANIFESTFILE=$(COMP1_GEN_OUT)/$(COMP1_NAME).uno.Manifest 47cdf0e10cSrcweirCOMP1_UNOPKG_MANIFEST=$(COMP1_GEN_OUT)/$(COMP1_NAME)/META-INF/manifest.xml 48cdf0e10cSrcweirCOMP1_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag 49cdf0e10cSrcweirCOMP1_COMPONENTS=$(COMP1_NAME).components 50cdf0e10cSrcweir 51cdf0e10cSrcweir# Example DataPilot component 52cdf0e10cSrcweirCOMP2_NAME=ExampleDataPilotSource 53cdf0e10cSrcweirCOMP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP2_NAME) 54cdf0e10cSrcweirCOMP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP2_NAME) 55cdf0e10cSrcweirCOMP2_PACKAGE=$(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT) 56cdf0e10cSrcweirCOMP2_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)") 57cdf0e10cSrcweirCOMP2_JAR_NAME=$(COMP2_NAME).uno.jar 58cdf0e10cSrcweirCOMP2_JAR=$(SAMPLE_CLASS_OUT)/$(COMP2_JAR_NAME) 59cdf0e10cSrcweirCOMP2_MANIFESTFILE=$(COMP2_GEN_OUT)/$(COMP2_NAME).uno.Manifest 60cdf0e10cSrcweirCOMP2_UNOPKG_MANIFEST=$(COMP2_GEN_OUT)/$(COMP2_NAME)/META-INF/manifest.xml 61cdf0e10cSrcweirCOMP2_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag 62cdf0e10cSrcweirCOMP2_COMPONENTS=$(COMP2_NAME).components 63cdf0e10cSrcweir 64cdf0e10cSrcweir#REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(SAMPLE_NAME)_register_component.flag 65cdf0e10cSrcweir 66cdf0e10cSrcweirAPP1_NAME=GeneralTableSample 67cdf0e10cSrcweirAPP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME) 68cdf0e10cSrcweirAPP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP1_NAME) 69cdf0e10cSrcweirAPP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar 70cdf0e10cSrcweir 71cdf0e10cSrcweirAPP2_NAME=SpreadsheetSample 72cdf0e10cSrcweirAPP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP2_NAME) 73cdf0e10cSrcweirAPP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP2_NAME) 74cdf0e10cSrcweirAPP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar 75cdf0e10cSrcweir 76cdf0e10cSrcweirAPP3_NAME=ViewSample 77cdf0e10cSrcweirAPP3_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP3_NAME) 78cdf0e10cSrcweirAPP3_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP3_NAME) 79cdf0e10cSrcweirAPP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar 80cdf0e10cSrcweir 81cdf0e10cSrcweir 82cdf0e10cSrcweirCOMP1_IDLFILES = XExampleAddIn.idl 83cdf0e10cSrcweir 84cdf0e10cSrcweir# normally the idl file should be stored in a directory tree fitting the 85cdf0e10cSrcweir# module structure, for the example we know the module structure 86cdf0e10cSrcweirPACKAGE = org/openoffice/sheet/addin 87cdf0e10cSrcweir 88cdf0e10cSrcweirCOMP1_JAVAFILES = \ 89cdf0e10cSrcweir ExampleAddIn.java 90cdf0e10cSrcweir 91cdf0e10cSrcweirCOMP2_JAVAFILES = \ 92cdf0e10cSrcweir ExampleDataPilotSource.java 93cdf0e10cSrcweir 94cdf0e10cSrcweirAPP_JAVAFILES = \ 95cdf0e10cSrcweir SpreadsheetDocHelper.java 96cdf0e10cSrcweir 97cdf0e10cSrcweirAPP_CLASSFILES = $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES)) 98cdf0e10cSrcweirAPP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES)) 99cdf0e10cSrcweir 100cdf0e10cSrcweirCOMP1_GENCLASSFILES = $(patsubst %.idl,$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class,$(COMP1_IDLFILES)) 101cdf0e10cSrcweirCOMP1_GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(COMP1_IDLFILES))) 102cdf0e10cSrcweirCOMP1_GENURDFILES = $(patsubst %.idl,$(COMP1_GEN_OUT)/%.urd,$(COMP1_IDLFILES)) 103cdf0e10cSrcweir 104cdf0e10cSrcweirCOMP1_CLASSFILES = $(patsubst %.java,$(COMP1_CLASS_OUT)/%.class,$(COMP1_JAVAFILES)) 105cdf0e10cSrcweir 106cdf0e10cSrcweirCOMP2_CLASSFILES = $(patsubst %.java,$(COMP2_CLASS_OUT)/%.class,$(COMP2_JAVAFILES)) 107cdf0e10cSrcweir 108cdf0e10cSrcweir 109cdf0e10cSrcweirSDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\ 110cdf0e10cSrcweir $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\ 111cdf0e10cSrcweir $(PATH_SEPARATOR)$(COMP1_CLASS_OUT)\ 112cdf0e10cSrcweir $(PATH_SEPARATOR)$(COMP2_CLASS_OUT)\ 113cdf0e10cSrcweir $(PATH_SEPARATOR)$(APP1_CLASS_OUT)\ 114cdf0e10cSrcweir $(PATH_SEPARATOR)$(APP2_CLASS_OUT)\ 115cdf0e10cSrcweir $(PATH_SEPARATOR)$(APP3_CLASS_OUT)) 116cdf0e10cSrcweir 117cdf0e10cSrcweir 118cdf0e10cSrcweir# Targets 119cdf0e10cSrcweir.PHONY: ALL 120cdf0e10cSrcweirALL : $(SAMPLE_NAME) 121cdf0e10cSrcweir 122cdf0e10cSrcweirinclude $(SETTINGS)/stdtarget.mk 123cdf0e10cSrcweir 124cdf0e10cSrcweir$(SAMPLE_GEN_OUT)/%.Manifest : 125cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 126cdf0e10cSrcweir @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@ 127cdf0e10cSrcweir @echo RegistrationClassName: $(basename $(basename $(@F)))>> $@ 128cdf0e10cSrcweir 129cdf0e10cSrcweir# IDLs only for component 1 relevant 130cdf0e10cSrcweir$(COMP1_GEN_OUT)/%.urd : %.idl 131cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 132cdf0e10cSrcweir $(IDLC) -I. -I$(IDL_DIR) -O$(COMP1_GEN_OUT) $^ 133cdf0e10cSrcweir 134cdf0e10cSrcweir$(COMP1_RDB) : $(COMP1_GENURDFILES) 135cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 136cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 137cdf0e10cSrcweir $(REGMERGE) $@ /UCR $< 138cdf0e10cSrcweir 139cdf0e10cSrcweir$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class : $(COMP1_RDB) 140cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 141cdf0e10cSrcweir $(JAVAMAKER) -BUCR -nD $(COMP1_GENTYPELIST) -O$(COMP1_CLASS_OUT) $(COMP1_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES) 142cdf0e10cSrcweir 143cdf0e10cSrcweir$(COMP1_CLASSFILES) : $(COMP1_JAVAFILES) $(COMP1_GENCLASSFILES) 144cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 145cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP1_CLASS_OUT) $(COMP1_JAVAFILES) 146cdf0e10cSrcweir 147cdf0e10cSrcweir$(COMP2_CLASSFILES) : $(COMP2_JAVAFILES) 148cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 149cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP2_CLASS_OUT) $^ 150cdf0e10cSrcweir 151cdf0e10cSrcweir$(COMP1_JAR) : $(COMP1_MANIFESTFILE) $(COMP1_CLASSFILES) 152cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 153cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 154cdf0e10cSrcweir $(SDK_JAR) cvfm $@ $< -C $(COMP1_CLASS_OUT) . 155cdf0e10cSrcweir 156cdf0e10cSrcweir$(COMP2_JAR) : $(COMP2_MANIFESTFILE) $(COMP2_CLASSFILES) 157cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 158cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 159cdf0e10cSrcweir $(SDK_JAR) cvfm $@ $< -C $(COMP2_CLASS_OUT) . 160cdf0e10cSrcweir 161cdf0e10cSrcweir$(COMP1_UNOPKG_MANIFEST) : 162cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 163cdf0e10cSrcweir @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@ 164cdf0e10cSrcweir @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@ 165cdf0e10cSrcweir @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@ 166cdf0e10cSrcweir @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@ 167cdf0e10cSrcweir @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(COMP1_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@ 168cdf0e10cSrcweir @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@ 169cdf0e10cSrcweir @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP1_COMPONENTS)$(QM)"/$(CSEP)>> $@ 170cdf0e10cSrcweir @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ 171cdf0e10cSrcweir 172cdf0e10cSrcweir$(COMP2_UNOPKG_MANIFEST) : 173cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 174cdf0e10cSrcweir @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@ 175cdf0e10cSrcweir @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@ 176cdf0e10cSrcweir @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@ 177cdf0e10cSrcweir @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@ 178cdf0e10cSrcweir @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP2_COMPONENTS)$(QM)"/$(CSEP)>> $@ 179cdf0e10cSrcweir @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ 180cdf0e10cSrcweir 181cdf0e10cSrcweir$(COMP1_PACKAGE) : $(COMP1_RDB) $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST) $(COMP1_COMPONENTS) 182cdf0e10cSrcweir echo "####" $(@) 183cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 184cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 185cdf0e10cSrcweir $(SDK_ZIP) $@ $(COMP1_COMPONENTS) 186cdf0e10cSrcweir cd $(subst /,$(PS),$(COMP1_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(<F) 187cdf0e10cSrcweir cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP1_JAR_NAME) 188cdf0e10cSrcweir cd $(subst /,$(PS),$(COMP1_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml 189cdf0e10cSrcweir 190cdf0e10cSrcweir$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST) $(COMP2_COMPONENTS) 191cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 192cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 193cdf0e10cSrcweir $(SDK_ZIP) $@ $(COMP2_COMPONENTS) 194cdf0e10cSrcweir cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F) 195cdf0e10cSrcweir cd $(subst /,$(PS),$(COMP2_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml 196cdf0e10cSrcweir 197cdf0e10cSrcweir$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag : $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT) 198cdf0e10cSrcweirifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" 199cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 200cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 201cdf0e10cSrcweir $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)") 202cdf0e10cSrcweir @echo flagged > $(subst /,$(PS),$@) 203cdf0e10cSrcweirelse 204cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 205cdf0e10cSrcweir @echo If you want to install your component automatically, please set the environment 206cdf0e10cSrcweir @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only 207cdf0e10cSrcweir @echo possible if no office instance is running. 208cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 209cdf0e10cSrcweirendif 210cdf0e10cSrcweir 211cdf0e10cSrcweir$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag : $(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT) 212cdf0e10cSrcweirifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" 213cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 214cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 215cdf0e10cSrcweir $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)") 216cdf0e10cSrcweir @echo flagged > $(subst /,$(PS),$@) 217cdf0e10cSrcweirelse 218cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 219cdf0e10cSrcweir @echo If you want to install your component automatically, please set the environment 220cdf0e10cSrcweir @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only 221cdf0e10cSrcweir @echo possible if no office instance is running. 222cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 223cdf0e10cSrcweirendif 224cdf0e10cSrcweir 225cdf0e10cSrcweir$(APP_CLASSFILES) : $(APP_JAVAFILES) 226cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 227cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(APP_JAVAFILES) 228cdf0e10cSrcweir 229cdf0e10cSrcweir$(APP1_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 230cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 231cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $< 232cdf0e10cSrcweir 233cdf0e10cSrcweir$(APP2_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 234cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 235cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP2_CLASS_OUT) $< 236cdf0e10cSrcweir 237cdf0e10cSrcweir$(APP3_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 238cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 239cdf0e10cSrcweir $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP3_CLASS_OUT) $< 240cdf0e10cSrcweir 241cdf0e10cSrcweir$(SAMPLE_GEN_OUT)/%.mf : 242cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 243cdf0e10cSrcweir @echo Main-Class: com.sun.star.lib.loader.Loader> $@ 244cdf0e10cSrcweir $(ECHOLINE)>> $@ 245cdf0e10cSrcweir @echo Name: com/sun/star/lib/loader/Loader.class>> $@ 246cdf0e10cSrcweir @echo Application-Class: $(basename $(@F))>> $@ 247cdf0e10cSrcweir 248cdf0e10cSrcweir$(APP1_JAR) : $(APP1_GEN_OUT)/$(APP1_NAME).mf $(APP1_CLASS_OUT)/$(APP1_NAME).class $(APP_CLASSFILES) 249cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 250cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 251cdf0e10cSrcweir +$(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) . 252cdf0e10cSrcweir +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 253cdf0e10cSrcweir +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 254cdf0e10cSrcweir 255cdf0e10cSrcweir$(APP2_JAR) : $(APP2_GEN_OUT)/$(APP2_NAME).mf $(APP2_CLASS_OUT)/$(APP2_NAME).class $(APP_CLASSFILES) 256cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 257cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 258cdf0e10cSrcweir +$(SDK_JAR) cvfm $@ $< -C $(APP2_CLASS_OUT) . 259cdf0e10cSrcweir +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 260cdf0e10cSrcweir +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 261cdf0e10cSrcweir 262cdf0e10cSrcweir$(APP3_JAR) : $(APP3_GEN_OUT)/$(APP3_NAME).mf $(APP3_CLASS_OUT)/$(APP3_NAME).class $(APP_CLASSFILES) 263cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 264cdf0e10cSrcweir -$(MKDIR) $(subst /,$(PS),$(@D)) 265cdf0e10cSrcweir +$(SDK_JAR) cvfm $@ $< -C $(APP3_CLASS_OUT) . 266cdf0e10cSrcweir +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 267cdf0e10cSrcweir +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 268cdf0e10cSrcweir 269cdf0e10cSrcweir$(SAMPLE_NAME) : $(COMP1_REGISTERFLAG) $(COMP2_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) 270cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 271cdf0e10cSrcweir @echo Please use one of the following commands to execute the examples! 272cdf0e10cSrcweir @echo - 273cdf0e10cSrcweir @echo $(MAKE) $(APP1_NAME).run 274cdf0e10cSrcweir @echo $(MAKE) $(APP2_NAME).run 275cdf0e10cSrcweir @echo $(MAKE) $(APP3_NAME).run 276cdf0e10cSrcweir @echo -------- 277cdf0e10cSrcweir @echo The "$(QM)$(COMP1_NAME)$(QM)" and "$(QM)$(COMP2_NAME)$(QM)" component are installed if 278cdf0e10cSrcweir @echo SDK_AUTO_DEPLOYMENT = YES. You can use this components inside your office 279cdf0e10cSrcweir @echo installation, see the example descriptions. You can also load the "$(QM)ExampleAddIn.ods$(QM)" 280cdf0e10cSrcweir @echo document to see how the add-in functions can be used. For more details about the 281cdf0e10cSrcweir @echo "$(QM)$(COMP2_NAME)$(QM)" component see the "$(QM)DataPilotReadme.txt"$(QM). 282cdf0e10cSrcweir @echo - 283cdf0e10cSrcweir @echo $(MAKE) ExampleAddIn.ods.load 284cdf0e10cSrcweir @echo -------------------------------------------------------------------------------- 285cdf0e10cSrcweir 286cdf0e10cSrcweir%.run: $(SAMPLE_CLASS_OUT)/%.jar 287cdf0e10cSrcweir $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< 288cdf0e10cSrcweir 289cdf0e10cSrcweirExampleAddIn.ods.load : $(COMP1_REGISTERFLAG) 290cdf0e10cSrcweir "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@) 291cdf0e10cSrcweir 292cdf0e10cSrcweir.PHONY: clean 293cdf0e10cSrcweirclean : 294cdf0e10cSrcweir -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) 295cdf0e10cSrcweir -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT)) 296cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP1_PACKAGE_URL))) 297cdf0e10cSrcweir -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP2_PACKAGE_URL))) 298