1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22#************************************************************************* 23# 24# The Contents of this file are made available subject to the terms of 25# the BSD license. 26# 27# Copyright 2000, 2010 Oracle and/or its affiliates. 28# All rights reserved. 29# 30# Redistribution and use in source and binary forms, with or without 31# modification, are permitted provided that the following conditions 32# are met: 33# 1. Redistributions of source code must retain the above copyright 34# notice, this list of conditions and the following disclaimer. 35# 2. Redistributions in binary form must reproduce the above copyright 36# notice, this list of conditions and the following disclaimer in the 37# documentation and/or other materials provided with the distribution. 38# 3. Neither the name of Sun Microsystems, Inc. nor the names of its 39# contributors may be used to endorse or promote products derived 40# from this software without specific prior written permission. 41# 42# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 43# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 44# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 45# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 46# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 47# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 48# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 49# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 50# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 51# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 52# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 53# 54#************************************************************************** 55 56# Builds the SpreadSheet examples of the Developers Guide. 57 58PRJ=../../.. 59SETTINGS=$(PRJ)/settings 60 61include $(SETTINGS)/settings.mk 62include $(SETTINGS)/std.mk 63include $(SETTINGS)/dk.mk 64 65# Define non-platform/compiler specific settings 66SAMPLE_NAME=DevGuideSpreadsheetExamples 67SAMPLE_CLASS_OUT=$(OUT_CLASS)/$(SAMPLE_NAME) 68SAMPLE_GEN_OUT=$(OUT_MISC)/$(SAMPLE_NAME) 69 70# Example add-in component 71COMP1_NAME=ExampleAddIn 72COMP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP1_NAME) 73COMP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP1_NAME) 74COMP1_RDB_NAME=$(COMP1_NAME).uno.rdb 75COMP1_RDB=$(COMP1_GEN_OUT)/$(COMP1_RDB_NAME) 76COMP1_PACKAGE=$(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT) 77COMP1_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)") 78COMP1_JAR_NAME=$(COMP1_NAME).uno.jar 79COMP1_JAR=$(SAMPLE_CLASS_OUT)/$(COMP1_JAR_NAME) 80COMP1_MANIFESTFILE=$(COMP1_GEN_OUT)/$(COMP1_NAME).uno.Manifest 81COMP1_UNOPKG_MANIFEST=$(COMP1_GEN_OUT)/$(COMP1_NAME)/META-INF/manifest.xml 82COMP1_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag 83COMP1_COMPONENTS=$(COMP1_NAME).components 84 85# Example DataPilot component 86COMP2_NAME=ExampleDataPilotSource 87COMP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(COMP2_NAME) 88COMP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(COMP2_NAME) 89COMP2_PACKAGE=$(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT) 90COMP2_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)") 91COMP2_JAR_NAME=$(COMP2_NAME).uno.jar 92COMP2_JAR=$(SAMPLE_CLASS_OUT)/$(COMP2_JAR_NAME) 93COMP2_MANIFESTFILE=$(COMP2_GEN_OUT)/$(COMP2_NAME).uno.Manifest 94COMP2_UNOPKG_MANIFEST=$(COMP2_GEN_OUT)/$(COMP2_NAME)/META-INF/manifest.xml 95COMP2_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag 96COMP2_COMPONENTS=$(COMP2_NAME).components 97 98#REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(SAMPLE_NAME)_register_component.flag 99 100APP1_NAME=GeneralTableSample 101APP1_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP1_NAME) 102APP1_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP1_NAME) 103APP1_JAR=$(SAMPLE_CLASS_OUT)/$(APP1_NAME).jar 104 105APP2_NAME=SpreadsheetSample 106APP2_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP2_NAME) 107APP2_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP2_NAME) 108APP2_JAR=$(SAMPLE_CLASS_OUT)/$(APP2_NAME).jar 109 110APP3_NAME=ViewSample 111APP3_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(APP3_NAME) 112APP3_GEN_OUT=$(SAMPLE_GEN_OUT)/$(APP3_NAME) 113APP3_JAR=$(SAMPLE_CLASS_OUT)/$(APP3_NAME).jar 114 115 116COMP1_IDLFILES = XExampleAddIn.idl 117 118# normally the idl file should be stored in a directory tree fitting the 119# module structure, for the example we know the module structure 120PACKAGE = org/openoffice/sheet/addin 121 122COMP1_JAVAFILES = \ 123 ExampleAddIn.java 124 125COMP2_JAVAFILES = \ 126 ExampleDataPilotSource.java 127 128APP_JAVAFILES = \ 129 SpreadsheetDocHelper.java 130 131APP_CLASSFILES = $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES)) 132APP_CLASSNAMES = $(patsubst %.java,%.class,$(APP_JAVAFILES)) 133 134COMP1_GENCLASSFILES = $(patsubst %.idl,$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class,$(COMP1_IDLFILES)) 135COMP1_GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(PACKAGE)/% ,$(COMP1_IDLFILES))) 136COMP1_GENURDFILES = $(patsubst %.idl,$(COMP1_GEN_OUT)/%.urd,$(COMP1_IDLFILES)) 137 138COMP1_CLASSFILES = $(patsubst %.java,$(COMP1_CLASS_OUT)/%.class,$(COMP1_JAVAFILES)) 139 140COMP2_CLASSFILES = $(patsubst %.java,$(COMP2_CLASS_OUT)/%.class,$(COMP2_JAVAFILES)) 141 142 143SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\ 144 $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT)\ 145 $(PATH_SEPARATOR)$(COMP1_CLASS_OUT)\ 146 $(PATH_SEPARATOR)$(COMP2_CLASS_OUT)\ 147 $(PATH_SEPARATOR)$(APP1_CLASS_OUT)\ 148 $(PATH_SEPARATOR)$(APP2_CLASS_OUT)\ 149 $(PATH_SEPARATOR)$(APP3_CLASS_OUT)) 150 151 152# Targets 153.PHONY: ALL 154ALL : $(SAMPLE_NAME) 155 156include $(SETTINGS)/stdtarget.mk 157 158$(SAMPLE_GEN_OUT)/%.Manifest : 159 -$(MKDIR) $(subst /,$(PS),$(@D)) 160 @echo UNO-Type-Path: $(basename $(notdir $*)).uno.jar> $@ 161 @echo RegistrationClassName: $(basename $(basename $(@F)))>> $@ 162 163# IDLs only for component 1 relevant 164$(COMP1_GEN_OUT)/%.urd : %.idl 165 -$(MKDIR) $(subst /,$(PS),$(@D)) 166 $(IDLC) -I. -I$(IDL_DIR) -O$(COMP1_GEN_OUT) $^ 167 168$(COMP1_RDB) : $(COMP1_GENURDFILES) 169 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 170 -$(MKDIR) $(subst /,$(PS),$(@D)) 171 $(REGMERGE) $@ /UCR $< 172 173$(COMP1_CLASS_OUT)/$(PACKAGE)/%.class : $(COMP1_RDB) 174 -$(MKDIR) $(subst /,$(PS),$(@D)) 175 $(JAVAMAKER) -BUCR -nD $(COMP1_GENTYPELIST) -O$(COMP1_CLASS_OUT) $(COMP1_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES) 176 177$(COMP1_CLASSFILES) : $(COMP1_JAVAFILES) $(COMP1_GENCLASSFILES) 178 -$(MKDIR) $(subst /,$(PS),$(@D)) 179 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP1_CLASS_OUT) $(COMP1_JAVAFILES) 180 181$(COMP2_CLASSFILES) : $(COMP2_JAVAFILES) 182 -$(MKDIR) $(subst /,$(PS),$(@D)) 183 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(COMP2_CLASS_OUT) $^ 184 185$(COMP1_JAR) : $(COMP1_MANIFESTFILE) $(COMP1_CLASSFILES) 186 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 187 -$(MKDIR) $(subst /,$(PS),$(@D)) 188 $(SDK_JAR) cvfm $@ $< -C $(COMP1_CLASS_OUT) . 189 190$(COMP2_JAR) : $(COMP2_MANIFESTFILE) $(COMP2_CLASSFILES) 191 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 192 -$(MKDIR) $(subst /,$(PS),$(@D)) 193 $(SDK_JAR) cvfm $@ $< -C $(COMP2_CLASS_OUT) . 194 195$(COMP1_UNOPKG_MANIFEST) : 196 -$(MKDIR) $(subst /,$(PS),$(@D)) 197 @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@ 198 @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@ 199 @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@ 200 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@ 201 @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(COMP1_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@ 202 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@ 203 @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP1_COMPONENTS)$(QM)"/$(CSEP)>> $@ 204 @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ 205 206$(COMP2_UNOPKG_MANIFEST) : 207 -$(MKDIR) $(subst /,$(PS),$(@D)) 208 @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@ 209 @echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@ 210 @echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@ 211 @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@ 212 @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP2_COMPONENTS)$(QM)"/$(CSEP)>> $@ 213 @echo $(OSEP)/manifest:manifest$(CSEP) >> $@ 214 215$(COMP1_PACKAGE) : $(COMP1_RDB) $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST) $(COMP1_COMPONENTS) 216 echo "####" $(@) 217 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 218 -$(MKDIR) $(subst /,$(PS),$(@D)) 219 $(SDK_ZIP) $@ $(COMP1_COMPONENTS) 220 cd $(subst /,$(PS),$(COMP1_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(<F) 221 cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP1_JAR_NAME) 222 cd $(subst /,$(PS),$(COMP1_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml 223 224$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST) $(COMP2_COMPONENTS) 225 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 226 -$(MKDIR) $(subst /,$(PS),$(@D)) 227 $(SDK_ZIP) $@ $(COMP2_COMPONENTS) 228 cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F) 229 cd $(subst /,$(PS),$(COMP2_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml 230 231$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag : $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT) 232ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" 233 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 234 -$(MKDIR) $(subst /,$(PS),$(@D)) 235 $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)") 236 @echo flagged > $(subst /,$(PS),$@) 237else 238 @echo -------------------------------------------------------------------------------- 239 @echo If you want to install your component automatically, please set the environment 240 @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only 241 @echo possible if no office instance is running. 242 @echo -------------------------------------------------------------------------------- 243endif 244 245$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag : $(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT) 246ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES" 247 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 248 -$(MKDIR) $(subst /,$(PS),$(@D)) 249 $(DEPLOYTOOL) $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)") 250 @echo flagged > $(subst /,$(PS),$@) 251else 252 @echo -------------------------------------------------------------------------------- 253 @echo If you want to install your component automatically, please set the environment 254 @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only 255 @echo possible if no office instance is running. 256 @echo -------------------------------------------------------------------------------- 257endif 258 259$(APP_CLASSFILES) : $(APP_JAVAFILES) 260 -$(MKDIR) $(subst /,$(PS),$(@D)) 261 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SAMPLE_CLASS_OUT) $(APP_JAVAFILES) 262 263$(APP1_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 264 -$(MKDIR) $(subst /,$(PS),$(@D)) 265 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP1_CLASS_OUT) $< 266 267$(APP2_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 268 -$(MKDIR) $(subst /,$(PS),$(@D)) 269 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP2_CLASS_OUT) $< 270 271$(APP3_CLASS_OUT)/%.class : %.java $(APP_CLASSFILES) 272 -$(MKDIR) $(subst /,$(PS),$(@D)) 273 $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(APP3_CLASS_OUT) $< 274 275$(SAMPLE_GEN_OUT)/%.mf : 276 -$(MKDIR) $(subst /,$(PS),$(@D)) 277 @echo Main-Class: com.sun.star.lib.loader.Loader> $@ 278 $(ECHOLINE)>> $@ 279 @echo Name: com/sun/star/lib/loader/Loader.class>> $@ 280 @echo Application-Class: $(basename $(@F))>> $@ 281 282$(APP1_JAR) : $(APP1_GEN_OUT)/$(APP1_NAME).mf $(APP1_CLASS_OUT)/$(APP1_NAME).class $(APP_CLASSFILES) 283 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 284 -$(MKDIR) $(subst /,$(PS),$(@D)) 285 +$(SDK_JAR) cvfm $@ $< -C $(APP1_CLASS_OUT) . 286 +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 287 +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 288 289$(APP2_JAR) : $(APP2_GEN_OUT)/$(APP2_NAME).mf $(APP2_CLASS_OUT)/$(APP2_NAME).class $(APP_CLASSFILES) 290 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 291 -$(MKDIR) $(subst /,$(PS),$(@D)) 292 +$(SDK_JAR) cvfm $@ $< -C $(APP2_CLASS_OUT) . 293 +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 294 +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 295 296$(APP3_JAR) : $(APP3_GEN_OUT)/$(APP3_NAME).mf $(APP3_CLASS_OUT)/$(APP3_NAME).class $(APP_CLASSFILES) 297 -$(DEL) $(subst \\,\,$(subst /,$(PS),$@)) 298 -$(MKDIR) $(subst /,$(PS),$(@D)) 299 +$(SDK_JAR) cvfm $@ $< -C $(APP3_CLASS_OUT) . 300 +$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES) 301 +cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) uvf $(@F) $(APP_CLASSNAMES) 302 303$(SAMPLE_NAME) : $(COMP1_REGISTERFLAG) $(COMP2_REGISTERFLAG) $(APP1_JAR) $(APP2_JAR) $(APP3_JAR) 304 @echo -------------------------------------------------------------------------------- 305 @echo Please use one of the following commands to execute the examples! 306 @echo - 307 @echo $(MAKE) $(APP1_NAME).run 308 @echo $(MAKE) $(APP2_NAME).run 309 @echo $(MAKE) $(APP3_NAME).run 310 @echo -------- 311 @echo The "$(QM)$(COMP1_NAME)$(QM)" and "$(QM)$(COMP2_NAME)$(QM)" component are installed if 312 @echo SDK_AUTO_DEPLOYMENT = YES. You can use this components inside your office 313 @echo installation, see the example descriptions. You can also load the "$(QM)ExampleAddIn.ods$(QM)" 314 @echo document to see how the add-in functions can be used. For more details about the 315 @echo "$(QM)$(COMP2_NAME)$(QM)" component see the "$(QM)DataPilotReadme.txt"$(QM). 316 @echo - 317 @echo $(MAKE) ExampleAddIn.ods.load 318 @echo -------------------------------------------------------------------------------- 319 320%.run: $(SAMPLE_CLASS_OUT)/%.jar 321 $(SDK_JAVA) -Dcom.sun.star.lib.loader.unopath="$(OFFICE_PROGRAM_PATH)" -jar $< 322 323ExampleAddIn.ods.load : $(COMP1_REGISTERFLAG) 324 "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@) 325 326.PHONY: clean 327clean : 328 -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) 329 -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT)) 330 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP1_PACKAGE_URL))) 331 -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP2_PACKAGE_URL))) 332