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: makefile.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 #*************************************************************************
36 # -----------------------------------------------------------------------------
37 # include global settings
38 # -----------------------------------------------------------------------------
42 # -----------------------------------------------------------------------------
43 # include all package definition files
44 # -----------------------------------------------------------------------------
46 .INCLUDE
: packagedef.mk
48 # -----------------------------------------------------------------------------
49 # list of all required destination files
50 # -----------------------------------------------------------------------------
52 REALFILTERPACKAGES_TYPES_FLAG
= \
53 $(DIR_FILTERCFGOUT
)$/fcfg_base.types_flag \
54 $(DIR_FILTERCFGOUT
)$/fcfg_writer.types_flag \
55 $(DIR_FILTERCFGOUT
)$/fcfg_web.types_flag \
56 $(DIR_FILTERCFGOUT
)$/fcfg_global.types_flag \
57 $(DIR_FILTERCFGOUT
)$/fcfg_w4w.types_flag \
58 $(DIR_FILTERCFGOUT
)$/fcfg_calc.types_flag \
59 $(DIR_FILTERCFGOUT
)$/fcfg_draw.types_flag \
60 $(DIR_FILTERCFGOUT
)$/fcfg_impress.types_flag \
61 $(DIR_FILTERCFGOUT
)$/fcfg_database.types_flag \
62 $(DIR_FILTERCFGOUT
)$/fcfg_chart.types_flag \
63 $(DIR_FILTERCFGOUT
)$/fcfg_math.types_flag \
64 $(DIR_FILTERCFGOUT
)$/fcfg_xslt.types_flag \
65 $(DIR_FILTERCFGOUT
)$/fcfg_palm.types_flag \
66 $(DIR_FILTERCFGOUT
)$/fcfg_pocketexcel.types_flag \
67 $(DIR_FILTERCFGOUT
)$/fcfg_pocketword.types_flag \
68 $(DIR_FILTERCFGOUT
)$/fcfg_drawgraphics.types_flag \
69 $(DIR_FILTERCFGOUT
)$/fcfg_impressgraphics.types_flag
71 .IF
"$(WITH_BINFILTER)" != "NO"
72 REALFILTERPACKAGES_TYPES_FLAG
+= \
73 $(DIR_FILTERCFGOUT
)$/fcfg_writer_bf.types_flag \
74 $(DIR_FILTERCFGOUT
)$/fcfg_web_bf.types_flag \
75 $(DIR_FILTERCFGOUT
)$/fcfg_global_bf.types_flag \
76 $(DIR_FILTERCFGOUT
)$/fcfg_calc_bf.types_flag \
77 $(DIR_FILTERCFGOUT
)$/fcfg_draw_bf.types_flag \
78 $(DIR_FILTERCFGOUT
)$/fcfg_impress_bf.types_flag \
79 $(DIR_FILTERCFGOUT
)$/fcfg_chart_bf.types_flag \
80 $(DIR_FILTERCFGOUT
)$/fcfg_math_bf.types_flag
83 REALFILTERPACKAGES_FILTERS_FLAG
= \
84 $(DIR_FILTERCFGOUT
)$/fcfg_base.filters_flag \
85 $(DIR_FILTERCFGOUT
)$/fcfg_writer.filters_flag \
86 $(DIR_FILTERCFGOUT
)$/fcfg_web.filters_flag \
87 $(DIR_FILTERCFGOUT
)$/fcfg_global.filters_flag \
88 $(DIR_FILTERCFGOUT
)$/fcfg_w4w.filters_flag \
89 $(DIR_FILTERCFGOUT
)$/fcfg_calc.filters_flag \
90 $(DIR_FILTERCFGOUT
)$/fcfg_draw.filters_flag \
91 $(DIR_FILTERCFGOUT
)$/fcfg_impress.filters_flag \
92 $(DIR_FILTERCFGOUT
)$/fcfg_database.filters_flag \
93 $(DIR_FILTERCFGOUT
)$/fcfg_chart.filters_flag \
94 $(DIR_FILTERCFGOUT
)$/fcfg_math.filters_flag \
95 $(DIR_FILTERCFGOUT
)$/fcfg_xslt.filters_flag \
96 $(DIR_FILTERCFGOUT
)$/fcfg_palm.filters_flag \
97 $(DIR_FILTERCFGOUT
)$/fcfg_pocketexcel.filters_flag \
98 $(DIR_FILTERCFGOUT
)$/fcfg_pocketword.filters_flag \
99 $(DIR_FILTERCFGOUT
)$/fcfg_drawgraphics.filters_flag \
100 $(DIR_FILTERCFGOUT
)$/fcfg_impressgraphics.filters_flag
102 .IF
"$(WITH_BINFILTER)" != "NO"
103 REALFILTERPACKAGES_FILTERS_FLAG
+= \
104 $(DIR_FILTERCFGOUT
)$/fcfg_writer_bf.filters_flag \
105 $(DIR_FILTERCFGOUT
)$/fcfg_web_bf.filters_flag \
106 $(DIR_FILTERCFGOUT
)$/fcfg_global_bf.filters_flag \
107 $(DIR_FILTERCFGOUT
)$/fcfg_calc_bf.filters_flag \
108 $(DIR_FILTERCFGOUT
)$/fcfg_draw_bf.filters_flag \
109 $(DIR_FILTERCFGOUT
)$/fcfg_impress_bf.filters_flag \
110 $(DIR_FILTERCFGOUT
)$/fcfg_chart_bf.filters_flag \
111 $(DIR_FILTERCFGOUT
)$/fcfg_math_bf.filters_flag
114 REALFILTERPACKAGES_FILTERS_UI_MERGE
= \
115 $(DIR_LOCMERGE
)$/filter_ui.xcu
117 REALFILTERPACKAGES_FILTERS_UI_LANGPACKS
= \
118 $(foreach,i
,$(alllangiso
) $(DIR_LANGPACK
)$/$i$/org
$/openoffice
$/TypeDetection
$/Filter.xcu
)
120 REALFILTERPACKAGES_FILTERS_UI_LANGPACKS_PACKED
= \
121 $(foreach,i
,$(alllangiso
) $(COMMONBIN
)$/fcfg_langpack_
$i.zip
)
123 REALFILTERPACKAGES_OTHERS_FLAG
= \
124 $(DIR_FILTERCFGOUT
)$/fcfg_base.others_flag \
125 $(DIR_FILTERCFGOUT
)$/fcfg_writer.others_flag \
126 $(DIR_FILTERCFGOUT
)$/fcfg_web.others_flag \
127 $(DIR_FILTERCFGOUT
)$/fcfg_global.others_flag \
128 $(DIR_FILTERCFGOUT
)$/fcfg_w4w.others_flag \
129 $(DIR_FILTERCFGOUT
)$/fcfg_calc.others_flag \
130 $(DIR_FILTERCFGOUT
)$/fcfg_draw.others_flag \
131 $(DIR_FILTERCFGOUT
)$/fcfg_impress.others_flag \
132 $(DIR_FILTERCFGOUT
)$/fcfg_database.others_flag \
133 $(DIR_FILTERCFGOUT
)$/fcfg_chart.others_flag \
134 $(DIR_FILTERCFGOUT
)$/fcfg_math.others_flag \
135 $(DIR_FILTERCFGOUT
)$/fcfg_xslt.others_flag \
136 $(DIR_FILTERCFGOUT
)$/fcfg_palm.others_flag \
137 $(DIR_FILTERCFGOUT
)$/fcfg_pocketexcel.others_flag \
138 $(DIR_FILTERCFGOUT
)$/fcfg_pocketword.others_flag \
139 $(DIR_FILTERCFGOUT
)$/fcfg_drawgraphics.others_flag \
140 $(DIR_FILTERCFGOUT
)$/fcfg_impressgraphics.others_flag
142 .IF
"$(WITH_BINFILTER)" != "NO"
143 REALFILTERPACKAGES_OTHERS_FLAG
+= \
144 $(DIR_FILTERCFGOUT
)$/fcfg_writer_bf.others_flag \
145 $(DIR_FILTERCFGOUT
)$/fcfg_web_bf.others_flag \
146 $(DIR_FILTERCFGOUT
)$/fcfg_global_bf.others_flag \
147 $(DIR_FILTERCFGOUT
)$/fcfg_calc_bf.others_flag \
148 $(DIR_FILTERCFGOUT
)$/fcfg_draw_bf.others_flag \
149 $(DIR_FILTERCFGOUT
)$/fcfg_impress_bf.others_flag \
150 $(DIR_FILTERCFGOUT
)$/fcfg_chart_bf.others_flag \
151 $(DIR_FILTERCFGOUT
)$/fcfg_math_bf.others_flag
154 INTERNALFILTERPACKAGES_TYPES_FLAG
= \
155 $(DIR_FILTERCFGOUT
)$/fcfg_internalgraphics.types_flag
157 INTERNALFILTERPACKAGES_FILTERS_FLAG
= \
158 $(DIR_FILTERCFGOUT
)$/fcfg_internalgraphics.filters_flag
161 $(REALFILTERPACKAGES_TYPES_FLAG
) \
162 $(REALFILTERPACKAGES_FILTERS_FLAG
) \
163 $(REALFILTERPACKAGES_FILTERS_UI_MERGE
) \
164 $(REALFILTERPACKAGES_FILTERS_UI_LANGPACKS
) \
165 $(REALFILTERPACKAGES_OTHERS_FLAG
) \
166 $(INTERNALFILTERPACKAGES_TYPES_FLAG
) \
167 $(INTERNALFILTERPACKAGES_FILTERS_FLAG
)
169 # -----------------------------------------------------------------------------
171 # -----------------------------------------------------------------------------
173 zip1generatedlangs
=TRUE
174 zip1langdirs
=$(alllangiso
)
175 ZIP1TARGET
=fcfg_langpack
177 ZIP1DIR
=$(DIR_LANGPACK
)$/$(LANGDIR
)
178 ZIP1LIST
=$(LANGDIR
)$/*
182 ALLTAR
: $(ALL_FLAGS
)
184 $(ALL_FLAGS
) : $(INCLUDE_FRAGMENTS
)
186 .IF
"$(SOLAR_JAVA)"==""
187 #cmc, hack to workaround the java build requirement
188 MERGE
:=python ..
/tools
/merge
/pyAltFCFGMerge
190 MERGE
:= $(JAVAI
) -jar
$(SOLARBINDIR
)$/FCFGMerge.jar
193 PACKLANG
:= $(XSLTPROC
) --nonet
195 PACKLANG_PARAM
:= --stringparam
198 # -----------------------------------------------------------------------------
199 # build every module seperated
200 # -----------------------------------------------------------------------------
202 $(REALFILTERPACKAGES_TYPES_FLAG
) : $$(TYPES_4
$$(@
:b
))
203 @echo
===================================================================
204 @echo Merge type fragments for package
$@
205 @echo
===================================================================
206 -$(MKDIRHIER
) $(DIR_MODPACKS
)
207 $(MERGE
) fragmentsdir
=. tempdir
=$(TEMP
) outdir
=$(DIR_MODPACKS
) pkg
=$(DIR_MODPACKS
)$/$(@
:b
)_types.xcu xmlpackage
=Types tcfg
=$(mktmp items
=$(TYPES_4
$(@
:b
):b
:t
",":s
/.xcu
//)) && $(TOUCH
) $@
209 $(REALFILTERPACKAGES_FILTERS_UI_MERGE
) : $(ALL_UI_FILTERS
)
210 @echo
===================================================================
211 @echo Merge localized
filter fragments for package
$@
212 @echo
===================================================================
213 -$(MKDIRHIER
) $(DIR_LOCMERGE
)
214 $(MERGE
) fragmentsdir
=$(DIR_LOCFRAG
) tempdir
=$(TEMP
) pkg
=$@ xmlpackage
=Filter fcfg
=$(mktmp items
=$(ALL_UI_FILTERS
:b
:t
",")) languagepack
=true
216 # Note: The used XSL transformation returns errors on stderr.
217 # But they dont do it in case we use the -OUT parameter.
218 # So we have to dump stdout to the target file and let stderr messages break the build!
219 $(REALFILTERPACKAGES_FILTERS_UI_LANGPACKS
) : $(REALFILTERPACKAGES_FILTERS_UI_MERGE
)
220 @echo
===================================================================
221 @echo Building language packages
$(@
:b
:s
/Filter_
//) for filters
222 @echo
===================================================================
223 +-$(MKDIRHIER
) $(@
:d
)
224 $(PACKLANG
) $(PACKLANG_PARAM
) lang
$(@
:d
:d
:d
:d
:d
:d
:d
:d
:b
) $(PACKLANG_XSL
) langfilter.xsl
$(PACKLANG_IN
) $< > $@
226 $(REALFILTERPACKAGES_FILTERS_UI_LANGPACKS_PACKED
) : $(REALFILTERPACKAGES_FILTERS_UI_LANGPACKS
)
228 $(REALFILTERPACKAGES_FILTERS_FLAG
) : $$(FILTERS_4
$$(@
:b
))
229 @echo
===================================================================
230 @echo Building packages
filter $@
231 @echo
===================================================================
232 -$(MKDIRHIER
) $(DIR_MODPACKS
)
233 $(MERGE
) fragmentsdir
=. tempdir
=$(TEMP
) outdir
=$(DIR_MODPACKS
) pkg
=$(DIR_MODPACKS
)$/$(@
:b
)_filters.xcu xmlpackage
=Filter fcfg
=$(mktmp items
=$(FILTERS_4
$(@
:b
):b
:t
",":s
/.xcu
//)) && $(TOUCH
) $@
235 $(REALFILTERPACKAGES_OTHERS_FLAG
) : $$(ALL_4
$$(@
:b
))
236 @echo
===================================================================
237 @echo Building packages others
$@
238 @echo
===================================================================
239 -$(MKDIRHIER
) $(DIR_MODPACKS
)
240 $(MERGE
) fragmentsdir
=. tempdir
=$(TEMP
) outdir
=$(DIR_MODPACKS
) pkg
=$(DIR_MODPACKS
)$/$(@
:b
)_others.xcu xmlpackage
=Misc lcfg
=$(mktmp items
=$(FRAMELOADERS_4
$(@
:b
):b
:t
",":s
/.xcu
//)) ccfg
=$(mktmp items
=$(CONTENTHANDLERS_4
$(@
:b
):b
:t
",":s
/.xcu
//)) && $(TOUCH
) $@
242 $(INTERNALFILTERPACKAGES_TYPES_FLAG
) : $$(TYPES_4
$$(@
:b
))
243 @echo
===================================================================
244 @echo Building special packages types
$@
245 @echo
===================================================================
246 -$(MKDIRHIER
) $(DIR_MODPACKS
)
247 $(MERGE
) fragmentsdir
=. tempdir
=$(TEMP
) outdir
=$(DIR_MODPACKS
) pkg
=$(DIR_MODPACKS
)$/$(@
:b
)_types.xcu xmlpackage
=Types tcfg
=$(mktmp items
=$(TYPES_4
$(@
:b
):b
:t
",":s
/.xcu
//)) && $(TOUCH
) $@
249 $(INTERNALFILTERPACKAGES_FILTERS_FLAG
) : $$(FILTERS_4
$$(@
:b
))
250 @echo
===================================================================
251 @echo Building special packages
filter $@
252 @echo
===================================================================
253 -$(MKDIRHIER
) $(DIR_MODPACKS
)
254 $(MERGE
) fragmentsdir
=. tempdir
=$(TEMP
) outdir
=$(DIR_MODPACKS
) pkg
=$(DIR_MODPACKS
)$/$(@
:b
)_filters.xcu xmlpackage
=GraphicFilter fcfg
=$(mktmp items
=$(FILTERS_4
$(@
:b
):b
:t
",":s
/.xcu
//)) subdir_filters
=internalgraphicfilters
&& $(TOUCH
) $@