xref: /aoo42x/main/solenv/inc/tg_config.mk (revision cdf0e10c)
1*cdf0e10cSrcweir#************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweirPACKAGEDIR*:=$(subst,.,/ $(PACKAGE))
29*cdf0e10cSrcweirXSLTPACKAGEDIR*:=$(subst,.,/ $(PACKAGE))
30*cdf0e10cSrcweirXCSROOTURL!:=$(ABSXCSROOT)
31*cdf0e10cSrcweir.IF $(GUI)==WNT
32*cdf0e10cSrcweirXCSROOTURL!:=file:///$(subst,\,/ $(XCSROOTURL))
33*cdf0e10cSrcweir.ENDIF
34*cdf0e10cSrcweirSYSXSLDIR*:=$(XSLDIR)/
35*cdf0e10cSrcweir.IF $(GUI)==OS2
36*cdf0e10cSrcweirXCSROOTURL!:=$(subst,\,/ $(XCSROOTURL))
37*cdf0e10cSrcweirSYSXSLDIR!:=$(subst,\,/ $(SYSXSLDIR))/
38*cdf0e10cSrcweir.ENDIF
39*cdf0e10cSrcweir
40*cdf0e10cSrcweir#
41*cdf0e10cSrcweir# --- XCS ---
42*cdf0e10cSrcweir#
43*cdf0e10cSrcweir
44*cdf0e10cSrcweir.IF "$(XCSFILES)"!=""
45*cdf0e10cSrcweir# remove unnecessary info from the component schemas
46*cdf0e10cSrcweirXCS_TRIM=$(PROCESSOUT)/registry/schema/$(PACKAGEDIR)/{$(XCSFILES)}
47*cdf0e10cSrcweir
48*cdf0e10cSrcweir# transform xcs format to properties format
49*cdf0e10cSrcweir# XCS_RESOURCES=$(foreach,i,$(XCSFILES) $(MISC)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/$(i:b).properties)
50*cdf0e10cSrcweir
51*cdf0e10cSrcweirALLTAR: \
52*cdf0e10cSrcweir    $(XCS_TRIM)
53*cdf0e10cSrcweir.ENDIF			# "$(XCSFILES)"!=""
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir.IF "$(XCS_TRIM)" != ""
56*cdf0e10cSrcweir$(XCS_TRIM) :   $(DTDDIR)/registry/component-schema.dtd \
57*cdf0e10cSrcweir                $(XSLDIR)/schema_val.xsl \
58*cdf0e10cSrcweir                $(XSLDIR)/sanity.xsl \
59*cdf0e10cSrcweir                $(XSLDIR)/schema_trim.xsl
60*cdf0e10cSrcweir.ENDIF
61*cdf0e10cSrcweir
62*cdf0e10cSrcweir$(PROCESSOUT)/registry/schema/$(PACKAGEDIR)/%.xcs : %.xcs
63*cdf0e10cSrcweir	@echo "Making:   " $(@:f)
64*cdf0e10cSrcweir.IF "$(VERBOSE)" != "FALSE"
65*cdf0e10cSrcweir    @echo --- validating and stripping schema files
66*cdf0e10cSrcweir.ENDIF
67*cdf0e10cSrcweir	@-$(MKDIRHIER) $(@:d)
68*cdf0e10cSrcweir	$(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $(@:d))$*.val) \
69*cdf0e10cSrcweir	            --stringparam componentName $(PACKAGE).$* \
70*cdf0e10cSrcweir	            $(SYSXSLDIR)schema_val.xsl $<
71*cdf0e10cSrcweir	$(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $(@:d))$*.san) \
72*cdf0e10cSrcweir	            $(SYSXSLDIR)sanity.xsl $<
73*cdf0e10cSrcweir	$(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
74*cdf0e10cSrcweir	            $(SYSXSLDIR)schema_trim.xsl $<
75*cdf0e10cSrcweir	@+-$(RM) $(@:d)$*.val > $(NULLDEV)
76*cdf0e10cSrcweir	@+-$(RM) $(@:d)$*.san > $(NULLDEV)
77*cdf0e10cSrcweir
78*cdf0e10cSrcweir$(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcs : %.xcs
79*cdf0e10cSrcweir# just a copy for now - insert "cfgex" commandline when required
80*cdf0e10cSrcweir	$(COMMAND_ECHO)-$(MKDIRHIER) $(@:d)
81*cdf0e10cSrcweir	$(COMMAND_ECHO)$(COPY) $< $@
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir# Create properties files for localized <info> contents (Currently not built)
84*cdf0e10cSrcweir.IF "$(XCS_RESOURCES)" != ""
85*cdf0e10cSrcweir$(XCS_RESOURCES) :   $(XSLDIR)/resource.xsl
86*cdf0e10cSrcweir.ENDIF
87*cdf0e10cSrcweir
88*cdf0e10cSrcweir$(PROCESSOUT)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/%.properties :| $(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcs
89*cdf0e10cSrcweir	@echo "Making:   " $(@:f)
90*cdf0e10cSrcweir.IF "$(VERBOSE)" != "FALSE"
91*cdf0e10cSrcweir    @echo --- creating locale dependent resource bundles
92*cdf0e10cSrcweir.ENDIF
93*cdf0e10cSrcweir	@-$(MKDIRHIER) $(@:d)
94*cdf0e10cSrcweir	$(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
95*cdf0e10cSrcweir	            --stringparam locale {$(subst,/$(PACKAGEDIR)/$(@:f), $(subst,$(PROCESSOUT)/registry/res/, $@))} \
96*cdf0e10cSrcweir	            $(SYSXSLDIR)resource.xsl $<
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir#
99*cdf0e10cSrcweir# --- XCU ---
100*cdf0e10cSrcweir#
101*cdf0e10cSrcweir
102*cdf0e10cSrcweir.IF "$(XCUFILES)"!=""
103*cdf0e10cSrcweirXCU_DEFAULT =$(PROCESSOUT)/registry/data/$(PACKAGEDIR)/{$(XCUFILES)}
104*cdf0e10cSrcweirXCU_MODULES =$(foreach,i,$(MODULEFILES) $(PROCESSOUT)/registry/spool/$(PACKAGEDIR)/$(i))
105*cdf0e10cSrcweirXCU_LANG    =$(foreach,i,$(LOCALIZEDFILES) $(PROCESSOUT)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/$(i))
106*cdf0e10cSrcweir.ENDIF			# "$(XCUFILES)"!=""
107*cdf0e10cSrcweir
108*cdf0e10cSrcweir.IF "$(XCU_DEFAULT)" != ""
109*cdf0e10cSrcweir$(XCU_DEFAULT) : $(DTDDIR)/registry/component-update.dtd \
110*cdf0e10cSrcweir                 $(XSLDIR)/data_val.xsl \
111*cdf0e10cSrcweir                 $(XSLDIR)/alllang.xsl
112*cdf0e10cSrcweir.ENDIF
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir$(PROCESSOUT)/registry/data/$(PACKAGEDIR)/%.xcu : %.xcu
115*cdf0e10cSrcweir	@echo "Making:   " $(@:f)
116*cdf0e10cSrcweir.IF "$(VERBOSE)" != "FALSE"
117*cdf0e10cSrcweir    @echo --- validating and creating a locale independent file
118*cdf0e10cSrcweir.ENDIF
119*cdf0e10cSrcweir	@-$(MKDIRHIER) $(@:d)
120*cdf0e10cSrcweir	$(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $(@:d))$*.val) \
121*cdf0e10cSrcweir	            --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
122*cdf0e10cSrcweir	            --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
123*cdf0e10cSrcweir		    --path $(DTDDIR)/registry \
124*cdf0e10cSrcweir	            $(SYSXSLDIR)data_val.xsl $<
125*cdf0e10cSrcweir	$(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
126*cdf0e10cSrcweir	            --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
127*cdf0e10cSrcweir	            --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
128*cdf0e10cSrcweir		    --path $(DTDDIR)/registry \
129*cdf0e10cSrcweir	            $(SYSXSLDIR)alllang.xsl $<
130*cdf0e10cSrcweir	@+-$(RM) $(@:d)$*.val > $(NULLDEV)
131*cdf0e10cSrcweir
132*cdf0e10cSrcweir# --- localizations ---
133*cdf0e10cSrcweir.IF "$(WITH_LANG)"!=""
134*cdf0e10cSrcweir.IF "$(XCU_LANG)"!=""
135*cdf0e10cSrcweir$(XCU_LANG) : $(LOCALIZESDF)
136*cdf0e10cSrcweir.ENDIF			# "$(XCU_LANG)"!=""
137*cdf0e10cSrcweir
138*cdf0e10cSrcweir$(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcu : %.xcu
139*cdf0e10cSrcweir	@-$(MKDIRHIER) $(@:d)
140*cdf0e10cSrcweir	$(COMMAND_ECHO)$(CFGEX)  -p $(PRJNAME) -i $(@:f) -o $@ -m $(LOCALIZESDF) -l all
141*cdf0e10cSrcweir
142*cdf0e10cSrcweir.IF "$(XCU_LANG)" != ""
143*cdf0e10cSrcweir$(XCU_LANG) : $(XSLDIR)/alllang.xsl
144*cdf0e10cSrcweir.ENDIF
145*cdf0e10cSrcweir
146*cdf0e10cSrcweir$(PROCESSOUT)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/%.xcu :| $(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcu
147*cdf0e10cSrcweir.ELSE			# "$(WITH_LANG)"!=""
148*cdf0e10cSrcweir$(PROCESSOUT)/registry/res/{$(alllangiso)}/$(PACKAGEDIR)/%.xcu :| %.xcu
149*cdf0e10cSrcweir.ENDIF			# "$(WITH_LANG)"!=""
150*cdf0e10cSrcweir	@echo "Making:   " $(@:f)
151*cdf0e10cSrcweir.IF "$(VERBOSE)" != "FALSE"
152*cdf0e10cSrcweir    @echo --- creating locale dependent entries
153*cdf0e10cSrcweir.ENDIF
154*cdf0e10cSrcweir	@-$(MKDIRHIER) $(@:d)
155*cdf0e10cSrcweir	$(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
156*cdf0e10cSrcweir	            --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
157*cdf0e10cSrcweir	            --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
158*cdf0e10cSrcweir	            --stringparam locale {$(subst,/$(PACKAGEDIR)/$(@:f), $(subst,$(PROCESSOUT)/registry/res/, $@))} \
159*cdf0e10cSrcweir	            --path $(DTDDIR)/registry \
160*cdf0e10cSrcweir	            $(SYSXSLDIR)alllang.xsl $<
161*cdf0e10cSrcweir
162*cdf0e10cSrcweir# --- languagepack tag modules ---
163*cdf0e10cSrcweir.IF "$(LANGUAGEPACKS)" != ""
164*cdf0e10cSrcweir$(LANGUAGEPACKS) : $(XSLDIR)/delcomment.sed
165*cdf0e10cSrcweir.ENDIF
166*cdf0e10cSrcweir
167*cdf0e10cSrcweir
168*cdf0e10cSrcweir$(PROCESSOUT)/registry/spool/Langpack-%.xcu : Langpack.xcu.tmpl
169*cdf0e10cSrcweir.IF "$(VERBOSE)" != "FALSE"
170*cdf0e10cSrcweir    @echo --- creating a Langpack module for locale $*
171*cdf0e10cSrcweir.ENDIF
172*cdf0e10cSrcweir	-$(MKDIRHIER) $(@:d)
173*cdf0e10cSrcweir    $(COMMAND_ECHO)$(SED) -e "s/__LANGUAGE__/$*/" -f $(XSLDIR)/delcomment.sed $< > $@
174*cdf0e10cSrcweir
175*cdf0e10cSrcweir
176*cdf0e10cSrcweir# --- modules ---
177*cdf0e10cSrcweir.IF "$(XCU_MODULES)" != ""
178*cdf0e10cSrcweir$(XCU_MODULES) : $(XSLDIR)/alllang.xsl
179*cdf0e10cSrcweir.ENDIF
180*cdf0e10cSrcweir
181*cdf0e10cSrcweir
182*cdf0e10cSrcweir$(PROCESSOUT)/registry/spool/$(PACKAGEDIR)/%.xcu :| $$(@:b:s/-/./:b).xcu
183*cdf0e10cSrcweir	@echo "Making:   " $(@:f)
184*cdf0e10cSrcweir.IF "$(VERBOSE)" != "FALSE"
185*cdf0e10cSrcweir    @echo --- creating a module file
186*cdf0e10cSrcweir.ENDIF
187*cdf0e10cSrcweir	@-$(MKDIRHIER) $(@:d)
188*cdf0e10cSrcweir	$(COMMAND_ECHO)$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))/$(subst,$(PRJ), $@)) \
189*cdf0e10cSrcweir	            --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$(<:b).xcs \
190*cdf0e10cSrcweir	            --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
191*cdf0e10cSrcweir	            --stringparam module $(subst,$(<:b)-, $(*)) \
192*cdf0e10cSrcweir	            $(SYSXSLDIR)alllang.xsl $<
193*cdf0e10cSrcweir
194*cdf0e10cSrcweir.IF "$(XCUFILES)"!=""
195*cdf0e10cSrcweirALLTAR: \
196*cdf0e10cSrcweir    $(XCU_DEFAULT) \
197*cdf0e10cSrcweir    $(XCU_MODULES) \
198*cdf0e10cSrcweir    $(XCU_LANG)
199*cdf0e10cSrcweir
200*cdf0e10cSrcweir$(XCU_DEFAULT) : $$(@:d:s!$(PROCESSOUT)/registry/data/!$(ABSXCSROOT)/registry/schema/!)$$(@:f:s/.xcu/.xcs/)
201*cdf0e10cSrcweir
202*cdf0e10cSrcweir.ENDIF			# "$(XCUFILES)"!=""
203*cdf0e10cSrcweir
204