2006-03-16 04:11:17 -06:00
|
|
|
#************************************************************************
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
2008-04-10 11:39:02 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# Copyright 2008 by Sun Microsystems, Inc.
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
2008-04-10 11:39:02 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
2008-04-10 11:39:02 -05:00
|
|
|
# $RCSfile: tg_config.mk,v $
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
2009-06-17 08:15:46 -05:00
|
|
|
# $Revision: 1.21.72.2 $
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
2008-04-10 11:39:02 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
2008-04-10 11:39:02 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
2008-04-10 11:39:02 -05:00
|
|
|
# OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
2008-04-10 11:39:02 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2005-03-15 06:00:23 -06:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
|
|
|
|
PACKAGEDIR*:=$(subst,.,$/ $(PACKAGE))
|
2007-05-10 07:14:29 -05:00
|
|
|
XSLTPACKAGEDIR*:=$(subst,.,/ $(PACKAGE))
|
|
|
|
XCSROOTURL!:=$(ABSXCSROOT)
|
|
|
|
.IF $(GUI)==WNT
|
|
|
|
XCSROOTURL!:=file:///$(subst,\,/ $(XCSROOTURL))
|
|
|
|
.ENDIF
|
2008-03-05 09:33:26 -06:00
|
|
|
SYSXSLDIR*:=$(XSLDIR)$/
|
2005-03-15 06:00:23 -06:00
|
|
|
|
2005-08-05 08:00:44 -05:00
|
|
|
#
|
2005-03-15 06:00:23 -06:00
|
|
|
# --- XCS ---
|
2005-08-05 08:00:44 -05:00
|
|
|
#
|
|
|
|
|
2005-03-15 06:00:23 -06:00
|
|
|
.IF "$(XCSFILES)"!=""
|
|
|
|
# remove unnecessary info from the component schemas
|
2006-08-04 04:00:42 -05:00
|
|
|
XCS_TRIM=$(PROCESSOUT)$/registry$/schema$/$(PACKAGEDIR)$/{$(XCSFILES)}
|
2005-03-15 06:00:23 -06:00
|
|
|
|
|
|
|
# transform xcs format to properties format
|
|
|
|
# XCS_RESOURCES=$(foreach,i,$(XCSFILES) $(MISC)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/$(i:b).properties)
|
|
|
|
|
|
|
|
ALLTAR: \
|
|
|
|
$(XCS_TRIM)
|
|
|
|
.ENDIF # "$(XCSFILES)"!=""
|
|
|
|
|
|
|
|
.IF "$(XCS_TRIM)" != ""
|
2005-08-19 03:57:31 -05:00
|
|
|
$(XCS_TRIM) : $(DTDDIR)$/registry$/component-schema.dtd \
|
2005-03-15 06:00:23 -06:00
|
|
|
$(XSLDIR)$/schema_val.xsl \
|
|
|
|
$(XSLDIR)$/sanity.xsl \
|
|
|
|
$(XSLDIR)$/schema_trim.xsl
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
$(PROCESSOUT)$/registry$/schema$/$(PACKAGEDIR)$/%.xcs : %.xcs
|
2006-10-05 04:39:02 -05:00
|
|
|
@echo -------------+ validating and stripping schema files
|
2005-03-15 06:00:23 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2009-03-24 07:17:31 -05:00
|
|
|
$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))$/$(subst,$(PRJ), $(@:d))$*.val) \
|
2005-03-15 06:00:23 -06:00
|
|
|
--stringparam componentName $(PACKAGE).$* \
|
2007-05-10 07:14:29 -05:00
|
|
|
$(SYSXSLDIR)schema_val.xsl $<
|
2009-03-24 07:17:31 -05:00
|
|
|
$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))$/$(subst,$(PRJ), $(@:d))$*.san) \
|
2007-05-10 07:14:29 -05:00
|
|
|
$(SYSXSLDIR)sanity.xsl $<
|
2009-03-24 07:17:31 -05:00
|
|
|
$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))$/$(subst,$(PRJ), $@)) \
|
2007-05-10 07:14:29 -05:00
|
|
|
$(SYSXSLDIR)schema_trim.xsl $<
|
|
|
|
+-$(RM) $(@:d)$*.val > $(NULLDEV)
|
|
|
|
+-$(RM) $(@:d)$*.san > $(NULLDEV)
|
2006-10-05 10:35:36 -05:00
|
|
|
|
2005-03-15 06:00:23 -06:00
|
|
|
$(PROCESSOUT)$/merge$/$(PACKAGEDIR)$/%.xcs : %.xcs
|
|
|
|
# just a copy for now - insert "cfgex" commandline when required
|
2006-10-05 10:35:36 -05:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2007-01-25 05:53:40 -06:00
|
|
|
$(COPY) $< $@
|
2005-03-15 06:00:23 -06:00
|
|
|
|
|
|
|
# Create properties files for localized <info> contents (Currently not built)
|
|
|
|
.IF "$(XCS_RESOURCES)" != ""
|
|
|
|
$(XCS_RESOURCES) : $(XSLDIR)$/resource.xsl
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
$(PROCESSOUT)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.properties :| $(PROCESSOUT)$/merge$/$(PACKAGEDIR)$/%.xcs
|
2006-10-05 04:39:02 -05:00
|
|
|
@echo -------------+ creating locale dependent resource bundles
|
2005-03-15 06:00:23 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2009-03-24 07:17:31 -05:00
|
|
|
$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))$/$(subst,$(PRJ), $@)) \
|
2005-03-15 06:00:23 -06:00
|
|
|
--stringparam locale {$(subst,$/$(PACKAGEDIR)$/$(@:f), $(subst,$(PROCESSOUT)$/registry$/res$/, $@))} \
|
2007-05-10 07:14:29 -05:00
|
|
|
$(SYSXSLDIR)resource.xsl $<
|
2005-03-15 06:00:23 -06:00
|
|
|
|
2005-08-05 08:00:44 -05:00
|
|
|
#
|
2005-03-15 06:00:23 -06:00
|
|
|
# --- XCU ---
|
2005-08-05 08:00:44 -05:00
|
|
|
#
|
|
|
|
|
|
|
|
.IF "$(XCUFILES)"!=""
|
|
|
|
XCU_DEFAULT =$(PROCESSOUT)$/registry$/data$/$(PACKAGEDIR)$/{$(XCUFILES)}
|
|
|
|
XCU_MODULES =$(foreach,i,$(MODULEFILES) $(PROCESSOUT)$/registry$/spool$/$(PACKAGEDIR)$/$(i))
|
|
|
|
XCU_LANG =$(foreach,i,$(LOCALIZEDFILES) $(PROCESSOUT)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/$(i))
|
|
|
|
.ENDIF # "$(XCUFILES)"!=""
|
|
|
|
|
2005-03-15 06:00:23 -06:00
|
|
|
.IF "$(XCU_DEFAULT)" != ""
|
2005-08-19 03:57:31 -05:00
|
|
|
$(XCU_DEFAULT) : $(DTDDIR)$/registry$/component-update.dtd \
|
2005-03-15 06:00:23 -06:00
|
|
|
$(XSLDIR)$/data_val.xsl \
|
|
|
|
$(XSLDIR)$/alllang.xsl
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
$(PROCESSOUT)$/registry$/data$/$(PACKAGEDIR)$/%.xcu : %.xcu
|
2006-10-05 04:39:02 -05:00
|
|
|
@echo -------------+ validating and creating a locale independent file
|
2005-03-15 06:00:23 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2009-03-24 07:17:31 -05:00
|
|
|
$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))$/$(subst,$(PRJ), $(@:d))$*.val) \
|
2007-05-10 07:14:29 -05:00
|
|
|
--stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
|
|
|
|
--stringparam schemaRoot $(XCSROOTURL)/registry/schema \
|
|
|
|
$(SYSXSLDIR)data_val.xsl $<
|
2009-03-24 07:17:31 -05:00
|
|
|
$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))$/$(subst,$(PRJ), $@)) \
|
2007-05-10 07:14:29 -05:00
|
|
|
--stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
|
|
|
|
--stringparam schemaRoot $(XCSROOTURL)/registry/schema \
|
|
|
|
$(SYSXSLDIR)alllang.xsl $<
|
|
|
|
+-$(RM) $(@:d)$*.val > $(NULLDEV)
|
2005-03-15 06:00:23 -06:00
|
|
|
|
|
|
|
# --- localizations ---
|
2006-11-08 05:03:43 -06:00
|
|
|
.IF "$(WITH_LANG)"!=""
|
2005-03-15 06:00:23 -06:00
|
|
|
.IF "$(XCU_LANG)"!=""
|
2009-06-17 08:15:46 -05:00
|
|
|
$(XCU_LANG) : $(LOCALIZESDF)
|
2005-03-15 06:00:23 -06:00
|
|
|
.ENDIF # "$(XCU_LANG)"!=""
|
|
|
|
|
|
|
|
$(PROCESSOUT)$/merge$/$(PACKAGEDIR)$/%.xcu : %.xcu
|
2006-10-05 10:35:36 -05:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2009-06-17 08:15:46 -05:00
|
|
|
$(CFGEX) -p $(PRJNAME) -i $(@:f) -o $@ -m $(LOCALIZESDF) -l all
|
2005-03-15 06:00:23 -06:00
|
|
|
|
|
|
|
.IF "$(XCU_LANG)" != ""
|
2006-08-14 10:19:48 -05:00
|
|
|
$(XCU_LANG) : $(XSLDIR)$/alllang.xsl
|
2005-03-15 06:00:23 -06:00
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
$(PROCESSOUT)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.xcu :| $(PROCESSOUT)$/merge$/$(PACKAGEDIR)$/%.xcu
|
2006-11-08 05:03:43 -06:00
|
|
|
.ELSE # "$(WITH_LANG)"!=""
|
|
|
|
$(PROCESSOUT)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.xcu :| %.xcu
|
|
|
|
.ENDIF # "$(WITH_LANG)"!=""
|
|
|
|
@echo ------------- creating locale dependent entries
|
2005-03-15 06:00:23 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2009-03-24 07:17:31 -05:00
|
|
|
$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))$/$(subst,$(PRJ), $@)) \
|
2007-05-10 07:14:29 -05:00
|
|
|
--stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$*.xcs \
|
|
|
|
--stringparam schemaRoot $(XCSROOTURL)/registry/schema \
|
2005-03-15 06:00:23 -06:00
|
|
|
--stringparam locale {$(subst,$/$(PACKAGEDIR)$/$(@:f), $(subst,$(PROCESSOUT)$/registry$/res$/, $@))} \
|
2007-05-10 07:14:29 -05:00
|
|
|
$(SYSXSLDIR)alllang.xsl $<
|
2005-03-15 06:00:23 -06:00
|
|
|
|
|
|
|
# --- languagepack tag modules ---
|
|
|
|
.IF "$(LANGUAGEPACKS)" != ""
|
|
|
|
$(LANGUAGEPACKS) : $(XSLDIR)$/delcomment.sed
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
|
|
|
|
$(PROCESSOUT)$/registry$/spool$/Langpack-%.xcu : Langpack.xcu.tmpl
|
2006-10-05 04:39:02 -05:00
|
|
|
@echo -------------+ creating a Langpack module for locale $*
|
2005-03-15 06:00:23 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
|
|
|
$(SED) -e "s/__LANGUAGE__/$*/" -f $(XSLDIR)$/delcomment.sed $< > $@
|
2006-10-05 10:35:36 -05:00
|
|
|
|
2005-03-15 06:00:23 -06:00
|
|
|
|
|
|
|
# --- modules ---
|
|
|
|
.IF "$(XCU_MODULES)" != ""
|
|
|
|
$(XCU_MODULES) : $(XSLDIR)$/alllang.xsl
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
|
|
|
|
$(PROCESSOUT)$/registry$/spool$/$(PACKAGEDIR)$/%.xcu :| $$(@:b:s/-/./:b).xcu
|
2006-10-05 04:39:02 -05:00
|
|
|
@echo -------------+ creating a module file
|
2005-03-15 06:00:23 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2009-03-24 07:17:31 -05:00
|
|
|
$(XSLTPROC) --nonet -o $(normpath $(subst,$(PATH_IN_MODULE), $(PWD))$/$(subst,$(PRJ), $@)) \
|
2007-05-10 07:14:29 -05:00
|
|
|
--stringparam xcs $(XCSROOTURL)/registry/schema/$(XSLTPACKAGEDIR)/$(<:b).xcs \
|
|
|
|
--stringparam schemaRoot $(XCSROOTURL)/registry/schema \
|
2005-03-15 06:00:23 -06:00
|
|
|
--stringparam module $(subst,$(<:b)-, $(*)) \
|
2007-05-10 07:14:29 -05:00
|
|
|
$(SYSXSLDIR)alllang.xsl $<
|
2005-03-15 06:00:23 -06:00
|
|
|
|
|
|
|
.IF "$(XCUFILES)"!=""
|
|
|
|
ALLTAR: \
|
|
|
|
$(XCU_DEFAULT) \
|
|
|
|
$(XCU_MODULES) \
|
|
|
|
$(XCU_LANG)
|
|
|
|
|
2007-05-10 07:14:29 -05:00
|
|
|
$(XCU_DEFAULT) : $$(@:d:s!$(PROCESSOUT)$/registry$/data$/!$(ABSXCSROOT)$/registry$/schema$/!)$$(@:f:s/.xcu/.xcs/)
|
2005-03-15 06:00:23 -06:00
|
|
|
|
|
|
|
.ENDIF # "$(XCUFILES)"!=""
|
|
|
|
|