Update ooo320-m1
[ooovba.git] / solenv / inc / tg_ext.mk
blobf00b0a3059c606f72b43afed41aa7ea0d6ba5bd7
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: tg_ext.mk,v $
11 # $Revision: 1.91 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 .EXPORT : CC CXX
34 # setup INCLUDE variable for use by VC++
35 .IF "$(GUI)$(COM)"=="WNTMSC"
36 .IF "$(EXT_USE_STLPORT)"==""
37 INCLUDE!:=. $(subst,/stl, $(SOLARINC))
38 .ELSE # "$(EXT_USE_STLPORT)"==""
39 INCLUDE!:=. $(SOLARINC)
40 .ENDIF # "$(EXT_USE_STLPORT)"==""
41 INCLUDE!:=$(INCLUDE:s/ -I/;/)
42 .EXPORT : INCLUDE
43 .ENDIF # "$(GUI)$(COM)"=="WNTMSC"
45 .IF "$(OS)"=="MACOSX"
46 LDFLAGS!:=$(EXTRA_LINKFLAGS) $(LDFLAGS)
47 .EXPORT : LDFLAGS
48 .ENDIF
50 .IF "$(GUI)"=="WNT" && "$(USE_SHELL)"!="4nt"
51 PATH!:=.:$(SOLARBINDIR:^"/cygdrive/":s/://):$(PATH)
52 .ELSE # "$(GUI)"=="WNT" && "$(USE_SHELL)"!="4nt"
53 PATH!:=.$(PATH_SEPERATOR)$(SOLARBINDIR)$(PATH_SEPERATOR)$(PATH)
54 .ENDIF # "$(GUI)"=="WNT" && "$(USE_SHELL)"!="4nt"
55 .EXPORT : PATH
57 #override
58 PACKAGE_DIR=$(MISC)/build
59 ABS_PACKAGE_DIR:=$(MAKEDIR)/$(MISC)/build
61 #MUST match with PACKAGE_DIR
62 BACK_PATH=../../../
63 #MUST match with reference (currently MISC)
64 MBACK_PATH=../../
65 .IF "$(TARFILE_IS_FLAT)" != ""
66 fake_root_dir=/$(TARFILE_NAME)
67 #MUST match fake_root_dir in directory levels
68 fake_back=../
69 .ENDIF "$(TARFILE_IS_FLAT)" != ""
71 P_CONFIGURE_DIR=$(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$(CONFIGURE_DIR)
72 P_BUILD_DIR=$(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$(BUILD_DIR)
73 P_INSTALL_DIR=$(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$(BUILD_DIR)
74 P_INSTALL_TARGET_DIR=$(MISC)/install
76 .IF "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"==""
77 NEW_PATCH_FILE_NAME:=$(TARFILE_NAME)
78 .ELSE # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"==""
79 NEW_PATCH_FILE_NAME:=$(TARFILE_NAME)-newpatch-rename_me.patch
80 PATCH_FILE_DEP:=$(PRJ)/$(PATH_IN_MODULE)/{$(PATCH_FILES)}
81 .ENDIF # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"==""
83 .IF "$(TAR_EXCLUDES)"!=""
84 TAR_EXCLUDE_SWITCH=--exclude=$(TAR_EXCLUDES)
85 .ENDIF # "$(TAR_EXCLUDES)"!=""
87 unzip_quiet_switch:=-qq
88 .IF "$(VERBOSE)"=="TRUE"
89 tar_verbose_switch=v
90 unzip_quiet_switch:=
91 .ENDIF # "$(VERBOSE)"=="TRUE"
93 .IF "$(ADDITIONAL_FILES)"!=""
94 P_ADDITIONAL_FILES=$(foreach,i,$(ADDITIONAL_FILES) $(MISC)/$(TARFILE_ROOTDIR)/$i)
95 T_ADDITIONAL_FILES=$(foreach,i,$(ADDITIONAL_FILES) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i)
96 .ENDIF # "$(ADDITIONAL_FILES)"!=""
98 EXTRPATH*=OOO
100 .IF "$(L10N_framework)"==""
102 ALLTAR : \
103 $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) \
104 $(PACKAGE_DIR)/$(BUILD_FLAG_FILE) \
105 $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) \
106 $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) \
107 $(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE) \
108 $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) \
109 $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE)
111 clean:
112 $(COMMAND_ECHO)cd $(P_BUILD_DIR) && $(BUILD_ACTION) $(BUILD_FLAGS) clean
113 $(COMMAND_ECHO)$(RM) $(PACKAGE_DIR)/$(BUILD_FLAG_FILE)
115 $(MISC)/%.unpack : $(PRJ)/download/%.tar.bz2
116 @-$(RM) $@
117 .IF "$(GUI)"=="UNX"
118 @noop $(assign UNPACKCMD := sh -c "bzip2 -cd $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(GNUTAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - ")
119 .ELSE # "$(GUI)"=="UNX"
120 @noop $(assign UNPACKCMD := bzip2 -cd $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(GNUTAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - )
121 .ENDIF # "$(GUI)"=="UNX"
122 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
123 @$(RENAME) $@.$(INPATH) $@
125 $(MISC)/%.unpack : $(PRJ)/download/%.tar.Z
126 @-$(RM) $@
127 .IF "$(GUI)"=="UNX"
128 @noop $(assign UNPACKCMD := sh -c "uncompress -c $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tar.Z | $(GNUTAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - ")
129 .ELSE # "$(GUI)"=="UNX"
130 @noop $(assign UNPACKCMD := uncompress -c $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tar.Z | $(GNUTAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - )
131 .ENDIF # "$(GUI)"=="UNX"
132 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
133 @$(RENAME) $@.$(INPATH) $@
135 $(MISC)/%.unpack : $(PRJ)/download/%.tar.gz
136 @-$(RM) $@
137 @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tar.gz) $(TARFILE_FILTER) | $(GNUTAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - )
138 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
139 @$(RENAME) $@.$(INPATH) $@
141 $(MISC)/%.unpack : $(PRJ)/download/%.tgz
142 @-$(RM) $@
143 @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tgz) $(TARFILE_FILTER) | $(GNUTAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - )
144 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
145 @$(RENAME) $@.$(INPATH) $@
147 $(MISC)/%.unpack : $(PRJ)/download/%.tar
148 @-$(RM) $@
149 noop $(assign UNPACKCMD := $(GNUTAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tar)
150 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
151 @$(RENAME) $@.$(INPATH) $@
153 $(MISC)/%.unpack : $(PRJ)/download/%.zip
154 @-$(RM) $@
155 noop $(assign UNPACKCMD := unzip $(unzip_quiet_switch) -o $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).zip)
156 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
157 @$(RENAME) $@.$(INPATH) $@
159 $(MISC)/%.unpack : $(PRJ)/download/%.jar
160 @-$(RM) $@
161 .IF "$(OS)"=="SOLARIS"
162 noop $(assign UNPACKCMD := jar xf $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).jar)
163 .ELSE # "$(OS)"=="SOLARIS"
164 noop $(assign UNPACKCMD := unzip $(unzip_quiet_switch) -o $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).jar)
165 .ENDIF # "$(OS)"=="SOLARIS"
166 @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
167 @$(RENAME) $@.$(INPATH) $@
169 #do unpack
170 $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) : $(PRJ)/$(ROUT)/misc/$(TARFILE_NAME).unpack $(PATCH_FILE_DEP)
171 $(IFEXIST) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR) $(THEN) $(RENAME:s/+//) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)_removeme $(FI)
172 $(COMMAND_ECHO)-rm -rf $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)_removeme
173 @-$(MKDIRHIER) $(PACKAGE_DIR)$(fake_root_dir)
174 $(COMMAND_ECHO)cd $(PACKAGE_DIR)$(fake_root_dir) && ( $(shell @$(TYPE) $(PRJ)/$(ROUT)/misc/$(TARFILE_NAME).unpack)) && $(TOUCH) $(UNTAR_FLAG_FILE)
175 @echo make writeable...
176 @cd $(PACKAGE_DIR) && chmod -R +rw $(TARFILE_ROOTDIR) && $(TOUCH) $(UNTAR_FLAG_FILE)
177 @cd $(PACKAGE_DIR) && find $(TARFILE_ROOTDIR) -type d -exec chmod a+x {{}} \;
179 #add new files to patch
180 $(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE) : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) $(T_ADDITIONAL_FILES:+".dummy")
181 .IF "$(GUI)"=="WNT"
182 @$(TOUCH) $@
183 .ELSE # "$(GUI)"=="WNT"
184 @$(TOUCH) $@
185 .ENDIF # "$(GUI)"=="WNT"
187 #patch
188 $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) : $(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE)
189 .IF "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"==""
190 @echo no patch needed...
191 $(COMMAND_ECHO)$(TOUCH) $@
192 .ELSE # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"==""
193 .IF "$(GUI)"=="WNT"
194 # hack to make 4nt version 4,01 work and still get propper
195 # errorcodes for versions < 3,00
196 #.IF "$(my4ver:s/.//:s/,//)" >= "300"
197 # $(COMMAND_ECHO)cd $(PACKAGE_DIR) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 ) && $(TOUCH) $(PATCH_FLAG_FILE)
198 #.ELSE # "$(my4ver:s/.//:s/,//)" >= "300"
199 $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
200 #.ENDIF # "$(my4ver:s/.//:s/,//)" >= "300"
201 .ELSE # "$(GUI)"=="WNT"
202 .IF "$(BSCLIENT)"=="TRUE"
203 $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
204 .ELSE # "$(BSCLIENT)"!=""
205 $(COMMAND_ECHO)cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE)
206 .ENDIF # "$(BSCLIENT)"!=""
207 .ENDIF # "$(GUI)"=="WNT"
208 .ENDIF # "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"==""
209 .IF "$(T_ADDITIONAL_FILES)"!=""
210 .IF "$(GUI)"=="WNT"
211 # Native W32 tools generate only filedates with even seconds, cygwin also with odd seconds
212 $(DELAY) 2
213 .ENDIF # "$(GUI)"=="WNT"
214 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(PATCH_FLAG_FILE)
215 .ENDIF # "$(T_ADDITIONAL_FILES)"!=""
217 .IF "$(CONVERTFILES)"!=""
218 $(MISC)/$(TARGET)_convert_unx_flag : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE)
219 $(COMMAND_ECHO)$(CONVERT) unix $(foreach,i,$(CONVERTFILES) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) && $(TOUCH) $(MISC)/$(TARGET)_convert_unx_flag
221 $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) : $(MISC)/$(TARGET)_convert_unx_flag
223 $(MISC)/$(TARGET)_convert_dos_flag : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE)
224 $(COMMAND_ECHO)$(CONVERT) dos $(foreach,i,$(CONVERTFILES) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) && $(TOUCH) $(MISC)/$(TARGET)_convert_dos_flag
226 $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) : $(MISC)/$(TARGET)_convert_dos_flag
228 patch : $(MISC)/$(TARGET)_convert_dos_flag
230 .ENDIF # "$(CONVERTFILES)"!=""
232 $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE)
233 @@-$(RM) $@
234 .IF "$(CONFIGURE_ACTION)" == "none" || "$(CONFIGURE_ACTION)"==""
235 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE)
236 .ELSE # "$(CONFIGURE_ACTION)"=="none" || "$(CONFIGURE_ACTION)"==""
237 $(COMMAND_ECHO)-$(MKDIR) $(P_CONFIGURE_DIR)
238 .IF "$(OS)"=="OS2"
239 $(COMMAND_ECHO)cd $(P_CONFIGURE_DIR) && sh -c "$(CONFIGURE_ACTION:s!\!/!) $(CONFIGURE_FLAGS:s!\!/!)" && $(TOUCH) $(CONFIGURE_FLAG_FILE)
240 .ELSE
241 $(COMMAND_ECHO)cd $(P_CONFIGURE_DIR) && $(CONFIGURE_ACTION) $(CONFIGURE_FLAGS) && $(TOUCH) $(CONFIGURE_FLAG_FILE)
242 .ENDIF
243 $(COMMAND_ECHO)mv $(P_CONFIGURE_DIR)/$(CONFIGURE_FLAG_FILE) $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE)
244 .ENDIF # "$(CONFIGURE_ACTION)"=="none" || "$(CONFIGURE_ACTION)"==""
247 $(PACKAGE_DIR)/$(BUILD_FLAG_FILE) : $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE)
248 @@-$(RM) $@
249 .IF "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true"
250 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(BUILD_FLAG_FILE)
251 .ELSE # "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true"
252 $(COMMAND_ECHO)-$(MKDIR) $(P_BUILD_DIR)
253 $(COMMAND_ECHO)cd $(P_BUILD_DIR) && $(BUILD_ACTION) $(BUILD_FLAGS) && $(TOUCH) $(ABS_PACKAGE_DIR)/$(BUILD_FLAG_FILE)
254 .ENDIF # "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true"
256 $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE) : $(PACKAGE_DIR)/$(BUILD_FLAG_FILE)
257 @@-$(RM) $@
258 .IF "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"==""
259 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE)
260 .ELSE # "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"==""
261 $(COMMAND_ECHO)-$(MKDIR) $(P_INSTALL_DIR)
262 $(COMMAND_ECHO)-$(MKDIR) $(P_INSTALL_TARGET_DIR)
263 $(COMMAND_ECHO)cd $(P_INSTALL_DIR) && $(INSTALL_ACTION) $(INSTALL_FLAGS) && $(TOUCH) $(INSTALL_FLAG_FILE)
264 $(COMMAND_ECHO)mv $(P_INSTALL_DIR)/$(INSTALL_FLAG_FILE) $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE)
265 .ENDIF # "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"==""
267 $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE) : $(PACKAGE_DIR)/$(INSTALL_FLAG_FILE)
268 .IF "$(OUT2LIB)"!=""
269 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2LIB) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(LB)
270 .IF "$(OS)"=="MACOSX"
271 $(COMMAND_ECHO)$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl extshl \
272 $(EXTRPATH) \
273 $(shell ls $(foreach,j,$(OUT2LIB) $(LB)/$(j:f)) | \
274 (grep -v '\.a$$' || test $$? = 1))
275 .ENDIF
276 .ENDIF # "$(OUT2LIB)"!=""
277 .IF "$(OUT2INC)"!=""
278 .IF "$(OUT2INC_SUBDIR)"!=""
279 -$(MKDIRHIER) $(INCCOM)/$(OUT2INC_SUBDIR)
280 $(COPY) $(foreach,i,$(OUT2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM)/$(OUT2INC_SUBDIR)
281 .ELSE # "$(OUT2INC_SUBDIR)"!=""
282 $(COPY) $(foreach,i,$(OUT2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM)
283 .ENDIF # "$(OUT2INC_SUBDIR)"!=""
284 .ENDIF # "$(OUT2INC)"!=""
285 .IF "$(OUTDIR2INC)"!=""
286 $(COPY) $(DEREFERENCE) $(COPYRECURSE) $(foreach,i,$(OUTDIR2INC) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(INCCOM)
287 .ENDIF # "$(OUTDIR2INC)"!=""
288 .IF "$(OUT2BIN)"!=""
289 $(COPY) $(foreach,i,$(OUT2BIN) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(BIN)
290 .IF "$(GUI)$(COM)$(COMEX)"=="WNTMSC12"
291 @noop $(foreach,j,$(foreach,k,$(OUT2BIN) \
292 $(shell -ls -1 $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$k | $(GREP) .dll)) \
293 $(shell @$(IFEXIST) $(j).manifest $(THEN) mt.exe \
294 -manifest $(j).manifest -outputresource:$(BIN)/$(j:f)$(EMQ);2 $(FI)))
295 .ENDIF # "$(GUI)$(COM)$(COMEX)"=="WNTMSC12"
296 .ENDIF # "$(OUT2BIN)"!=""
297 .IF "$(OUT2CLASS)"!=""
298 $(COMMAND_ECHO)$(COPY) $(foreach,i,$(OUT2CLASS) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i) $(CLASSDIR)
299 .ENDIF # "$(OUT2BIN)"!=""
300 $(COMMAND_ECHO)$(TOUCH) $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE)
302 $(MISC)/$(TARFILE_ROOTDIR).done : $(MISC)/$(TARFILE_NAME).unpack $(PATCH_FILES)
303 @-mv $(MISC)/$(TARFILE_ROOTDIR) $(MISC)/$(TARFILE_ROOTDIR).old
304 @-rm -rf $(MISC)/$(TARFILE_ROOTDIR).old
305 @-$(MKDIRHIER) $(MISC)$(fake_root_dir)
306 $(COMMAND_ECHO)cd $(MISC)$(fake_root_dir) && $(subst,$(BACK_PATH),$(MBACK_PATH) $(shell @$(TYPE) $(PRJ)/$(ROUT)/misc/$(TARFILE_NAME).unpack))
307 .IF "$(P_ADDITIONAL_FILES)"!=""
308 noop $(foreach,i,$(P_ADDITIONAL_FILES) $(shell echo dummy > $i))
309 .ENDIF "$(P_ADDITIONAL_FILES)"!=""
310 .IF "$(PATCH_FILES)"!="none" && "$(PATCH_FILES)"!=""
311 .IF "$(CONVERTFILES)"!=""
312 $(CONVERT) unix $(foreach,i,$(CONVERTFILES) $(MISC)/$(TARFILE_ROOTDIR)/$i)
313 .ENDIF # "$(CONVERTFILES)"!=""
314 .IF "$(GUI)"=="WNT"
315 # hack to make 4nt version 4,01 work and still get propper
316 # errorcodes for versions < 3,00
317 #.IF "$(my4ver:s/.//:s/,//)" >= "300"
318 # $(COMMAND_ECHO)cd $(MISC) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 )
319 #.ELSE # "$(my4ver:s/.//:s/,//)" >= "300"
320 $(COMMAND_ECHO)cd $(MISC) && $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2
321 #.ENDIF # "$(my4ver:s/.//:s/,//)" >= "300"
322 .ELSE # "$(GUI)"=="WNT"
323 .IF "$(BSCLIENT)"=="TRUE"
324 $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) -f $(PATCHFLAGS) -p2
325 .ELSE # "$(BSCLIENT)"!=""
326 $(COMMAND_ECHO)cd $(MISC) && $(TYPE) $(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | $(GNUPATCH) $(PATCHFLAGS) -p2
327 .ENDIF # "$(BSCLIENT)"!=""
328 .ENDIF # "$(GUI)"=="WNT"
329 .IF "$(CONVERTFILES)"!=""
330 $(COMMAND_ECHO)$(CONVERT) dos $(foreach,i,$(CONVERTFILES) $(MISC)/$(TARFILE_ROOTDIR)/$i)
331 .ENDIF # "$(CONVERTFILES)"!=""
332 .ENDIF # "$(PATCH_FILES)"!="none" && "$(PATCH_FILES)"!="
333 .IF "$(GUI)"=="UNX"
334 $(COMMAND_ECHO)$(TOUCH) $@
335 .ENDIF # "$(GUI)"=="UNX"
337 .IF "$(T_ADDITIONAL_FILES)"!=""
338 $(T_ADDITIONAL_FILES:+".dummy") : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE)
339 @-$(MKDIRHIER) $(@:d)
340 $(COMMAND_ECHO)-echo dummy > $@
341 $(COMMAND_ECHO)-$(TOUCH) $@
342 $(COMMAND_ECHO)-echo dummy > $(@:d)$(@:b)
343 $(COMMAND_ECHO)-$(TOUCH) $(@:d)$(@:b)
344 .ENDIF "$(T_ADDITIONAL_FILES)"!=""
346 create_patch : $(MISC)/$(TARFILE_ROOTDIR).done $(PACKAGE_DIR)/$(PATCH_FLAG_FILE)
347 @@-$(MKDIRHIER) $(PRJ)/$(NEW_PATCH_FILE_NAME:d)
348 @@-$(RM) $(MISC)/$(NEW_PATCH_FILE_NAME:f).tmp
349 @@-$(RM) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak
350 #ignore returncode of 1 (indicates differences...)
351 # hard coded again to get the same directory level as before. quite ugly...
352 $(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
353 $(COMMAND_ECHO)-mv $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak
354 $(COMMAND_ECHO)-$(TOUCH) $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak
355 $(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)
356 @@-$(RM) $(MISC)/$(NEW_PATCH_FILE_NAME:f).tmp $(PRJ)/$(PATH_IN_MODULE)/$(NEW_PATCH_FILE_NAME).bak
357 $(COMMAND_ECHO)$(MAKECMD) $(MAKEMACROS) patch
358 @echo still some problems with win32 generated patches...
359 @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 create_clean : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE)
362 @echo done
364 patch : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE)
365 @echo done
367 .ENDIF # "$(L10N_framework)"==""