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.IF "$(OS)"=="OS2" 224# YD do not trigger bash for scripts! 225CONFIG_SHELL=sh.exe 226.EXPORT: CONFIG_SHELL 227.ENDIF 228 229$(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) 230 @@-$(RM) $@ 231.IF "$(CONFIGURE_ACTION)" == "none" || "$(CONFIGURE_ACTION)"=="" 232 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) 233.ELSE # "$(CONFIGURE_ACTION)"=="none" || "$(CONFIGURE_ACTION)"=="" 234 $(COMMAND_ECHO)-$(MKDIR) $(P_CONFIGURE_DIR) 235.IF "$(OS)"=="OS2" 236 $(COMMAND_ECHO)cd $(P_CONFIGURE_DIR) && sh -c "$(CONFIGURE_ACTION:s!\!/!) $(CONFIGURE_FLAGS:s!\!/!)" && $(TOUCH) $(CONFIGURE_FLAG_FILE) 237.ELSE 238 $(COMMAND_ECHO)cd $(P_CONFIGURE_DIR) && $(CONFIGURE_ACTION) $(CONFIGURE_FLAGS) && $(TOUCH) $(CONFIGURE_FLAG_FILE) 239.ENDIF 240 $(COMMAND_ECHO)mv $(P_CONFIGURE_DIR)/$(CONFIGURE_FLAG_FILE) $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) 241.ENDIF # "$(CONFIGURE_ACTION)"=="none" || "$(CONFIGURE_ACTION)"=="" 242 243 244$(PACKAGE_DIR)/$(BUILD_FLAG_FILE) : $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) 245 @@-$(RM) $@ 246.IF "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true" 247 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(BUILD_FLAG_FILE) 248.ELSE # "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true" 249 $(COMMAND_ECHO)-$(MKDIR) $(P_BUILD_DIR) 250 $(COMMAND_ECHO)cd $(P_BUILD_DIR) && $(BUILD_ACTION) $(BUILD_FLAGS) && $(TOUCH) $(ABS_PACKAGE_DIR)/$(BUILD_FLAG_FILE) 251.ENDIF # "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true" 252 253$(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) : $(PACKAGE_DIR)/$(BUILD_FLAG_FILE) 254 @@-$(RM) $@ 255.IF "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"=="" 256 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) 257.ELSE # "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"=="" 258 $(COMMAND_ECHO)-$(MKDIR) $(P_INSTALL_DIR) 259 $(COMMAND_ECHO)-$(MKDIR) $(P_INSTALL_TARGET_DIR) 260 $(COMMAND_ECHO)cd $(P_INSTALL_DIR) && $(INSTALL_ACTION) $(INSTALL_FLAGS) && $(TOUCH) $(INSTALL_FLAG_FILE) 261 $(COMMAND_ECHO)mv $(P_INSTALL_DIR)/$(INSTALL_FLAG_FILE) $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) 262.ENDIF # "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"=="" 263 264$(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE) : $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) 265.IF "$(OUT2LIB)"!="" 266 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2LIB) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(LB) 267.IF "$(OS)"=="MACOSX" 268 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl extshl \ 269 $(EXTRPATH) \ 270 $(shell ls $(foreach,j,$(OUT2LIB) $(LB)/$(j:f)) | \ 271 (grep -v '\.a$$' || test $$? = 1)) 272.ENDIF 273.ENDIF # "$(OUT2LIB)"!="" 274.IF "$(OUT2INC)"!="" 275.IF "$(OUT2INC_SUBDIR)"!="" 276 $(COMMAND_ECHO)-$(MKDIRHIER) $(INCCOM)/$(OUT2INC_SUBDIR) 277 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM)/$(OUT2INC_SUBDIR) 278.ELSE # "$(OUT2INC_SUBDIR)"!="" 279 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM) 280.ENDIF # "$(OUT2INC_SUBDIR)"!="" 281.ENDIF # "$(OUT2INC)"!="" 282.IF "$(OUTDIR2INC)"!="" 283 $(COMMAND_ECHO)$(COPY) $(DEREFERENCE) $(COPYRECURSE) $(foreach,i,$(OUTDIR2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM) 284.ENDIF # "$(OUTDIR2INC)"!="" 285.IF "$(OUT2BIN)"!="" 286 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2BIN) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(BIN) 287.IF "$(GUI)$(COM)$(COMEX)"=="WNTMSC12" 288 @noop $(foreach,j,$(foreach,k,$(OUT2BIN) \ 289 $(shell -ls -1 $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$k | $(GREP) .dll)) \ 290 $(shell @$(IFEXIST) $(j).manifest $(THEN) mt.exe \ 291 -manifest $(j).manifest -outputresource:$(BIN)/$(j:f)$(EMQ);2 $(FI))) 292.ENDIF # "$(GUI)$(COM)$(COMEX)"=="WNTMSC12" 293.ENDIF # "$(OUT2BIN)"!="" 294.IF "$(OUT2CLASS)"!="" 295 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2CLASS) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(CLASSDIR) 296.ENDIF # "$(OUT2BIN)"!="" 297 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE) 298 299$(MISC)/$(TARFILE_ROOTDIR).done : $(MISC)/$(TARFILE_MD5)-$(TARFILE_NAME).unpack $(PATCH_FILES) 300 @-mv $(MISC)/$(TARFILE_ROOTDIR) $(MISC)/$(TARFILE_ROOTDIR).old 301 @-rm -rf $(MISC)/$(TARFILE_ROOTDIR).old 302 @-$(MKDIRHIER) $(MISC)$(fake_root_dir) 303 $(COMMAND_ECHO)cd $(MISC)$(fake_root_dir) && $(subst,$(BACK_PATH),$(MBACK_PATH) $(shell @$(TYPE) $(PRJ)/$(ROUT)/misc/$(TARFILE_MD5)-$(TARFILE_NAME).unpack)) 304.IF "$(P_ADDITIONAL_FILES)"!="" 305 noop $(foreach,i,$(P_ADDITIONAL_FILES) $(shell echo dummy > $i)) 306.ENDIF "$(P_ADDITIONAL_FILES)"!="" 307.IF "$(PATCH_FILES)"!="none" && "$(PATCH_FILES)"!="" 308.IF "$(CONVERTFILES)"!="" 309 $(CONVERT) unix $(foreach,i,$(CONVERTFILES) $(MISC)/$(TARFILE_ROOTDIR)/$i) 310.ENDIF # "$(CONVERTFILES)"!="" 311.IF "$(GUI)"=="WNT" 312# hack to make 4nt version 4,01 work and still get propper 313# errorcodes for versions < 3,00 314#.IF "$(my4ver:s/.//:s/,//)" >= "300" 315# $(COMMAND_ECHO)cd $(MISC) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 ) 316#.ELSE # "$(my4ver:s/.//:s/,//)" >= "300" 317 $(COMMAND_ECHO)cd $(MISC) && $(TYPE:s/+//) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 318#.ENDIF # "$(my4ver:s/.//:s/,//)" >= "300" 319.ELSE # "$(GUI)"=="WNT" 320.IF "$(BSCLIENT)"=="TRUE" 321 $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2 322.ELSE # "$(BSCLIENT)"!="" 323 $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2 324.ENDIF # "$(BSCLIENT)"!="" 325.ENDIF # "$(GUI)"=="WNT" 326.IF "$(CONVERTFILES)"!="" 327 $(COMMAND_ECHO)$(CONVERT) dos $(foreach,i,$(CONVERTFILES) $(MISC)/$(TARFILE_ROOTDIR)/$i) 328.ENDIF # "$(CONVERTFILES)"!="" 329.ENDIF # "$(PATCH_FILES)"!="none" && "$(PATCH_FILES)"!=" 330.IF "$(GUI)"=="UNX" 331 $(COMMAND_ECHO)$(TOUCH) $@ 332.ENDIF # "$(GUI)"=="UNX" 333 334.IF "$(T_ADDITIONAL_FILES)"!="" 335$(T_ADDITIONAL_FILES:+".dummy") : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) 336 @-$(MKDIRHIER) $(@:d) 337 $(COMMAND_ECHO)-echo dummy > $@ 338 $(COMMAND_ECHO)-$(TOUCH) $@ 339 $(COMMAND_ECHO)-echo dummy > $(@:d)$(@:b) 340 $(COMMAND_ECHO)-$(TOUCH) $(@:d)$(@:b) 341.ENDIF "$(T_ADDITIONAL_FILES)"!="" 342 343create_patch : $(MISC)/$(TARFILE_ROOTDIR).done $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) 344 @@-$(MKDIRHIER) $(PRJ)/$(NEW_PATCH_FILE_NAME:d) 345 @@-$(RM) $(MISC)/$(NEW_PATCH_FILE_NAME:f).tmp 346 @@-$(RM) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak 347#ignore returncode of 1 (indicates differences...) 348# hard coded again to get the same directory level as before. quite ugly... 349 $(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 350 $(COMMAND_ECHO)-mv $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak 351 $(COMMAND_ECHO)-$(TOUCH) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak 352 $(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) 353 @@-$(RM) $(MISC)/$(NEW_PATCH_FILE_NAME:f).tmp $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak 354.IF "$(GUI)" == "OS2" 355 $(COMMAND_ECHO)dmake $(MAKEMACROS) patch 356.ELSE 357 $(COMMAND_ECHO)$(MAKECMD) $(MAKEMACROS) patch 358.ENDIF 359 @echo still some problems with win32 generated patches... 360 @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) 361 362create_clean : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) 363 @echo done 364 365patch : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) 366 @echo done 367 368.ENDIF # "$(L10N_framework)"=="" 369