INTEGRATION: CWS sdk02 (1.1.2); FILE ADDED

2003/05/21 13:34:55 jsc 1.1.2.3: #109627# insert aidans changes
2003/05/14 11:03:36 jsc 1.1.2.2: #109045# insert JAVAC_FLAGS option
2003/05/09 11:57:54 jsc 1.1.2.1: #109045# insert new and remove example zip file
This commit is contained in:
Vladimir Glazounov 2003-06-10 09:36:13 +00:00
parent f7eaec41eb
commit 83f77b1850

View file

@ -0,0 +1,98 @@
# Builds the Java FlatXMLFilter component example of the Developers Guide.
PRJ=../../../../..
SETTINGS=$(PRJ)/settings
include $(SETTINGS)/settings.mk
include $(SETTINGS)/std.mk
include $(SETTINGS)/dk.mk
# Define non-platform/compiler specific settings
COMPONENT_NAME=FlatXmlFilter_java
OUT_COMP_CLASS = $(OUT_CLASS)/$(COMPONENT_NAME)
OUT_COMP_GEN = $(OUT_MISC)/$(COMPONENT_NAME)
COMPONENT_PACKAGE = $(OUT_BIN)/$(COMPONENT_NAME).uno.zip
COMPONENT_PACKAGE_URL = $(subst \\,\,"$(COMPONENT_PACKAGE_DIR)$(PS)$(COMPONENT_NAME).uno.zip")
COMPONENT_JAR_NAME = $(COMPONENT_NAME).uno.jar
COMPONENT_JAR = $(OUT_CLASS)/$(COMPONENT_JAR_NAME)
COMPONENT_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMPONENT_NAME).uno.Manifest
REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(COMPONENT_NAME)_register_component.flag
JAVAFILES = \
FlatXml.java \
CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
#$(COMPONENT_NAME)_CLASSFILES = FlatXml.class FlatXml$(dlr)_FlatXml.class
$(COMPONENT_NAME)_CLASSFILES = *.class
SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(OFFICE_CLASSES_DIR)/jurt.jar\
$(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/unoil.jar\
$(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/ridl.jar\
$(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/sandbox.jar\
$(PATH_SEPARATOR)$(OFFICE_CLASSES_DIR)/juh.jar\
$(PATH_SEPARATOR)$(OUT_COMP_CLASS))
# Targets
.PHONY: ALL
ALL : \
FlatXmlFilterJavaExample
include $(SETTINGS)/stdtarget.mk
$(OUT_COMP_CLASS)/%.Manifest :
-$(MKDIR) $(subst /,$(PS),$(@D))
@echo RegistrationClassName: FlatXml> $@
$(CLASSFILES) : $(JAVAFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
javac $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
$(OUT_CLASS)/%.jar : $(OUT_COMP_CLASS)/%.Manifest $(CLASSFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
cd $(OUT_COMP_CLASS) && jar cvfm ../$(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
$(OUT_BIN)/%.zip : TypeDetection.xcu $(OUT_CLASS)/%.jar
-$(MKDIR) $(subst /,$(PS),$(@D))
$(COPY) $< $(subst /,$(PS),$(OUT_CLASS))
cd $(OUT_CLASS) && jar cvfM ../bin/$(@F) $(^F)
$(DEL) $(subst /,$(PS),$(OUT_CLASS)/$<)
$(REGISTERFLAG) : $(COMPONENT_PACKAGE)
ifneq "$(SDK_AUTO_DEPLOYMENT)" ""
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(DEL) $(subst /,$(PS),$@)
$(DEPLOYTOOL) $(COMPONENT_PACKAGE_URL)
@echo flagged > $(subst /,$(PS),$@)
else
@echo --------------------------------------------------------------------------------
@echo If you want to install your component automatically, please set the environment
@echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
@echo possible if no office instance is running.
@echo --------------------------------------------------------------------------------
endif
FlatXmlFilterJavaExample : $(REGISTERFLAG)
@echo --------------------------------------------------------------------------------
@echo The Java FlatXmlFilter component was installed if SDK_AUTO_DEPLOYMENT = YES.
@echo You can use this filter component inside your office installation.
@echo --------------------------------------------------------------------------------
%.run: $(OUT_COMP_CLASS)/%.class
java -classpath "$(SDK_CLASSPATH)" $(basename $@)
%.local: $(OUT_COMP_CLASS)/%.class
java -classpath "$(SDK_CLASSPATH)" $(basename $@) local
.PHONY: clean
clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
-$(DEL) $(subst /,$(PS),$(COMPONENT_PACKAGE_URL))
-$(DEL) $(subst /,$(PS),$(COMPONENT_JAR))
-$(DEL) $(subst /,$(PS),$(REGISTERFLAG))