#*************************************************************************
#
# The Contents of this file are made available subject to the terms of
# the BSD license.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of sourcecode must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#**************************************************************************
# Builds the SpreadSheet examples of the Developers Guide.
PRJ=../../..
SETTINGS=$(PRJ)/settings
include $(SETTINGS)/settings.mk
include $(SETTINGS)/std.mk
# Define non-platform/compiler specific settings
SAMPLE_NAME=DevGuideSpreadsheetExamples
SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME)
SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME)
# 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/sheet/addin
$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag : $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT)
ifeq "$(SDK_AUTO_DEPLOYMENT)""YES"
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
$(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)")
@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
$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag : $(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT)
ifeq "$(SDK_AUTO_DEPLOYMENT)""YES"
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
$(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)")
@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
$(SAMPLE_NAME) : $(COMP1_REGISTERFLAG) $(COMP2_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR)
@echo --------------------------------------------------------------------------------
@echo Please use one of the following commands to execute the examples!
@echo -
@echo $(MAKE) $(APP1_NAME).run
@echo $(MAKE) $(APP2_NAME).run
@echo $(MAKE) $(APP3_NAME).run
@echo --------
@echo The "$(QM)$(COMP1_NAME)$(QM)" and "$(QM)$(COMP2_NAME)$(QM)" component are installed if
@echo SDK_AUTO_DEPLOYMENT = YES. You can use this components inside your office
@echo installation, see the example descriptions. You can also load the "$(QM)ExampleAddIn.ods$(QM)"
@echo document to see how the add-in functions can be used. For more details about the
@echo "$(QM)$(COMP2_NAME)$(QM)" component see the "$(QM)DataPilotReadme.txt"$(QM).
@echo -
@echo $(MAKE) ExampleAddIn.ods.load
@echo --------------------------------------------------------------------------------