diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-11-06 14:07:59 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-11-06 14:07:59 +0000 |
commit | 3a5190b782494192a8e573019ccfcc3b64ca5062 (patch) | |
tree | 83e8c4b2671fb9fcfb1c24b614e2949ce2c36202 | |
parent | 88a569437a647096a34cc335f1ad1699ecf39491 (diff) |
INTEGRATION: CWS jsc14 (1.16.8); FILE MERGED
2006/10/30 11:09:45 jsc 1.16.8.1: #i70996# exchange the makefile
-rw-r--r-- | odk/examples/java/MinimalComponent/Makefile | 67 |
1 files changed, 50 insertions, 17 deletions
diff --git a/odk/examples/java/MinimalComponent/Makefile b/odk/examples/java/MinimalComponent/Makefile index f359b65c9913..d9101d96d95f 100644 --- a/odk/examples/java/MinimalComponent/Makefile +++ b/odk/examples/java/MinimalComponent/Makefile @@ -2,9 +2,9 @@ # # $RCSfile: Makefile,v $ # -# $Revision: 1.16 $ +# $Revision: 1.17 $ # -# last change: $Author: kz $ $Date: 2006-10-04 16:22:29 $ +# last change: $Author: kz $ $Date: 2006-11-06 15:07:59 $ # # The Contents of this file are made available subject to the terms of # the BSD license. @@ -38,9 +38,9 @@ # #************************************************************************** -# Builds the License Test component example of the SDK. +# Builds the Java Minimal component example of the SDK. -PRJ=../../../.. +PRJ=../../.. SETTINGS=$(PRJ)/settings include $(SETTINGS)/settings.mk @@ -51,31 +51,36 @@ include $(SETTINGS)/dk.mk # we use the sample directory name dor separating this example # from others in the output directory -SAMPLE_NAME=LicenseTest +SAMPLE_NAME=MinimalComponent SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME) SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME) -COMP_NAME=LicenseTest +COMP_NAME=MinimalComponent COMP_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP_NAME) COMP_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP_NAME) COMP_RDB_NAME=$(COMP_NAME).uno.rdb COMP_RDB=$(COMP_GEN_OUT)/$(COMP_RDB_NAME) -COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT) -COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)") +COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOPKG_EXT) +COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOPKG_EXT)") COMP_JAR_NAME=$(COMP_NAME).uno.jar COMP_JAR=$(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME) COMP_JAR_MANIFEST=$(COMP_GEN_OUT)/$(COMP_NAME).uno.Manifest COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag -COMP_LOCAL_FILES = description.xml registration/license_de.txt registration/license_en_US.txt -IDLFILES = LicenseTest.idl +APP1_NAME=TestMinimalComponent +APP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME) +APP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP1_NAME) +APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar +APP1_JAR_MANIFEST=$(APP1_GEN_OUT)/$(APP1_NAME).mf + +IDLFILES = MinimalComponent.idl # normally the idl file should be stored in a directory tree fitting the module structure, # for the example we know the module structure PACKAGE = org/openoffice -COMP_JAVAFILES = LicenseTest.java +COMP_JAVAFILES = MinimalComponent.java COMP_CLASSFILES = $(patsubst %.java,$(COMP_CLASS_OUT)/%.class,$(COMP_JAVAFILES)) GEN_CLASSFILES = $(patsubst %.idl,$(SAMPLE_CLASS_OUT)/$(PACKAGE)/%.class,$(IDLFILES)) @@ -93,7 +98,7 @@ SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLA # Targets .PHONY: ALL -ALL : JavaLicenseTestExample +ALL : JavaMinimalComponentExample include $(SETTINGS)/stdtarget.mk @@ -120,6 +125,27 @@ $(COMP_CLASS_OUT)/%.class : %.java $(GEN_CLASSFILES) -$(MKDIR) $(subst /,$(PS),$(@D)) $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP_CLASS_OUT) $< +# rule for example application class files +$(APP1_CLASS_OUT)/%.class : %.java $(GEN_CLASSFILES) + -$(MKDIR) $(subst /,$(PS),$(@D)) + $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $< + +# rule for client/example application manifest file +$(APP1_GEN_OUT)/%.mf : + -$(MKDIR) $(subst /,$(PS),$(@D)) + @echo Main-Class: com.sun.star.lib.loader.Loader> $@ + $(ECHOLINE)>> $@ + @echo Name: com/sun/star/lib/loader/Loader.class>> $@ + @echo Application-Class: $*>> $@ + +# rule for client/example application jar file +$(APP1_JAR) : $(APP1_JAR_MANIFEST) $(APP1_CLASS_OUT)/$(APP1_NAME).class $(GEN_CLASSFILES) + -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) + -$(MKDIR) $(subst /,$(PS),$(@D)) + $(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) . + +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(GEN_CLASSFILENAMES) + +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) + # rule for component jar file $(COMP_JAR) : $(COMP_JAR_MANIFEST) $(COMP_CLASSFILES) -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) @@ -140,14 +166,13 @@ $(COMP_GEN_OUT)/%/manifest.xml : @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ # rule for component package file -$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_LOCAL_FILES) +$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) -$(MKDIR) $(subst /,$(PS),$(@D)) cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) ../../../bin/$(@F) $(COMP_RDB_NAME) cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_JAR_NAME) cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml - $(SDK_ZIP) -u $@ $(COMP_LOCAL_FILES) - + $(COMP_REGISTERFLAG) : $(COMP_PACKAGE) ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) @@ -162,12 +187,20 @@ else @echo -------------------------------------------------------------------------------- endif -JavaLicenseTestExample : $(COMP_REGISTERFLAG) +JavaMinimalComponentExample : $(COMP_REGISTERFLAG) $(APP1_JAR) @echo -------------------------------------------------------------------------------- + @echo Please use the following command to execute the example! + @echo - + @echo $(MAKE) $(APP1_NAME).run + @echo ------ @echo The $(COMP_NAME) component was installed if SDK_AUTO_DEPLOYMENT = YES. - @echo This extension demonstrates the $(QM)Simple License$(QM) feature. + @echo You can use this component inside your office installation, see the example + @echo description. @echo -------------------------------------------------------------------------------- +%.run: $(SAMPLE_CLASS_OUT)/%.jar + $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< + .PHONY: clean clean : -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) |