office-gobmx/officecfg/util/makefile.pmk
Hans-Joachim Lankenau 2d7e027e56 INTEGRATION: CWS mergebuild (1.24.88); FILE MERGED
2004/06/18 16:17:54 hjs 1.24.88.1: #i8252# alllangext to alllangiso
2004-06-25 14:34:11 +00:00

157 lines
9.8 KiB
Text

#*************************************************************************
#
# $RCSfile: makefile.pmk,v $
#
# $Revision: 1.25 $
#
# last change: $Author: hjs $ $Date: 2004-06-25 15:34:11 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
#
# - GNU Lesser General Public License Version 2.1
# - Sun Industry Standards Source License Version 1.1
#
# Sun Microsystems Inc., October, 2000
#
# GNU Lesser General Public License Version 2.1
# =============================================
# Copyright 2000 by Sun Microsystems, Inc.
# 901 San Antonio Road, Palo Alto, CA 94303, USA
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1, as published by the Free Software Foundation.
#
# This library 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 for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
#
# Sun Industry Standards Source License Version 1.1
# =================================================
# The contents of this file are subject to the Sun Industry Standards
# Source License Version 1.1 (the "License"); You may not use this file
# except in compliance with the License. You may obtain a copy of the
# License at http://www.openoffice.org/license.html.
#
# Software provided under this License is provided on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
# See the License for the specific provisions governing your rights and
# obligations concerning the Software.
#
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
#
# Copyright: 2000 by Sun Microsystems, Inc.
#
# All Rights Reserved.
#
# Contributor(s): _______________________________________
#
#
#
#*************************************************************************
# --- XCS ---
$(MISC)$/registry$/schema$/%.xcs : %.xcs
@+echo -------------+ validating and stripping schema files
-$(MKDIR) -p $(@:d)
.IF "$(SOLAR_JAVA)"!=""
$(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.configuration.Inspector $<
$(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/schema_val.xsl $(@:d)$(<:b).val file=$(<:d)$(<:b) pathSeparator=$/
$(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/sanity.xsl $(@:d)$(<:b).san file=$(<:d)$(<:b) pathSeparator=$/
$(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/schema_trim.xsl $(@:d)$(<:b).tmp
$(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcs
.ELSE
# xsltproc already validates against the dtd. For additional validation,
# org.openoffice.configuration.Inspector should be replaced and the
# replacement should be invoked here.
$(XSLTPROC) -o $(@:d)$(<:b).val \
--stringparam file $(<:d)$(<:b) \
--stringparam pathSeparator $/ \
$(PRJ)$/util$/schema_val.xsl $<
$(XSLTPROC) -o $(@:d)$(<:b).san \
--stringparam file $(<:d)$(<:b) \
--stringparam pathSeparator $/ \
$(PRJ)$/util$/sanity.xsl $<
$(XSLTPROC) -o $(@:d)$(<:b).tmp \
$(PRJ)$/util$/schema_trim.xsl $<
# xsltproc already seems to pretty-print the xml, so
# org.openoffice.helper.PrettyPrinter seems to be unnecessary.
cp $(@:d)$(<:b).tmp $(@:d)$(<:b).xcs
.ENDIF
+$(RM) $(@:d)$(<:b).tmp > $(NULLDEV)
+$(RM) $(@:d)$(<:b).val > $(NULLDEV)
$(MISC)$/registry$/res$/{$(alllangiso)}$/%.properties :| %.xcs
@+echo -------------+ creating locale dependent resource bundles
-$(MKDIR) -p $(@:d)
.IF "$(SOLAR_JAVA)"!=""
$(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/resource.xsl $(@:d)$(<:b).properties locale={$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $(subst,.properties,.xcs $@)))}
.ELSE
$(XSLTPROC) -o $(@:d)$(<:b).properties \
--stringparam locale {$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $(subst,.properties,.xcs $@)))} \
$(PRJ)$/util$/resource.xsl $<
.ENDIF
# --- XCU ---
$(MISC)$/registry$/data$/%.xcu : %.xcu
@+echo -------------+ validating and creating a locale independent file
-$(MKDIR) -p $(@:d)
.IF "$(SOLAR_JAVA)"!=""
$(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.configuration.Inspector $<
$(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/data_val.xsl $(@:d)$(<:b).val xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema
$(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/alllang.xsl $(@:d)$(<:b).tmp xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema
$(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcu
.ELSE
# xsltproc already validates against the dtd. For additional validation,
# org.openoffice.configuration.Inspector should be replaced and the
# replacement should be invoked here.
$(SED) 's|xmlns:filehelper="http://www.jclark.com/xt/java/org.openoffice.configuration.FileHelper"||;s|extension-element-prefixes="filehelper"||;s|filehelper:makeAbs(\(.*\))|\1|' < $(PRJ)$/util$/data_val.xsl > $(PRJ)$/util$/dataval2.xsl
$(SED) 's|xmlns:filehelper="http://www.jclark.com/xt/java/org.openoffice.configuration.FileHelper"||;s|extension-element-prefixes="filehelper"||;s|filehelper:makeAbs(\(.*\))|\1|' < $(PRJ)$/util$/alllang.xsl > $(PRJ)$/util$/alllang2.xsl
$(XSLTPROC) -o $(@:d)$(<:b).val \
--stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs \
--stringparam schemaRoot $(PWD)$/$(PRJ)$/registry$/schema \
$(PRJ)$/util$/dataval2.xsl $<
$(XSLTPROC) -o $(@:d)$(<:b).tmp \
--stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs \
--stringparam schemaRoot $(PWD)$/$(PRJ)$/registry$/schema \
$(PRJ)$/util$/alllang2.xsl $<
# xsltproc already seems to pretty-print the xml, so
# org.openoffice.helper.PrettyPrinter seems to be unnecessary.
cp $(@:d)$(<:b).tmp $(@:d)$(<:b).xcu
+$(RM) $(PRJ)$/util$/dataval2.xsl > $(NULLDEV)
+$(RM) $(PRJ)$/util$/alllang2.xsl > $(NULLDEV)
.ENDIF
+$(RM) $(@:d)$(<:b).tmp > $(NULLDEV)
+$(RM) $(@:d)$(<:b).val > $(NULLDEV)
$(MISC)$/registry$/res$/{$(alllangiso)}$/%.xcu :| %.xcu
@+echo -------------+ creating locale dependent entries
-$(MKDIR) -p $(@:d)
.IF "$(SOLAR_JAVA)"!=""
$(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/alllang.xsl $(@:d)$(<:b).tmp xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema locale={$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $@))}
$(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcu
.ELSE
$(SED) 's|xmlns:filehelper="http://www.jclark.com/xt/java/org.openoffice.configuration.FileHelper"||;s|extension-element-prefixes="filehelper"||;s|filehelper:makeAbs(\(.*\))|\1|' < $(PRJ)$/util$/alllang.xsl > $(PRJ)$/util$/alllang2.xsl
$(XSLTPROC) -o $(@:d)$(<:b).tmp \
--stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs \
--stringparam schemaRoot $(PWD)$/$(PRJ)$/registry$/schema \
--stringparam locale {$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $@))} \
$(PRJ)$/util$/alllang2.xsl $<
# xsltproc already seems to pretty-print the xml, so
# org.openoffice.helper.PrettyPrinter seems to be unnecessary.
cp $(@:d)$(<:b).tmp $(@:d)$(<:b).xcu
+$(RM) $(PRJ)$/util$/alllang2.xsl > $(NULLDEV)
.ENDIF
+$(RM) $(@:d)$(<:b).tmp > $(NULLDEV)