1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24PRJ = ..$/..$/.. 25TARGET = FCFGPkg 26PRJNAME = filter 27 28# ----------------------------------------------------------------------------- 29# include global settings 30# ----------------------------------------------------------------------------- 31 32.INCLUDE: settings.mk 33 34# ----------------------------------------------------------------------------- 35# include all package definition files 36# ----------------------------------------------------------------------------- 37 38.INCLUDE: packagedef.mk 39 40# ----------------------------------------------------------------------------- 41# list of all required destination files 42# ----------------------------------------------------------------------------- 43 44REALFILTERPACKAGES_TYPES_FLAG = \ 45 $(DIR_FILTERCFGOUT)$/fcfg_base.types_flag \ 46 $(DIR_FILTERCFGOUT)$/fcfg_writer.types_flag \ 47 $(DIR_FILTERCFGOUT)$/fcfg_web.types_flag \ 48 $(DIR_FILTERCFGOUT)$/fcfg_global.types_flag \ 49 $(DIR_FILTERCFGOUT)$/fcfg_w4w.types_flag \ 50 $(DIR_FILTERCFGOUT)$/fcfg_calc.types_flag \ 51 $(DIR_FILTERCFGOUT)$/fcfg_draw.types_flag \ 52 $(DIR_FILTERCFGOUT)$/fcfg_impress.types_flag \ 53 $(DIR_FILTERCFGOUT)$/fcfg_database.types_flag \ 54 $(DIR_FILTERCFGOUT)$/fcfg_chart.types_flag \ 55 $(DIR_FILTERCFGOUT)$/fcfg_math.types_flag \ 56 $(DIR_FILTERCFGOUT)$/fcfg_xslt.types_flag \ 57 $(DIR_FILTERCFGOUT)$/fcfg_palm.types_flag \ 58 $(DIR_FILTERCFGOUT)$/fcfg_pocketexcel.types_flag \ 59 $(DIR_FILTERCFGOUT)$/fcfg_pocketword.types_flag \ 60 $(DIR_FILTERCFGOUT)$/fcfg_drawgraphics.types_flag \ 61 $(DIR_FILTERCFGOUT)$/fcfg_impressgraphics.types_flag 62 63REALFILTERPACKAGES_FILTERS_FLAG = \ 64 $(DIR_FILTERCFGOUT)$/fcfg_base.filters_flag \ 65 $(DIR_FILTERCFGOUT)$/fcfg_writer.filters_flag \ 66 $(DIR_FILTERCFGOUT)$/fcfg_web.filters_flag \ 67 $(DIR_FILTERCFGOUT)$/fcfg_global.filters_flag \ 68 $(DIR_FILTERCFGOUT)$/fcfg_w4w.filters_flag \ 69 $(DIR_FILTERCFGOUT)$/fcfg_calc.filters_flag \ 70 $(DIR_FILTERCFGOUT)$/fcfg_draw.filters_flag \ 71 $(DIR_FILTERCFGOUT)$/fcfg_impress.filters_flag \ 72 $(DIR_FILTERCFGOUT)$/fcfg_database.filters_flag \ 73 $(DIR_FILTERCFGOUT)$/fcfg_chart.filters_flag \ 74 $(DIR_FILTERCFGOUT)$/fcfg_math.filters_flag \ 75 $(DIR_FILTERCFGOUT)$/fcfg_xslt.filters_flag \ 76 $(DIR_FILTERCFGOUT)$/fcfg_palm.filters_flag \ 77 $(DIR_FILTERCFGOUT)$/fcfg_pocketexcel.filters_flag \ 78 $(DIR_FILTERCFGOUT)$/fcfg_pocketword.filters_flag \ 79 $(DIR_FILTERCFGOUT)$/fcfg_drawgraphics.filters_flag \ 80 $(DIR_FILTERCFGOUT)$/fcfg_impressgraphics.filters_flag 81 82REALFILTERPACKAGES_FILTERS_UI_MERGE = \ 83 $(DIR_LOCMERGE)$/filter_ui.xcu 84 85REALFILTERPACKAGES_FILTERS_UI_LANGPACKS = \ 86 $(foreach,i,$(alllangiso) $(DIR_LANGPACK)$/$i$/org$/openoffice$/TypeDetection$/Filter.xcu) 87 88REALFILTERPACKAGES_FILTERS_UI_LANGPACKS_PACKED = \ 89 $(foreach,i,$(alllangiso) $(COMMONBIN)$/fcfg_langpack_$i.zip) 90 91REALFILTERPACKAGES_OTHERS_FLAG = \ 92 $(DIR_FILTERCFGOUT)$/fcfg_base.others_flag \ 93 $(DIR_FILTERCFGOUT)$/fcfg_writer.others_flag \ 94 $(DIR_FILTERCFGOUT)$/fcfg_web.others_flag \ 95 $(DIR_FILTERCFGOUT)$/fcfg_global.others_flag \ 96 $(DIR_FILTERCFGOUT)$/fcfg_w4w.others_flag \ 97 $(DIR_FILTERCFGOUT)$/fcfg_calc.others_flag \ 98 $(DIR_FILTERCFGOUT)$/fcfg_draw.others_flag \ 99 $(DIR_FILTERCFGOUT)$/fcfg_impress.others_flag \ 100 $(DIR_FILTERCFGOUT)$/fcfg_database.others_flag \ 101 $(DIR_FILTERCFGOUT)$/fcfg_chart.others_flag \ 102 $(DIR_FILTERCFGOUT)$/fcfg_math.others_flag \ 103 $(DIR_FILTERCFGOUT)$/fcfg_xslt.others_flag \ 104 $(DIR_FILTERCFGOUT)$/fcfg_palm.others_flag \ 105 $(DIR_FILTERCFGOUT)$/fcfg_pocketexcel.others_flag \ 106 $(DIR_FILTERCFGOUT)$/fcfg_pocketword.others_flag \ 107 $(DIR_FILTERCFGOUT)$/fcfg_drawgraphics.others_flag \ 108 $(DIR_FILTERCFGOUT)$/fcfg_impressgraphics.others_flag 109 110INTERNALFILTERPACKAGES_TYPES_FLAG = \ 111 $(DIR_FILTERCFGOUT)$/fcfg_internalgraphics.types_flag 112 113INTERNALFILTERPACKAGES_FILTERS_FLAG = \ 114 $(DIR_FILTERCFGOUT)$/fcfg_internalgraphics.filters_flag 115 116ALL_FLAGS = \ 117 $(REALFILTERPACKAGES_TYPES_FLAG) \ 118 $(REALFILTERPACKAGES_FILTERS_FLAG) \ 119 $(REALFILTERPACKAGES_FILTERS_UI_MERGE) \ 120 $(REALFILTERPACKAGES_FILTERS_UI_LANGPACKS) \ 121 $(REALFILTERPACKAGES_OTHERS_FLAG) \ 122 $(INTERNALFILTERPACKAGES_TYPES_FLAG) \ 123 $(INTERNALFILTERPACKAGES_FILTERS_FLAG) 124 125# ----------------------------------------------------------------------------- 126# build all 127# ----------------------------------------------------------------------------- 128 129zip1generatedlangs=TRUE 130zip1langdirs=$(alllangiso) 131ZIP1TARGET=fcfg_langpack 132ZIP1FLAGS= -u -r 133ZIP1DIR=$(DIR_LANGPACK)$/$(LANGDIR) 134ZIP1LIST=$(LANGDIR)$/* 135 136.INCLUDE: target.mk 137 138ALLTAR : $(ALL_FLAGS) 139 140$(ALL_FLAGS) : $(INCLUDE_FRAGMENTS) 141 142.IF "$(SOLAR_JAVA)"=="" 143#cmc, hack to workaround the java build requirement 144.IF "$(SYSTEM_PYTHON)" == "YES" 145MERGE:=python ../tools/merge/pyAltFCFGMerge 146.ELSE 147MERGE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/python ../tools/merge/pyAltFCFGMerge 148.ENDIF 149.ELSE 150MERGE := $(JAVAI) $(JAVAIFLAGS) -jar $(SOLARBINDIR)$/FCFGMerge.jar 151.ENDIF 152 153PACKLANG := $(XSLTPROC) --nonet 154PACKLANG_IN := 155PACKLANG_PARAM := --stringparam 156PACKLANG_XSL := 157 158# ----------------------------------------------------------------------------- 159# build every module separated 160# ----------------------------------------------------------------------------- 161 162$(REALFILTERPACKAGES_TYPES_FLAG) : $$(TYPES_4$$(@:b)) 163 @echo =================================================================== 164 @echo Merge type fragments for package $@ 165 @echo =================================================================== 166 -$(MKDIRHIER) $(DIR_MODPACKS) 167 $(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) $@ 168 169$(REALFILTERPACKAGES_FILTERS_UI_MERGE) : $(ALL_UI_FILTERS) 170 @echo =================================================================== 171 @echo Merge localized filter fragments for package $@ 172 @echo =================================================================== 173 -$(MKDIRHIER) $(DIR_LOCMERGE) 174 $(MERGE) fragmentsdir=$(DIR_LOCFRAG) tempdir=$(TEMP) pkg=$@ xmlpackage=Filter fcfg=$(mktmp items=$(ALL_UI_FILTERS:b:t",")) languagepack=true 175 176# Note: The used XSL transformation returns errors on stderr. 177# But they dont do it in case we use the -OUT parameter. 178# So we have to dump stdout to the target file and let stderr messages break the build! 179$(REALFILTERPACKAGES_FILTERS_UI_LANGPACKS) : $(REALFILTERPACKAGES_FILTERS_UI_MERGE) 180 @echo =================================================================== 181 @echo Building language packages $(@:b:s/Filter_//) for filters 182 @echo =================================================================== 183 +-$(MKDIRHIER) $(@:d) 184 $(PACKLANG) $(PACKLANG_PARAM) lang $(@:d:d:d:d:d:d:d:d:b) $(PACKLANG_XSL) langfilter.xsl $(PACKLANG_IN) $< > $@ 185 186$(REALFILTERPACKAGES_FILTERS_UI_LANGPACKS_PACKED) : $(REALFILTERPACKAGES_FILTERS_UI_LANGPACKS) 187 188$(REALFILTERPACKAGES_FILTERS_FLAG) : $$(FILTERS_4$$(@:b)) 189 @echo =================================================================== 190 @echo Building packages filter $@ 191 @echo =================================================================== 192 -$(MKDIRHIER) $(DIR_MODPACKS) 193 $(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) $@ 194 195$(REALFILTERPACKAGES_OTHERS_FLAG) : $$(ALL_4$$(@:b)) 196 @echo =================================================================== 197 @echo Building packages others $@ 198 @echo =================================================================== 199 -$(MKDIRHIER) $(DIR_MODPACKS) 200 $(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) $@ 201 202$(INTERNALFILTERPACKAGES_TYPES_FLAG) : $$(TYPES_4$$(@:b)) 203 @echo =================================================================== 204 @echo Building special packages types $@ 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) $@ 208 209$(INTERNALFILTERPACKAGES_FILTERS_FLAG) : $$(FILTERS_4$$(@:b)) 210 @echo =================================================================== 211 @echo Building special packages filter $@ 212 @echo =================================================================== 213 -$(MKDIRHIER) $(DIR_MODPACKS) 214 $(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) $@ 215 216