Update ooo320-m1
[ooovba.git] / solenv / inc / tg_config.mk
blob8a96283d3ff8309a3e1b101f47e945e8369a0e1c
1 #************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: tg_config.mk,v $
11 # $Revision: 1.21.72.2 $
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 PACKAGEDIR*:=$(subst,.,/ $(PACKAGE))
33 XSLTPACKAGEDIR*:=$(subst,.,/ $(PACKAGE))
34 XCSROOTURL!:=$(ABSXCSROOT)
35 .IF $(GUI)==WNT
36 XCSROOTURL!:=file:///$(subst,\,/ $(XCSROOTURL))
37 .ENDIF
38 SYSXSLDIR*:=$(XSLDIR)/
39 .IF $(GUI)==OS2
40 XCSROOTURL!:=$(subst,\,/ $(XCSROOTURL))
41 SYSXSLDIR!:=$(subst,\,/ $(SYSXSLDIR))/
42 .ENDIF
45 # --- XCS ---
48 .IF "$(XCSFILES)"!=""
49 # remove unnecessary info from the component schemas
50 XCS_TRIM=$(PROCESSOUT)/registry/schema/$(PACKAGEDIR)/{$(XCSFILES)}
52 # transform xcs format to properties format
53 # XCS_RESOURCES=$(foreach,i,$(XCSFILES) $(MISC)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/$(i:b).properties)
55 ALLTAR: \
56 $(XCS_TRIM)
57 .ENDIF # "$(XCSFILES)"!=""
59 .IF "$(XCS_TRIM)" != ""
60 $(XCS_TRIM) : $(DTDDIR)/registry/component-schema.dtd \
61 $(XSLDIR)/schema_val.xsl \
62 $(XSLDIR)/sanity.xsl \
63 $(XSLDIR)/schema_trim.xsl
64 .ENDIF
66 $(PROCESSOUT)/registry/schema/$(PACKAGEDIR)/%.xcs : %.xcs
67 @echo "Making: " $(@:f)
68 .IF "$(VERBOSE)"!="FALSE"
69 @echo -------------+ validating and stripping schema files
70 .ENDIF
71 @-$(MKDIRHIER) $(@:d)
72 $(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $(@:d))$*.val) \
73 --stringparam componentName $(PACKAGE).$* \
74 $(SYSXSLDIR)schema_val.xsl $<
75 $(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $(@:d))$*.san) \
76 $(SYSXSLDIR)sanity.xsl $<
77 $(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
78 $(SYSXSLDIR)schema_trim.xsl $<
79 @+-$(RM) $(@:d)$*.val > $(NULLDEV)
80 @+-$(RM) $(@:d)$*.san > $(NULLDEV)
82 $(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcs : %.xcs
83 # just a copy for now - insert "cfgex" commandline when required
84 $(COMMAND_ECHO)-$(MKDIRHIER) $(@:d)
85 $(COMMAND_ECHO)$(COPY) $< $@
87 # Create properties files for localized <info> contents (Currently not built)
88 .IF "$(XCS_RESOURCES)" != ""
89 $(XCS_RESOURCES) : $(XSLDIR)/resource.xsl
90 .ENDIF
92 $(PROCESSOUT)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/%.properties :| $(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcs
93 @echo "Making: " $(@:f)
94 .IF "$(VERBOSE)"!="FALSE"
95 @echo -------------+ creating locale dependent resource bundles
96 .ENDIF
97 @-$(MKDIRHIER) $(@:d)
98 $(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
99 --stringparam locale {$(subst,/$(PACKAGEDIR)/$(@:f), $(subst,$(PROCESSOUT)/registry/res/, $@))} \
100 $(SYSXSLDIR)resource.xsl $<
103 # --- XCU ---
106 .IF "$(XCUFILES)"!=""
107 XCU_DEFAULT =$(PROCESSOUT)/registry/data/$(PACKAGEDIR)/{$(XCUFILES)}
108 XCU_MODULES =$(foreach,i,$(MODULEFILES) $(PROCESSOUT)/registry/spool/$(PACKAGEDIR)/$(i))
109 XCU_LANG =$(foreach,i,$(LOCALIZEDFILES) $(PROCESSOUT)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/$(i))
110 .ENDIF # "$(XCUFILES)"!=""
112 .IF "$(XCU_DEFAULT)" != ""
113 $(XCU_DEFAULT) : $(DTDDIR)/registry/component-update.dtd \
114 $(XSLDIR)/data_val.xsl \
115 $(XSLDIR)/alllang.xsl
116 .ENDIF
118 $(PROCESSOUT)/registry/data/$(PACKAGEDIR)/%.xcu : %.xcu
119 @echo "Making: " $(@:f)
120 .IF "$(VERBOSE)"!="FALSE"
121 @echo -------------+ validating and creating a locale independent file
122 .ENDIF
123 @-$(MKDIRHIER) $(@:d)
124 $(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $(@:d))$*.val) \
125 --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
126 --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
127 $(SYSXSLDIR)data_val.xsl $<
128 $(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
129 --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
130 --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
131 $(SYSXSLDIR)alllang.xsl $<
132 @+-$(RM) $(@:d)$*.val > $(NULLDEV)
134 # --- localizations ---
135 .IF "$(WITH_LANG)"!=""
136 .IF "$(XCU_LANG)"!=""
137 $(XCU_LANG) : $(LOCALIZESDF)
138 .ENDIF # "$(XCU_LANG)"!=""
140 $(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcu : %.xcu
141 @-$(MKDIRHIER) $(@:d)
142 $(COMMAND_ECHO)$(CFGEX) $(CFGEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $@ -m $(LOCALIZESDF) -l all
144 .IF "$(XCU_LANG)" != ""
145 $(XCU_LANG) : $(XSLDIR)/alllang.xsl
146 .ENDIF
148 $(PROCESSOUT)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/%.xcu :| $(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcu
149 .ELSE # "$(WITH_LANG)"!=""
150 $(PROCESSOUT)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/%.xcu :| %.xcu
151 .ENDIF # "$(WITH_LANG)"!=""
152 @echo "Making: " $(@:f)
153 .IF "$(VERBOSE)"!="FALSE"
154 @echo ------------- creating locale dependent entries
155 .ENDIF
156 @-$(MKDIRHIER) $(@:d)
157 $(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
158 --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
159 --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
160 --stringparam locale {$(subst,/$(PACKAGEDIR)/$(@:f), $(subst,$(PROCESSOUT)/registry/res/, $@))} \
161 $(SYSXSLDIR)alllang.xsl $<
163 # --- languagepack tag modules ---
164 .IF "$(LANGUAGEPACKS)" != ""
165 $(LANGUAGEPACKS) : $(XSLDIR)/delcomment.sed
166 .ENDIF
169 $(PROCESSOUT)/registry/spool/Langpack-%.xcu : Langpack.xcu.tmpl
170 @echo -------------+ creating a Langpack module for locale $*
171 -$(MKDIRHIER) $(@:d)
172 $(COMMAND_ECHO)$(SED) -e "s/__LANGUAGE__/$*/" -f $(XSLDIR)/delcomment.sed $< > $@
175 # --- modules ---
176 .IF "$(XCU_MODULES)" != ""
177 $(XCU_MODULES) : $(XSLDIR)/alllang.xsl
178 .ENDIF
181 $(PROCESSOUT)/registry/spool/$(PACKAGEDIR)/%.xcu :| $$(@:b:s/-/./:b).xcu
182 @echo "Making: " $(@:f)
183 .IF "$(VERBOSE)"!="FALSE"
184 @echo -------------+ creating a module file
185 .ENDIF
186 @-$(MKDIRHIER) $(@:d)
187 $(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
188 --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$(<:b).xcs \
189 --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
190 --stringparam module $(subst,$(<:b)-, $(*)) \
191 $(SYSXSLDIR)alllang.xsl $<
193 .IF "$(XCUFILES)"!=""
194 ALLTAR: \
195 $(XCU_DEFAULT) \
196 $(XCU_MODULES) \
197 $(XCU_LANG)
199 $(XCU_DEFAULT) : $$(@:d:s!$(PROCESSOUT)/registry/data/!$(ABSXCSROOT)/registry/schema/!)$$(@:f:s/.xcu/.xcs/)
201 .ENDIF # "$(XCUFILES)"!=""