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: extractfiles.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 #*************************************************************************
32 MOZTARGET
=$(OS
)$(COM
)$(CPU
)
33 MOZ_DIST_DIR
=$(MISC
)$/build
$/mozilla
$/dist
34 MOZ_BIN_DIR
=$(MOZ_DIST_DIR
)$/bin
35 RUNTIME_DIR
=$(MISC
)$/$(MOZTARGET
)runtime
58 .ELSE
#"$(GUI)"=="WNT"
67 COMPONENT_RUNTIMELIST
= \
81 COMPONENT_RUNTIMELIST
+= \
84 .ELSE
#"$(GUI)"=="WNT"
85 COMPONENT_RUNTIMELIST
+= \
90 COMREGISTRY_FILELIST
= \
94 xpcom_components.xpt \
103 COMREGISTRY_FILELIST
+= xpcom_thread.xpt
104 .ELSE
#"$(GUI)"=="WNT"
105 COMREGISTRY_FILELIST
+= xpcom_threads.xpt
108 DEFAULTS_RUNTIMELIST
= \
109 defaults
$/pref
$/browser-prefs.js \
110 defaults
$/pref
$/mailnews.js \
111 defaults
$/pref
$/mdn.js \
112 defaults
$/pref
$/smime.js \
113 defaults
$/autoconfig
$/platform.js \
114 defaults
$/autoconfig
$/prefcalls.js \
116 greprefs
$/security-prefs.js
126 libxpcom_core.dll.a \
145 .ELSE
#"$(GUI)"=="WNT"
151 libxpcom_core
$(DLLPOST
) \
153 libmsgbaseutil
$(DLLPOST
) \
154 libldap50
$(DLLPOST
) \
155 libsoftokn3
$(DLLPOST
) \
163 INCLUDE_PATH
=$(MOZ_DIST_DIR
)$/include$/
164 PUBLIC_PATH
=$(MOZ_DIST_DIR
)$/public
$/
169 .ELSE
#"$(GUI)"=="WNT"
173 # --- Targets ------------------------------------------------------
175 extract_mozab_files
: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
) \
177 $(MISC
)$/build
$/so_moz_runtime_files \
178 $(MISC
)$/build
$/so_moz_include_files \
179 $(MISC
)$/build
$/so_moz_lib_files
182 @@
-$(MKDIR
) $(RUNTIME_DIR
)
183 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/components
184 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/defaults
185 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/defaults
$/pref
186 @@
-$(MKDIR
) $(LIB_DIR
)
187 @@
-$(MKDIR
) $(INCLUDE_DIR
)
188 .IF
"$(OS)"=="SOLARIS"
189 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/res
192 $(OUT
)$/bin
$/mozruntime.zip
: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
195 $(MISC
)$/build
$/so_moz_runtime_files
: $(OUT
)$/bin
$/mozruntime.zip
196 # copy files in BIN_RUNTIMELIST
197 $(foreach,file
,$(BIN_RUNTIMELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/$(DLLPRE
)$(file
)$(DLLPOST
) \
198 $(RUNTIME_DIR
)$/$(DLLPRE
)$(file
)$(DLLPOST
) &&) \
200 .IF
"$(GUI)" == "UNX"
201 $(foreach,file
,$(BIN_RUNTIMELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/$(DLLPRE
)$(file
)$(DLLPOST
) \
202 $(LIB_DIR
)$/$(DLLPRE
)$(file
)$(DLLPOST
) &&) \
206 # copy files in RES_FILELIST
207 .IF
"$(OS)"=="SOLARIS"
208 @
$(COPY
) $(MOZ_BIN_DIR
)$/res
$/charsetalias.properties
$(RUNTIME_DIR
)$/res
$/charsetalias.properties
210 @echo No Res Files to copy.
213 # copy files in COMPONENT_RUNTIMELIST
214 $(foreach,file
,$(COMPONENT_RUNTIMELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/components
$/$(DLLPRE
)$(file
)$(DLLPOST
) \
215 $(RUNTIME_DIR
)$/components
$/$(DLLPRE
)$(file
)$(DLLPOST
) &&) \
218 # copy files in COMREGISTRY_FILELIST
219 $(foreach,file
,$(COMREGISTRY_FILELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/components
$/$(file
) \
220 $(RUNTIME_DIR
)$/components
$/$(file
) &&) \
223 # copy files in DEFAULTS_RUNTIMELIST
224 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/defaults
$/pref
225 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/defaults
$/autoconfig
226 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/greprefs
227 $(foreach,file
,$(DEFAULTS_RUNTIMELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/$(file
) $(RUNTIME_DIR
)$/$(file
) &&) \
230 @
$(COPY
) $(MOZ_BIN_DIR
)$/regxpcom
$(REG_SUBFIX
) $(RUNTIME_DIR
)$/regxpcom
$(REG_SUBFIX
)
233 .IF
"$(OS)"!="MACOSX"
234 cd
$(RUNTIME_DIR
) && strip *$(DLLPOST
)
235 cd
$(RUNTIME_DIR
)$/components
&& strip *$(DLLPOST
)
238 .IF
"$(OS)"=="MACOSX"
239 $(PERL
) $(SOLARENV
)$/bin
$/macosx-change-install-names.pl extshl OOO \
240 $(RUNTIME_DIR
)$/*$(DLLPOST
)
241 # A crude hack to adapt all the install names in the components subdir:
242 $(foreach,file
,$(shell ls
$(RUNTIME_DIR
)$/components
$/*$(DLLPOST
)) \
244 -change @executable_path
/libldap50.dylib \
245 @loader_path
/..
/libldap50.dylib \
246 -change @executable_path
/libmozjs.dylib @loader_path
/..
/libmozjs.dylib \
247 -change @executable_path
/libmozz.dylib @loader_path
/..
/libmozz.dylib \
248 -change @executable_path
/libmsgbaseutil.dylib \
249 @loader_path
/..
/libmsgbaseutil.dylib \
250 -change @executable_path
/libnspr4.dylib @loader_path
/..
/libnspr4.dylib \
251 -change @executable_path
/libnss3.dylib @loader_path
/..
/libnss3.dylib \
252 -change @executable_path
/libplc4.dylib @loader_path
/..
/libplc4.dylib \
253 -change @executable_path
/libplds4.dylib @loader_path
/..
/libplds4.dylib \
254 -change @executable_path
/libprldap50.dylib \
255 @loader_path
/..
/libprldap50.dylib \
256 -change @executable_path
/libsmime3.dylib \
257 @loader_path
/..
/libsmime3.dylib \
258 -change @executable_path
/libsoftokn3.dylib \
259 @loader_path
/..
/libsoftokn3.dylib \
260 -change @executable_path
/libssl3.dylib @loader_path
/..
/libssl3.dylib \
261 -change @executable_path
/libxpcom.dylib @loader_path
/..
/libxpcom.dylib \
262 -change @executable_path
/libxpcom_compat.dylib \
263 @loader_path
/..
/libxpcom_compat.dylib \
267 # zip runtime files to mozruntime.zip
268 .IF
"$(OS)"=="MACOSX" ||
"$(OS)"=="LINUX"
269 cd
$(RUNTIME_DIR
) && sh ..
$/..
$/..
$/$(MOZ_BIN_DIR
)$/run-mozilla.sh .
$/regxpcom
$(REG_SUBFIX
)
272 cd
$(RUNTIME_DIR
) && .
$/regxpcom
$(REG_SUBFIX
)
273 $(COPY
) $(RUNTIME_DIR
)$/components
$/xpti.dat
$(RUNTIME_DIR
)$/components
$/xptitemp.dat
276 $(RM
) $(RUNTIME_DIR
)$/regxpcom
$(REG_SUBFIX
)
277 cd
$(RUNTIME_DIR
) && zip
-r ..
$/..
$/bin
$/mozruntime.zip
*
281 $(INCCOM
)$/nsBuildID.h
: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
282 @
-echo
"You can delete $(INCCOM) to force it copy all include files again."
284 $(MISC
)$/build
$/so_moz_include_files
: $(INCCOM
)$/nsBuildID.h
285 .IF
"$(USE_SHELL)"=="4nt"
286 $(COPY
) /QSZ
$(INCLUDE_PATH
)* $(INCLUDE_DIR
)
287 $(COPY
) /QSZ
$(PUBLIC_PATH
)* $(INCLUDE_DIR
)
289 .IF
"$(OS)"!="SOLARIS"
290 $(GNUCOPY
) -pRL
$(INCLUDE_PATH
)* $(INCLUDE_DIR
)
291 $(GNUCOPY
) -pRL
$(PUBLIC_PATH
)* $(INCLUDE_DIR
)
292 .ELSE
# "$(OS)"!="SOLARIS"
293 $(COPY
) -pr
$(INCLUDE_PATH
)* $(INCLUDE_DIR
)
294 $(COPY
) -pr
$(PUBLIC_PATH
)* $(INCLUDE_DIR
)
295 .ENDIF
# "$(OS)"!="SOLARIS"
299 chmod
-R
775 $(INCCOM
)
303 # On UNX the rules for so_moz_runtime_files copy files into the same directory
304 # used here (LIB_DIR), and on MACOSX all those files together need to be
305 # processed here, hence the dependency on so_moz_runtime_files:
306 $(MISC
)$/build
$/so_moz_lib_files
: $(foreach,file
,$(LIBLIST
) $(LIB_DIR
)$/$(file
)) $(MISC
)$/build
$/so_moz_runtime_files
307 echo
$(foreach,file
,$(LIBLIST
) $(MOZ_DIST_DIR
)$/lib
$/$(file
))
308 $(foreach,file
,$(LIBLIST
) $(COPY
) $(MOZ_DIST_DIR
)$/lib
$/$(file
) \
309 $(LIB_DIR
)$/$(file
) &&) \
311 .IF
"$(OS)"=="MACOSX"
312 $(PERL
) $(SOLARENV
)$/bin
$/macosx-change-install-names.pl extshl OOO \
313 $(LIB_DIR
)$/*$(DLLPOST
)
320 $(BIN_RUNTIMELIST
): $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
321 @
$(COPY
) $(MOZ_BIN_DIR
)$/$(DLLPRE
)$@
$(DLLPOST
) $(RUNTIME_DIR
)$/$(DLLPRE
)$@
$(DLLPOST
)
323 $(COMPONENT_RUNTIMELIST
): $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
324 @
$(COPY
) $(MOZ_BIN_DIR
)$/components
$/$(DLLPRE
)$@
$(DLLPOST
) $(RUNTIME_DIR
)$/components
$/$(DLLPRE
)$@
$(DLLPOST
)
326 $(COMREGISTRY_FILELIST
): $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
327 @
$(COPY
) $(MOZ_BIN_DIR
)$/components
$/$@
$(RUNTIME_DIR
)$/components
$/$@
329 $(DEFAULTS_RUNTIMELIST
): $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
330 @
$(COPY
) $(MOZ_BIN_DIR
)$/$@
$(RUNTIME_DIR
)$/$@
332 RES_FILELIST
: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
333 .IF
"$(OS)"=="SOLARIS"
334 @
$(COPY
) $(MOZ_BIN_DIR
)$/res
$/charsetalias.properties
$(RUNTIME_DIR
)$/res
$/charsetalias.properties
336 @echo No Res Files to copy.
340 $(LIB_DIR
)$/%: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
343 $(MISC
)$/CREATETARBALL
: extract_mozab_files
344 @@
-$(MKDIR
) $(OUT
)$/zipped
345 $(COPY
) $(BIN
)$/mozruntime.zip
$(OUT
)$/zipped
$/$(MOZTARGET
)runtime.zip
347 .IF
"$(OS)"!="MACOSX"
348 cd
$(LB
) && strip *$(DLLPOST
)
351 cd
$(LB
) && zip
-r ..
$/zipped
$/$(MOZTARGET
)lib.zip
*
352 cd
$(INCCOM
) && zip
-r ..
$/zipped
$/$(MOZTARGET
)inc.zip
*