update ooo310-m15
[ooovba.git] / solenv / inc / tg_config.mk
blobe35a231bceefd6cb136f6317ae5df2135298429c
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.22 $
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)$/
41 # --- XCS ---
44 .IF "$(XCSFILES)"!=""
45 # remove unnecessary info from the component schemas
46 XCS_TRIM=$(PROCESSOUT)$/registry$/schema$/$(PACKAGEDIR)$/{$(XCSFILES)}
48 # transform xcs format to properties format
49 # XCS_RESOURCES=$(foreach,i,$(XCSFILES) $(MISC)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/$(i:b).properties)
51 ALLTAR: \
52 $(XCS_TRIM)
53 .ENDIF # "$(XCSFILES)"!=""
55 .IF "$(XCS_TRIM)" != ""
56 $(XCS_TRIM) : $(DTDDIR)$/registry$/component-schema.dtd \
57 $(XSLDIR)$/schema_val.xsl \
58 $(XSLDIR)$/sanity.xsl \
59 $(XSLDIR)$/schema_trim.xsl
60 .ENDIF
62 $(PROCESSOUT)$/registry$/schema$/$(PACKAGEDIR)$/%.xcs : %.xcs
63 @echo -------------+ validating and stripping schema files
64 -$(MKDIRHIER) $(@:d)
65 $(XSLTPROC) --nonet -o $(normpath $(PWD)$/$(@:d)$*.val) \
66 --stringparam componentName $(PACKAGE).$* \
67 $(SYSXSLDIR)schema_val.xsl $<
68 $(XSLTPROC) --nonet -o $(normpath $(PWD)$/$(@:d)$*.san) \
69 $(SYSXSLDIR)sanity.xsl $<
70 $(XSLTPROC) --nonet -o $(normpath $(PWD)$/$@) \
71 $(SYSXSLDIR)schema_trim.xsl $<
72 +-$(RM) $(@:d)$*.val > $(NULLDEV)
73 +-$(RM) $(@:d)$*.san > $(NULLDEV)
75 $(PROCESSOUT)$/merge$/$(PACKAGEDIR)$/%.xcs : %.xcs
76 # just a copy for now - insert "cfgex" commandline when required
77 -$(MKDIRHIER) $(@:d)
78 $(COPY) $< $@
80 # Create properties files for localized <info> contents (Currently not built)
81 .IF "$(XCS_RESOURCES)" != ""
82 $(XCS_RESOURCES) : $(XSLDIR)$/resource.xsl
83 .ENDIF
85 $(PROCESSOUT)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.properties :| $(PROCESSOUT)$/merge$/$(PACKAGEDIR)$/%.xcs
86 @echo -------------+ creating locale dependent resource bundles
87 -$(MKDIRHIER) $(@:d)
88 $(XSLTPROC) --nonet -o $(normpath $(PWD)$/$@) \
89 --stringparam locale {$(subst,$/$(PACKAGEDIR)$/$(@:f), $(subst,$(PROCESSOUT)$/registry$/res$/, $@))} \
90 $(SYSXSLDIR)resource.xsl $<
93 # --- XCU ---
96 .IF "$(XCUFILES)"!=""
97 XCU_DEFAULT =$(PROCESSOUT)$/registry$/data$/$(PACKAGEDIR)$/{$(XCUFILES)}
98 XCU_MODULES =$(foreach,i,$(MODULEFILES) $(PROCESSOUT)$/registry$/spool$/$(PACKAGEDIR)$/$(i))
99 XCU_LANG =$(foreach,i,$(LOCALIZEDFILES) $(PROCESSOUT)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/$(i))
100 .ENDIF # "$(XCUFILES)"!=""
102 .IF "$(XCU_DEFAULT)" != ""
103 $(XCU_DEFAULT) : $(DTDDIR)$/registry$/component-update.dtd \
104 $(XSLDIR)$/data_val.xsl \
105 $(XSLDIR)$/alllang.xsl
106 .ENDIF
108 $(PROCESSOUT)$/registry$/data$/$(PACKAGEDIR)$/%.xcu : %.xcu
109 @echo -------------+ validating and creating a locale independent file
110 -$(MKDIRHIER) $(@:d)
111 $(XSLTPROC) --nonet -o $(normpath $(PWD)$/$(@:d)$*.val) \
112 --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
113 --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
114 $(SYSXSLDIR)data_val.xsl $<
115 $(XSLTPROC) --nonet -o $(normpath $(PWD)$/$@) \
116 --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
117 --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
118 $(SYSXSLDIR)alllang.xsl $<
119 +-$(RM) $(@:d)$*.val > $(NULLDEV)
121 # --- localizations ---
122 .IF "$(WITH_LANG)"!=""
123 .IF "$(XCU_LANG)"!=""
124 $(XCU_LANG) : localize.sdf
125 .ENDIF # "$(XCU_LANG)"!=""
127 $(PROCESSOUT)$/merge$/$(PACKAGEDIR)$/%.xcu : %.xcu
128 -$(MKDIRHIER) $(@:d)
129 $(CFGEX) -p $(PRJNAME) -i $(@:f) -o $@ -m localize.sdf -l all
131 .IF "$(XCU_LANG)" != ""
132 $(XCU_LANG) : $(XSLDIR)$/alllang.xsl
133 .ENDIF
135 $(PROCESSOUT)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.xcu :| $(PROCESSOUT)$/merge$/$(PACKAGEDIR)$/%.xcu
136 .ELSE # "$(WITH_LANG)"!=""
137 $(PROCESSOUT)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.xcu :| %.xcu
138 .ENDIF # "$(WITH_LANG)"!=""
139 @echo ------------- creating locale dependent entries
140 -$(MKDIRHIER) $(@:d)
141 $(XSLTPROC) --nonet -o $(normpath $(PWD)$/$@) \
142 --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
143 --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
144 --stringparam locale {$(subst,$/$(PACKAGEDIR)$/$(@:f), $(subst,$(PROCESSOUT)$/registry$/res$/, $@))} \
145 $(SYSXSLDIR)alllang.xsl $<
147 # --- languagepack tag modules ---
148 .IF "$(LANGUAGEPACKS)" != ""
149 $(LANGUAGEPACKS) : $(XSLDIR)$/delcomment.sed
150 .ENDIF
153 $(PROCESSOUT)$/registry$/spool$/Langpack-%.xcu : Langpack.xcu.tmpl
154 @echo -------------+ creating a Langpack module for locale $*
155 -$(MKDIRHIER) $(@:d)
156 $(SED) -e "s/__LANGUAGE__/$*/" -f $(XSLDIR)$/delcomment.sed $< > $@
159 # --- modules ---
160 .IF "$(XCU_MODULES)" != ""
161 $(XCU_MODULES) : $(XSLDIR)$/alllang.xsl
162 .ENDIF
165 $(PROCESSOUT)$/registry$/spool$/$(PACKAGEDIR)$/%.xcu :| $$(@:b:s/-/./:b).xcu
166 @echo -------------+ creating a module file
167 -$(MKDIRHIER) $(@:d)
168 $(XSLTPROC) --nonet -o $(normpath $(PWD)$/$@) \
169 --stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$(<:b).xcs \
170 --stringparam schemaRoot $(XCSROOTURL)/registry/schema \
171 --stringparam module $(subst,$(<:b)-, $(*)) \
172 $(SYSXSLDIR)alllang.xsl $<
174 .IF "$(XCUFILES)"!=""
175 ALLTAR: \
176 $(XCU_DEFAULT) \
177 $(XCU_MODULES) \
178 $(XCU_LANG)
180 $(XCU_DEFAULT) : $$(@:d:s!$(PROCESSOUT)$/registry$/data$/!$(ABSXCSROOT)$/registry$/schema$/!)$$(@:f:s/.xcu/.xcs/)
182 .ENDIF # "$(XCUFILES)"!=""