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.EXPORT : CC CXX 25 26# setup INCLUDE variable for use by VC++ 27.IF "$(GUI)$(COM)"=="WNTMSC" 28.IF "$(EXT_USE_STLPORT)"=="" 29INCLUDE!:=. $(subst,/stl, $(SOLARINC)) 30.ELSE # "$(EXT_USE_STLPORT)"=="" 31INCLUDE!:=. $(SOLARINC) 32.ENDIF # "$(EXT_USE_STLPORT)"=="" 33INCLUDE!:=$(INCLUDE:s/ -I/;/) 34.EXPORT : INCLUDE 35.ENDIF # "$(GUI)$(COM)"=="WNTMSC" 36 37.IF "$(OS)"=="MACOSX" 38LDFLAGS!:=$(EXTRA_LINKFLAGS) $(LDFLAGS) 39.EXPORT : LDFLAGS 40.ENDIF 41 42.IF "$(GUI)"=="WNT" 43PATH!:=.:$(SOLARBINDIR:^"/cygdrive/":s/://):$(PATH) 44.ELSE # "$(GUI)"=="WNT" 45PATH!:=.$(PATH_SEPERATOR)$(SOLARBINDIR)$(PATH_SEPERATOR)$(PATH) 46.ENDIF # "$(GUI)"=="WNT" 47.EXPORT : PATH 48 49#override 50PACKAGE_DIR=$(MISC)/build 51ABS_PACKAGE_DIR:=$(MAKEDIR)/$(MISC)/build 52 53#MUST match with PACKAGE_DIR 54BACK_PATH=../../../ 55#MUST match with reference (currently MISC) 56MBACK_PATH=../../ 57.IF "$(TARFILE_IS_FLAT)" != "" 58fake_root_dir=/$(TARFILE_NAME) 59#MUST match fake_root_dir in directory levels 60fake_back=../ 61.ENDIF "$(TARFILE_IS_FLAT)" != "" 62 63TARFILE_LOCATION*=$(BACK_PATH)$(fake_back)download 64TARFILE_LOCATION2=$(eq,$(BACK_PATH)$(fake_back)download,$(TARFILE_LOCATION) $(PRJ)/download $(TARFILE_LOCATION)) 65 66P_CONFIGURE_DIR=$(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$(CONFIGURE_DIR) 67P_BUILD_DIR=$(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$(BUILD_DIR) 68P_INSTALL_DIR=$(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$(BUILD_DIR) 69P_INSTALL_TARGET_DIR=$(MISC)/install 70 71.IF "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"=="" 72NEW_PATCH_FILE_NAME:=$(TARFILE_NAME) 73.ELSE # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"=="" 74NEW_PATCH_FILE_NAME:=$(TARFILE_NAME)-newpatch-rename_me.patch 75PATCH_FILE_DEP:=$(PRJ)/$(PATH_IN_MODULE)/{$(PATCH_FILES)} 76.ENDIF # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"=="" 77 78unzip_quiet_switch:=-qq 79.IF "$(VERBOSE)"=="TRUE" 80tar_verbose_switch=v 81unzip_quiet_switch:= 82.ENDIF # "$(VERBOSE)"=="TRUE" 83 84.IF "$(ADDITIONAL_FILES)"!="" 85P_ADDITIONAL_FILES=$(foreach,i,$(ADDITIONAL_FILES) $(MISC)/$(TARFILE_ROOTDIR)/$i) 86T_ADDITIONAL_FILES=$(foreach,i,$(ADDITIONAL_FILES) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) 87.ENDIF # "$(ADDITIONAL_FILES)"!="" 88 89EXTRPATH*=OOO 90 91.IF "$(L10N_framework)"=="" 92 93ALLTAR : \ 94 $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) \ 95 $(PACKAGE_DIR)/$(BUILD_FLAG_FILE) \ 96 $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) \ 97 $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) \ 98 $(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE) \ 99 $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) \ 100 $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE) 101 102clean: 103 $(COMMAND_ECHO)cd $(P_BUILD_DIR) && $(BUILD_ACTION) $(BUILD_FLAGS) clean 104 $(COMMAND_ECHO)$(RM) $(PACKAGE_DIR)/$(BUILD_FLAG_FILE) 105 106$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2 107 @-$(RM) $@ 108.IF "$(GUI)"=="UNX" 109 @noop $(assign UNPACKCMD := sh -c "bzip2 -cd $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(GNUTAR) -x$(tar_verbose_switch)f - ") 110.ELSE # "$(GUI)"=="UNX" 111 @noop $(assign UNPACKCMD := bzip2 -cd $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(GNUTAR) -x$(tar_verbose_switch)f - ) 112.ENDIF # "$(GUI)"=="UNX" 113 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) 114 @$(RENAME) $@.$(INPATH) $@ 115 116$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.Z 117 @-$(RM) $@ 118.IF "$(GUI)"=="UNX" 119 @noop $(assign UNPACKCMD := sh -c "uncompress -c $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.Z | $(GNUTAR) -x$(tar_verbose_switch)f - ") 120.ELSE # "$(GUI)"=="UNX" 121 @noop $(assign UNPACKCMD := uncompress -c $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.Z | $(GNUTAR) -x$(tar_verbose_switch)f - ) 122.ENDIF # "$(GUI)"=="UNX" 123 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) 124 @$(RENAME) $@.$(INPATH) $@ 125 126$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.gz 127 @-$(RM) $@ 128 @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.gz) $(TARFILE_FILTER) | $(GNUTAR) -x$(tar_verbose_switch)f - ) 129 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) 130 @$(RENAME) $@.$(INPATH) $@ 131 132$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tgz 133 @-$(RM) $@ 134 @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tgz) $(TARFILE_FILTER) | $(GNUTAR) -x$(tar_verbose_switch)f - ) 135 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) 136 @$(RENAME) $@.$(INPATH) $@ 137 138$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar 139 @-$(RM) $@ 140 @noop $(assign UNPACKCMD := $(GNUTAR) -x$(tar_verbose_switch)f $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar) 141 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) 142 @$(RENAME) $@.$(INPATH) $@ 143 144$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.zip 145 @-$(RM) $@ 146 @noop $(assign UNPACKCMD := unzip $(unzip_quiet_switch) -o $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).zip) 147 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) 148 @$(RENAME) $@.$(INPATH) $@ 149 150$(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.jar 151 @-$(RM) $@ 152.IF "$(OS)"=="SOLARIS" 153 @noop $(assign UNPACKCMD := jar xf $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).jar) 154.ELSE # "$(OS)"=="SOLARIS" 155 @noop $(assign UNPACKCMD := unzip $(unzip_quiet_switch) -o $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).jar) 156.ENDIF # "$(OS)"=="SOLARIS" 157 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH) 158 @$(RENAME) $@.$(INPATH) $@ 159 160#do unpack 161$(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) : $(PRJ)/$(ROUT)/misc/$(TARFILE_MD5)-$(TARFILE_NAME).unpack $(PATCH_FILE_DEP) 162 $(IFEXIST) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR) $(THEN) $(RENAME:s/+//) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)_removeme $(FI) 163 $(COMMAND_ECHO)-rm -rf $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)_removeme 164 @-$(MKDIRHIER) $(PACKAGE_DIR)$(fake_root_dir) 165 $(COMMAND_ECHO)cd $(PACKAGE_DIR)$(fake_root_dir) && ( $(shell @$(TYPE) $(PRJ)/$(ROUT)/misc/$(TARFILE_MD5)-$(TARFILE_NAME).unpack)) && $(TOUCH) $(UNTAR_FLAG_FILE) 166 @echo make writeable... 167 @cd $(PACKAGE_DIR) && chmod -R +rw $(TARFILE_ROOTDIR) && $(TOUCH) $(UNTAR_FLAG_FILE) 168 @cd $(PACKAGE_DIR) && find $(TARFILE_ROOTDIR) -type d -exec chmod a+x {{}} \; 169 170#add new files to patch 171$(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE) : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) $(T_ADDITIONAL_FILES:+".dummy") 172.IF "$(GUI)"=="WNT" 173 @$(TOUCH) $@ 174.ELSE # "$(GUI)"=="WNT" 175 @$(TOUCH) $@ 176.ENDIF # "$(GUI)"=="WNT" 177 178#patch 179$(PACKAGE_DIR)/$(PATCH_FLAG_FILE) : $(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE) 180.IF "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"=="" 181 @echo no patch needed... 182 $(COMMAND_ECHO)$(TOUCH) $@ 183.ELSE # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"=="" 184.IF "$(GUI)"=="WNT" 185# hack to make 4nt version 4,01 work and still get propper 186# errorcodes for versions < 3,00 187#.IF "$(my4ver:s/.//:s/,//)" >= "300" 188# $(COMMAND_ECHO)cd $(PACKAGE_DIR) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 ) && $(TOUCH) $(PATCH_FLAG_FILE) 189#.ELSE # "$(my4ver:s/.//:s/,//)" >= "300" 190 $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE) 191#.ENDIF # "$(my4ver:s/.//:s/,//)" >= "300" 192.ELSE # "$(GUI)"=="WNT" 193.IF "$(BSCLIENT)"=="TRUE" 194 $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE) 195.ELSE # "$(BSCLIENT)"!="" 196 $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE) 197.ENDIF # "$(BSCLIENT)"!="" 198.ENDIF # "$(GUI)"=="WNT" 199.ENDIF # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"=="" 200.IF "$(T_ADDITIONAL_FILES)"!="" 201.IF "$(GUI)"=="WNT" 202# Native W32 tools generate only filedates with even seconds, cygwin also with odd seconds 203 $(DELAY) 2 204.ENDIF # "$(GUI)"=="WNT" 205 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) 206.ENDIF # "$(T_ADDITIONAL_FILES)"!="" 207 208.IF "$(CONVERTFILES)"!="" 209$(MISC)/$(TARGET)_convert_unx_flag : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) 210 $(COMMAND_ECHO)$(CONVERT) unix $(foreach,i,$(CONVERTFILES) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) && $(TOUCH) $(MISC)/$(TARGET)_convert_unx_flag 211 212$(PACKAGE_DIR)/$(PATCH_FLAG_FILE) : $(MISC)/$(TARGET)_convert_unx_flag 213 214$(MISC)/$(TARGET)_convert_dos_flag : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) 215 $(COMMAND_ECHO)$(CONVERT) dos $(foreach,i,$(CONVERTFILES) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) && $(TOUCH) $(MISC)/$(TARGET)_convert_dos_flag 216 217$(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) : $(MISC)/$(TARGET)_convert_dos_flag 218 219patch : $(MISC)/$(TARGET)_convert_dos_flag 220 221.ENDIF # "$(CONVERTFILES)"!="" 222 223$(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) 224 @@-$(RM) $@ 225.IF "$(CONFIGURE_ACTION)" == "none" || "$(CONFIGURE_ACTION)"=="" 226 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) 227.ELSE # "$(CONFIGURE_ACTION)"=="none" || "$(CONFIGURE_ACTION)"=="" 228 $(COMMAND_ECHO)-$(MKDIR) $(P_CONFIGURE_DIR) 229.IF "$(OS)"=="OS2" 230 $(COMMAND_ECHO)cd $(P_CONFIGURE_DIR) && sh -c "$(CONFIGURE_ACTION:s!\!/!) $(CONFIGURE_FLAGS:s!\!/!)" && $(TOUCH) $(CONFIGURE_FLAG_FILE) 231.ELSE 232 $(COMMAND_ECHO)cd $(P_CONFIGURE_DIR) && $(CONFIGURE_ACTION) $(CONFIGURE_FLAGS) && $(TOUCH) $(CONFIGURE_FLAG_FILE) 233.ENDIF 234 $(COMMAND_ECHO)mv $(P_CONFIGURE_DIR)/$(CONFIGURE_FLAG_FILE) $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) 235.ENDIF # "$(CONFIGURE_ACTION)"=="none" || "$(CONFIGURE_ACTION)"=="" 236 237 238$(PACKAGE_DIR)/$(BUILD_FLAG_FILE) : $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) 239 @@-$(RM) $@ 240.IF "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true" 241 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(BUILD_FLAG_FILE) 242.ELSE # "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true" 243 $(COMMAND_ECHO)-$(MKDIR) $(P_BUILD_DIR) 244 $(COMMAND_ECHO)cd $(P_BUILD_DIR) && $(BUILD_ACTION) $(BUILD_FLAGS) && $(TOUCH) $(ABS_PACKAGE_DIR)/$(BUILD_FLAG_FILE) 245.ENDIF # "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true" 246 247$(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) : $(PACKAGE_DIR)/$(BUILD_FLAG_FILE) 248 @@-$(RM) $@ 249.IF "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"=="" 250 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) 251.ELSE # "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"=="" 252 $(COMMAND_ECHO)-$(MKDIR) $(P_INSTALL_DIR) 253 $(COMMAND_ECHO)-$(MKDIR) $(P_INSTALL_TARGET_DIR) 254 $(COMMAND_ECHO)cd $(P_INSTALL_DIR) && $(INSTALL_ACTION) $(INSTALL_FLAGS) && $(TOUCH) $(INSTALL_FLAG_FILE) 255 $(COMMAND_ECHO)mv $(P_INSTALL_DIR)/$(INSTALL_FLAG_FILE) $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) 256.ENDIF # "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"=="" 257 258$(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE) : $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) 259.IF "$(OUT2LIB)"!="" 260 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2LIB) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(LB) 261.IF "$(OS)"=="MACOSX" 262 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl extshl \ 263 $(EXTRPATH) \ 264 $(shell ls $(foreach,j,$(OUT2LIB) $(LB)/$(j:f)) | \ 265 (grep -v '\.a$$' || test $$? = 1)) 266.ENDIF 267.ENDIF # "$(OUT2LIB)"!="" 268.IF "$(OUT2INC)"!="" 269.IF "$(OUT2INC_SUBDIR)"!="" 270 $(COMMAND_ECHO)-$(MKDIRHIER) $(INCCOM)/$(OUT2INC_SUBDIR) 271 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM)/$(OUT2INC_SUBDIR) 272.ELSE # "$(OUT2INC_SUBDIR)"!="" 273 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM) 274.ENDIF # "$(OUT2INC_SUBDIR)"!="" 275.ENDIF # "$(OUT2INC)"!="" 276.IF "$(OUTDIR2INC)"!="" 277 $(COMMAND_ECHO)$(COPY) $(DEREFERENCE) $(COPYRECURSE) $(foreach,i,$(OUTDIR2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM) 278.ENDIF # "$(OUTDIR2INC)"!="" 279.IF "$(OUT2BIN)"!="" 280 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2BIN) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(BIN) 281.IF "$(GUI)$(COM)$(COMEX)"=="WNTMSC12" 282 @noop $(foreach,j,$(foreach,k,$(OUT2BIN) \ 283 $(shell -ls -1 $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$k | $(GREP) .dll)) \ 284 $(shell @$(IFEXIST) $(j).manifest $(THEN) mt.exe \ 285 -manifest $(j).manifest -outputresource:$(BIN)/$(j:f)$(EMQ);2 $(FI))) 286.ENDIF # "$(GUI)$(COM)$(COMEX)"=="WNTMSC12" 287.ENDIF # "$(OUT2BIN)"!="" 288.IF "$(OUT2CLASS)"!="" 289 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2CLASS) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(CLASSDIR) 290.ENDIF # "$(OUT2BIN)"!="" 291 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE) 292 293$(MISC)/$(TARFILE_ROOTDIR).done : $(MISC)/$(TARFILE_MD5)-$(TARFILE_NAME).unpack $(PATCH_FILES) 294 @-mv $(MISC)/$(TARFILE_ROOTDIR) $(MISC)/$(TARFILE_ROOTDIR).old 295 @-rm -rf $(MISC)/$(TARFILE_ROOTDIR).old 296 @-$(MKDIRHIER) $(MISC)$(fake_root_dir) 297 $(COMMAND_ECHO)cd $(MISC)$(fake_root_dir) && $(subst,$(BACK_PATH),$(MBACK_PATH) $(shell @$(TYPE) $(PRJ)/$(ROUT)/misc/$(TARFILE_MD5)-$(TARFILE_NAME).unpack)) 298.IF "$(P_ADDITIONAL_FILES)"!="" 299 noop $(foreach,i,$(P_ADDITIONAL_FILES) $(shell echo dummy > $i)) 300.ENDIF "$(P_ADDITIONAL_FILES)"!="" 301.IF "$(PATCH_FILES)"!="none" && "$(PATCH_FILES)"!="" 302.IF "$(CONVERTFILES)"!="" 303 $(CONVERT) unix $(foreach,i,$(CONVERTFILES) $(MISC)/$(TARFILE_ROOTDIR)/$i) 304.ENDIF # "$(CONVERTFILES)"!="" 305.IF "$(GUI)"=="WNT" 306# hack to make 4nt version 4,01 work and still get propper 307# errorcodes for versions < 3,00 308#.IF "$(my4ver:s/.//:s/,//)" >= "300" 309# $(COMMAND_ECHO)cd $(MISC) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 ) 310#.ELSE # "$(my4ver:s/.//:s/,//)" >= "300" 311 $(COMMAND_ECHO)cd $(MISC) && $(TYPE:s/+//) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 312#.ENDIF # "$(my4ver:s/.//:s/,//)" >= "300" 313.ELSE # "$(GUI)"=="WNT" 314.IF "$(BSCLIENT)"=="TRUE" 315 $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2 316.ELSE # "$(BSCLIENT)"!="" 317 $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2 318.ENDIF # "$(BSCLIENT)"!="" 319.ENDIF # "$(GUI)"=="WNT" 320.IF "$(CONVERTFILES)"!="" 321 $(COMMAND_ECHO)$(CONVERT) dos $(foreach,i,$(CONVERTFILES) $(MISC)/$(TARFILE_ROOTDIR)/$i) 322.ENDIF # "$(CONVERTFILES)"!="" 323.ENDIF # "$(PATCH_FILES)"!="none" && "$(PATCH_FILES)"!=" 324.IF "$(GUI)"=="UNX" 325 $(COMMAND_ECHO)$(TOUCH) $@ 326.ENDIF # "$(GUI)"=="UNX" 327 328.IF "$(T_ADDITIONAL_FILES)"!="" 329$(T_ADDITIONAL_FILES:+".dummy") : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) 330 @-$(MKDIRHIER) $(@:d) 331 $(COMMAND_ECHO)-echo dummy > $@ 332 $(COMMAND_ECHO)-$(TOUCH) $@ 333 $(COMMAND_ECHO)-echo dummy > $(@:d)$(@:b) 334 $(COMMAND_ECHO)-$(TOUCH) $(@:d)$(@:b) 335.ENDIF "$(T_ADDITIONAL_FILES)"!="" 336 337create_patch : $(MISC)/$(TARFILE_ROOTDIR).done $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) 338 @@-$(MKDIRHIER) $(PRJ)/$(NEW_PATCH_FILE_NAME:d) 339 @@-$(RM) $(MISC)/$(NEW_PATCH_FILE_NAME:f).tmp 340 @@-$(RM) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak 341#ignore returncode of 1 (indicates differences...) 342# hard coded again to get the same directory level as before. quite ugly... 343 $(COMMAND_ECHO)-cd $(PRJ)/$(ROUT) && diff -ru misc/$(TARFILE_ROOTDIR) misc/build/$(TARFILE_ROOTDIR) | $(PERL) $(SOLARENV)/bin/cleandiff.pl | tr -d "\015" > misc/$(NEW_PATCH_FILE_NAME:f).tmp 344 $(COMMAND_ECHO)-mv $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak 345 $(COMMAND_ECHO)-$(TOUCH) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak 346 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/patch_sanitizer.pl $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak $(MISC)/$(NEW_PATCH_FILE_NAME:f).tmp $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME) 347 @@-$(RM) $(MISC)/$(NEW_PATCH_FILE_NAME:f).tmp $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak 348 $(COMMAND_ECHO)$(MAKECMD) $(MAKEMACROS) patch 349 @echo still some problems with win32 generated patches... 350 @echo $(USQ)find your new changes in $(NEW_PATCH_FILE_NAME). don't forget to move/rename that patch and insert it in your makefiles PATCH_FILES to activate.$(USQ) 351 352create_clean : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) 353 @echo done 354 355patch : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) 356 @echo done 357 358.ENDIF # "$(L10N_framework)"=="" 359