1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
28 MOZTARGET
=$(OS
)$(COM
)$(CPU
)
29 MOZ_DIST_DIR
=$(MISC
)$/build
$/mozilla
$/$(BUILD_DIR
)$/dist
30 MOZ_BIN_DIR
=$(MOZ_DIST_DIR
)$/bin
31 RUNTIME_DIR
=$(MISC
)$/$(MOZTARGET
)runtime
45 COMPONENT_RUNTIMELIST
= \
60 COMREGISTRY_FILELIST
= \
64 xpcom_components.xpt \
73 DEFAULTS_RUNTIMELIST
= \
74 defaults
$/pref
$/browser-prefs.js \
75 defaults
$/pref
$/mailnews.js \
76 defaults
$/pref
$/mdn.js \
77 defaults
$/pref
$/smime.js \
78 defaults
$/autoconfig
$/platform.js \
79 defaults
$/autoconfig
$/prefcalls.js \
81 greprefs
$/security-prefs.js
92 INCLUDE_PATH
=$(MOZ_DIST_DIR
)$/include$/
93 PUBLIC_PATH
=$(MOZ_DIST_DIR
)$/public
$/
98 # --- Targets ------------------------------------------------------
100 extract_mozab_files
: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
) \
102 $(MISC
)$/build
$/so_moz_runtime_files \
103 $(MISC
)$/build
$/so_moz_include_files \
104 $(MISC
)$/build
$/so_moz_lib_files
107 @@
-$(MKDIRHIER
) $(RUNTIME_DIR
)
108 @@
-$(MKDIRHIER
) $(RUNTIME_DIR
)$/components
109 @@
-$(MKDIRHIER
) $(RUNTIME_DIR
)$/defaults
110 @@
-$(MKDIRHIER
) $(RUNTIME_DIR
)$/defaults
$/pref
111 @@
-$(MKDIRHIER
) $(LIB_DIR
)
112 @@
-$(MKDIRHIER
) $(INCLUDE_DIR
)
113 .IF
"$(OS)"=="SOLARIS"
114 @@
-$(MKDIRHIER
) $(RUNTIME_DIR
)$/res
117 $(OUT
)$/bin
$/mozruntime.zip
: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
120 $(MISC
)$/build
$/so_moz_runtime_files
: $(OUT
)$/bin
$/mozruntime.zip
121 # copy files in BIN_RUNTIMELIST
122 $(foreach,file
,$(BIN_RUNTIMELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/$(DLLPRE
)$(file
)$(DLLPOST
) \
123 $(RUNTIME_DIR
)$/$(DLLPRE
)$(file
)$(DLLPOST
) &&) \
126 # copy files in COMPONENT_RUNTIMELIST
127 $(foreach,file
,$(COMPONENT_RUNTIMELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/components
$/$(DLLPRE
)$(file
)$(DLLPOST
) \
128 $(RUNTIME_DIR
)$/components
$/$(DLLPRE
)$(file
)$(DLLPOST
) &&) \
131 # copy files in COMREGISTRY_FILELIST
132 $(foreach,file
,$(COMREGISTRY_FILELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/components
$/$(file
) \
133 $(RUNTIME_DIR
)$/components
$/$(file
) &&) \
136 # copy files in DEFAULTS_RUNTIMELIST
137 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/defaults
$/pref
138 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/defaults
$/autoconfig
139 @@
-$(MKDIR
) $(RUNTIME_DIR
)$/greprefs
140 $(foreach,file
,$(DEFAULTS_RUNTIMELIST
) $(COPY
) $(MOZ_BIN_DIR
)$/$(file
) $(RUNTIME_DIR
)$/$(file
) &&) \
144 # zip runtime files to mozruntime.zip
145 cd
$(RUNTIME_DIR
) && zip
-r ..
$/..
$/bin
$/mozruntime.zip
*
149 $(INCCOM
)$/nsBuildID.h
: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
150 @
-echo
"You can delete $(INCCOM) to force it copy all include files again."
153 $(MISC
)$/build
$/so_moz_include_files
: $(INCCOM
)$/nsBuildID.h
154 $(COPY
) -pr
$(INCLUDE_PATH
)* $(INCLUDE_DIR
)
155 $(COPY
) -pr
$(PUBLIC_PATH
)* $(INCLUDE_DIR
)
158 # On UNX the rules for so_moz_runtime_files copy files into the same directory
159 # used here (LIB_DIR), and on MACOSX all those files together need to be
160 # processed here, hence the dependency on so_moz_runtime_files:
161 $(MISC
)$/build
$/so_moz_lib_files
: $(foreach,file
,$(LIBLIST
) $(LIB_DIR
)$/$(file
)) $(MISC
)$/build
$/so_moz_runtime_files
162 echo
$(foreach,file
,$(LIBLIST
) $(MOZ_DIST_DIR
)$/lib
$/$(file
))
163 $(foreach,file
,$(LIBLIST
) $(COPY
) $(MOZ_DIST_DIR
)$/lib
$/$(file
) \
164 $(LIB_DIR
)$/$(file
) &&) \
168 $(BIN_RUNTIMELIST
): $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
169 @
$(COPY
) $(MOZ_BIN_DIR
)$/$(DLLPRE
)$@
$(DLLPOST
) $(RUNTIME_DIR
)$/$(DLLPRE
)$@
$(DLLPOST
)
171 $(COMPONENT_RUNTIMELIST
): $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
172 @
$(COPY
) $(MOZ_BIN_DIR
)$/components
$/$(DLLPRE
)$@
$(DLLPOST
) $(RUNTIME_DIR
)$/components
$/$(DLLPRE
)$@
$(DLLPOST
)
174 $(COMREGISTRY_FILELIST
): $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
175 @
$(COPY
) $(MOZ_BIN_DIR
)$/components
$/$@
$(RUNTIME_DIR
)$/components
$/$@
177 $(DEFAULTS_RUNTIMELIST
): $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
178 @
$(COPY
) $(MOZ_BIN_DIR
)$/$@
$(RUNTIME_DIR
)$/$@
180 $(LIB_DIR
)$/%: $(PACKAGE_DIR
)$/$(PREDELIVER_FLAG_FILE
)
183 $(MISC
)$/CREATETARBALL
: extract_mozab_files
184 @@
-$(MKDIR
) $(OUT
)$/zipped
185 $(COPY
) $(BIN
)$/mozruntime.zip
$(OUT
)$/zipped
$/$(MOZTARGET
)runtime.zip
186 cd
$(LB
) && zip
-r ..
$/zipped
$/$(MOZTARGET
)lib.zip
*
187 cd
$(INCCOM
) && zip
-r ..
$/zipped
$/$(MOZTARGET
)inc.zip
*