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 $
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 #*************************************************************************
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
/;/)
43 .ENDIF
# "$(GUI)$(COM)"=="WNTMSC"
46 LDFLAGS
!:=$(EXTRA_LINKFLAGS
) $(LDFLAGS
)
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"
58 PACKAGE_DIR
=$(MISC
)/build
59 ABS_PACKAGE_DIR
:=$(MAKEDIR
)/$(MISC
)/build
61 #MUST match with PACKAGE_DIR
63 #MUST match with reference (currently MISC)
65 .IF
"$(TARFILE_IS_FLAT)" != ""
66 fake_root_dir
=/$(TARFILE_NAME
)
67 #MUST match fake_root_dir in directory levels
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"
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)"!=""
100 .IF
"$(L10N_framework)"==""
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
)
112 cd
$(P_BUILD_DIR
) && $(BUILD_ACTION
) $(BUILD_FLAGS
) clean
113 $(RM
) $(PACKAGE_DIR
)/$(BUILD_FLAG_FILE
)
115 $(MISC
)/%.unpack
: $(PRJ
)/download
/%.
tar.bz2
118 @noop
$(assign UNPACKCMD
:= sh
-c
"bzip2 -cd $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | $(TAR) $(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
) |
$(TAR
) $(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
128 @noop
$(assign UNPACKCMD
:= sh
-c
"uncompress -c $(BACK_PATH)$(fake_back)download/$(TARFILE_NAME).tar.Z | $(TAR) $(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 |
$(TAR
) $(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
137 @noop
$(assign UNPACKCMD
:= gzip
-d
-c
$(subst,\
,/ $(BACK_PATH
)$(fake_back
)download
/$(TARFILE_NAME
).
tar.gz
) $(TARFILE_FILTER
) |
$(TAR
) $(TAR_EXCLUDE_SWITCH
) -x
$(tar_verbose_switch
)f
- )
138 @
$(TYPE
) $(mktmp
$(UNPACKCMD
)) > $@.
$(INPATH
)
139 @
$(RENAME
) $@.
$(INPATH
) $@
141 $(MISC
)/%.unpack
: $(PRJ
)/download
/%.tgz
143 @noop
$(assign UNPACKCMD
:= gzip
-d
-c
$(subst,\
,/ $(BACK_PATH
)$(fake_back
)download
/$(TARFILE_NAME
).tgz
) $(TARFILE_FILTER
) |
$(TAR
) $(TAR_EXCLUDE_SWITCH
) -x
$(tar_verbose_switch
)f
- )
144 @
$(TYPE
) $(mktmp
$(UNPACKCMD
)) > $@.
$(INPATH
)
145 @
$(RENAME
) $@.
$(INPATH
) $@
147 $(MISC
)/%.unpack
: $(PRJ
)/download
/%.
tar
149 noop
$(assign UNPACKCMD
:= $(TAR
) $(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
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
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
) $@
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 -rm -rf
$(PACKAGE_DIR
)/$(TARFILE_ROOTDIR
)_removeme
173 @
-$(MKDIRHIER
) $(PACKAGE_DIR
)$(fake_root_dir
)
174 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")
183 .ELSE
# "$(GUI)"=="WNT"
185 .ENDIF
# "$(GUI)"=="WNT"
188 $(PACKAGE_DIR
)/$(PATCH_FLAG_FILE
) : $(PACKAGE_DIR
)/$(ADD_FILES_FLAG_FILE
)
189 .IF
"$(PATCH_FILES)"=="none" ||
"$(PATCH_FILES)"==""
190 @echo no patch needed...
192 .ELSE
# "$(PATCH_FILES)"=="none" || "$(PATCH_FILES)"==""
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 # 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 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 cd
$(PACKAGE_DIR
) && $(TYPE
) $(BACK_PATH
)$(PATH_IN_MODULE
)/{$(PATCH_FILES
)} |
$(GNUPATCH
) -f
$(PATCHFLAGS
) -p2
&& $(TOUCH
) $(PATCH_FLAG_FILE
)
204 .ELSE
# "$(BSCLIENT)"!=""
205 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)"!=""
211 # Native W32 tools generate only filedates with even seconds, cygwin also with odd seconds
213 .ENDIF
# "$(GUI)"=="WNT"
214 $(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 $(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 $(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
)
234 .IF
"$(CONFIGURE_ACTION)" == "none" ||
"$(CONFIGURE_ACTION)"==""
235 $(TOUCH
) $(PACKAGE_DIR
)/$(CONFIGURE_FLAG_FILE
)
236 .ELSE
# "$(CONFIGURE_ACTION)"=="none" || "$(CONFIGURE_ACTION)"==""
237 -$(MKDIR
) $(P_CONFIGURE_DIR
)
239 cd
$(P_CONFIGURE_DIR
) && sh
-c
"$(CONFIGURE_ACTION:s!\!/!) $(CONFIGURE_FLAGS:s!\!/!)" && $(TOUCH
) $(CONFIGURE_FLAG_FILE
)
241 cd
$(P_CONFIGURE_DIR
) && $(CONFIGURE_ACTION
) $(CONFIGURE_FLAGS
) && $(TOUCH
) $(CONFIGURE_FLAG_FILE
)
243 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
)
249 .IF
"$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true"
250 $(TOUCH
) $(PACKAGE_DIR
)/$(BUILD_FLAG_FILE
)
251 .ELSE
# "$(eq,x$(BUILD_ACTION:s/none//)x,xx true false)"=="true"
252 -$(MKDIR
) $(P_BUILD_DIR
)
253 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
)
258 .IF
"$(INSTALL_ACTION)"=="none" ||
"$(INSTALL_ACTION)"==""
259 $(TOUCH
) $(PACKAGE_DIR
)/$(INSTALL_FLAG_FILE
)
260 .ELSE
# "$(INSTALL_ACTION)"=="none" || "$(INSTALL_ACTION)"==""
261 -$(MKDIR
) $(P_INSTALL_DIR
)
262 -$(MKDIR
) $(P_INSTALL_TARGET_DIR
)
263 cd
$(P_INSTALL_DIR
) && $(INSTALL_ACTION
) $(INSTALL_FLAGS
) && $(TOUCH
) $(INSTALL_FLAG_FILE
)
264 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
)
269 $(COPY
) $(foreach,i
,$(OUT2LIB
) $(PACKAGE_DIR
)/$(TARFILE_ROOTDIR
)/$i) $(LB
)
270 .IF
"$(OS)"=="MACOSX"
271 $(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl extshl \
273 $(shell ls
$(foreach,j
,$(OUT2LIB
) $(LB
)/$(j
:f
)) | \
274 (grep
-v
'\.a$$' ||
test $$?
= 1))
276 .ENDIF
# "$(OUT2LIB)"!=""
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
) $(COPYRECURSE
) $(foreach,i
,$(OUTDIR2INC
) $(PACKAGE_DIR
)/$(TARFILE_ROOTDIR
)/$i) $(INCCOM
)
287 .ENDIF
# "$(OUTDIR2INC)"!=""
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 $(COPY
) $(foreach,i
,$(OUT2CLASS
) $(PACKAGE_DIR
)/$(TARFILE_ROOTDIR
)/$i) $(CLASSDIR
)
299 .ENDIF
# "$(OUT2BIN)"!=""
300 $(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 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)"!=""
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 # cd $(MISC) && ( $(TYPE:s/+//) $(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d "\015" | patch $(PATCHFLAGS) -p2 )
319 #.ELSE # "$(my4ver:s/.//:s/,//)" >= "300"
320 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 cd
$(MISC
) && $(TYPE
) $(BACK_PATH
)$(PATH_IN_MODULE
)/{$(PATCH_FILES
)} |
$(GNUPATCH
) -f
$(PATCHFLAGS
) -p2
325 .ELSE
# "$(BSCLIENT)"!=""
326 cd
$(MISC
) && $(TYPE
) $(MBACK_PATH
)$(PATH_IN_MODULE
)/{$(PATCH_FILES
)} |
$(GNUPATCH
) $(PATCHFLAGS
) -p2
327 .ENDIF
# "$(BSCLIENT)"!=""
328 .ENDIF
# "$(GUI)"=="WNT"
329 .IF
"$(CONVERTFILES)"!=""
330 $(CONVERT
) dos
$(foreach,i
,$(CONVERTFILES
) $(MISC
)/$(TARFILE_ROOTDIR
)/$i)
331 .ENDIF
# "$(CONVERTFILES)"!=""
332 .ENDIF
# "$(PATCH_FILES)"!="none" && "$(PATCH_FILES)"!="
335 .ENDIF
# "$(GUI)"=="UNX"
337 .IF
"$(T_ADDITIONAL_FILES)"!=""
338 $(T_ADDITIONAL_FILES
:+".dummy") : $(PACKAGE_DIR
)/$(UNTAR_FLAG_FILE
)
339 @
-$(MKDIRHIER
) $(@
:d
)
342 -echo dummy
> $(@
:d
)$(@
:b
)
343 -$(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 -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 -mv
$(PRJ
)/$(PATH_IN_MODULE
)/$(NEW_PATCH_FILE_NAME
) $(PRJ
)/$(PATH_IN_MODULE
)/$(NEW_PATCH_FILE_NAME
).bak
354 -$(TOUCH
) $(PRJ
)/$(PATH_IN_MODULE
)/$(NEW_PATCH_FILE_NAME
).bak
355 $(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 $(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)
364 patch : $(PACKAGE_DIR)/$(PATCH_FLAG_FILE)
367 .ENDIF # "$(L10N_framework)"==""