office-gobmx/officecfg/util/makefile.pmk
Rüdiger Timm 700bc75d49 INTEGRATION: CWS mergebuild02 (1.26.10); FILE MERGED
2004/07/13 11:18:23 hjs 1.26.10.1: #i31416# merge on the fly
2004-07-23 09:30:29 +00:00

199 lines
12 KiB
Text

#*************************************************************************
#
# $RCSfile: makefile.pmk,v $
#
# $Revision: 1.27 $
#
# last change: $Author: rt $ $Date: 2004-07-23 10:30:29 $
#
# 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): _______________________________________
#
#
#
#*************************************************************************
PACKAGEDIR*:=$(subst,.,$/ $(PACKAGE))
# --- XCS ---
$(MISC)$/registry$/schema$/$(PACKAGEDIR)$/%.xcs : %.xcs
@+echo -------------+ validating and stripping schema files
-$(MKDIRHIER) $(@: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)$*.val componentName=$(PACKAGE).$*
$(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)$*.san
$(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)$*.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)$*.tmp $@
.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)$*.val \
--stringparam componentName $(PACKAGE).$(<:b) \
$(PRJ)$/util$/schema_val.xsl $<
$(XSLTPROC) -o $(@:d)$*.san \
$(PRJ)$/util$/sanity.xsl $<
$(XSLTPROC) -o $(@:d)$*.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)$*.tmp $@
.ENDIF
+$(RM) $(@:d)$*.tmp > $(NULLDEV)
+$(RM) $(@:d)$*.val > $(NULLDEV)
+$(RM) $(@:d)$*.san > $(NULLDEV)
$(MISC)$/merge$/$(PACKAGEDIR)$/%.xcs : %.xcs
# just a copy for now - insert "cfgex" commandline when required
+$(MKDIRHIER) $(@:d)
+$(COPY) $< $@
# Create properties files for localized <info> contents (Currently not built)
$(MISC)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.properties :| $(MISC)$/merge$/$(PACKAGEDIR)$/%.xcs
@+echo -------------+ creating locale dependent resource bundles
-$(MKDIRHIER) $(@: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 $@ locale={$(subst,$/$(PACKAGEDIR)$/$(@:f), $(subst,$(MISC)$/registry$/res$/, $@))}
.ELSE
$(XSLTPROC) -o $@ \
--stringparam locale {$(subst,$/$(PACKAGEDIR)$/$(@:f), $(subst,$(MISC)$/registry$/res$/, $@))} \
$(PRJ)$/util$/resource.xsl $<
.ENDIF
# --- XCU ---
$(MISC)$/registry$/data$/$(PACKAGEDIR)$/%.xcu : %.xcu
@+echo -------------+ validating and creating a locale independent file
-$(MKDIRHIER) $(@: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)$*.val xcs=$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$*.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)$*.tmp xcs=$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$*.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)$*.tmp $@
.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 > $(@:d)allang2.xsl
$(XSLTPROC) -o $(@:d)$*.val \
--stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$*.xcs \
--stringparam schemaRoot $(PWD)$/$(PRJ)$/registry$/schema \
$(PRJ)$/util$/dataval2.xsl $<
$(XSLTPROC) -o $(@:d)$*.tmp \
--stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$*.xcs \
--stringparam schemaRoot $(PWD)$/$(PRJ)$/registry$/schema \
$(@:d)allang2.xsl $<
# xsltproc already seems to pretty-print the xml, so
# org.openoffice.helper.PrettyPrinter seems to be unnecessary.
cp $(@:d)$*.tmp $@
+$(RM) $(PRJ)$/util$/dataval2.xsl > $(NULLDEV)
+$(RM) $(@:d)allang2.xsl > $(NULLDEV)
.ENDIF
+$(RM) $(@:d)$*.tmp > $(NULLDEV)
+$(RM) $(@:d)$*.val > $(NULLDEV)
# --- localizations ---
$(MISC)$/merge$/$(PACKAGEDIR)$/%.xcu : %.xcu
+$(MKDIRHIER) $(@:d)
$(WRAPCMD) $(CFGEX) -p $(PRJNAME) -i $(@:f) -o $@ -m localize.sdf -l all
$(MISC)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.xcu :| $(MISC)$/merge$/$(PACKAGEDIR)$/%.xcu
@+echo -------------+ creating locale dependent entries
-$(MKDIRHIER) $(@: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)$*.tmp xcs=$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$*.xcs schemaRoot=$(PRJ)$/registry$/schema locale={$(subst,$/$(PACKAGEDIR)$/$(@:f), $(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)$*.tmp $@
.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 > $(@:d)allang2.xsl
$(XSLTPROC) -o $(@:d)$*.tmp \
--stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$*.xcs \
--stringparam schemaRoot $(PWD)$/$(PRJ)$/registry$/schema \
--stringparam locale {$(subst,$/$(PACKAGEDIR)$/$(@:f), $(subst,$(MISC)$/registry$/res$/, $@))} \
$(@:d)allang2.xsl $<
# xsltproc already seems to pretty-print the xml, so
# org.openoffice.helper.PrettyPrinter seems to be unnecessary.
cp $(@:d)$*.tmp $@
+$(RM) $(@:d)allang2.xsl > $(NULLDEV)
.ENDIF
+$(RM) $(@:d)$*.tmp > $(NULLDEV)
# --- languagepack tag modules ---
$(MISC)$/registry$/spool$/Langpack-%.xcu : Langpack.xcu.tmpl
@+echo -------------+ creating a Langpack module for locale $*
-$(MKDIRHIER) $(@:d)
$(SED) -e "s/__LANGUAGE__/$*/" -e "/^<!--/,/-->/d" $< > $@
# --- modules ---
$(MISC)$/registry$/spool$/$(PACKAGE).%.xcu :| $$(@:b:s!.!$/!:s!-!.!:b).xcu
@+echo -------------+ creating a module file
-$(MKDIRHIER) $(@: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)$(@:f:s/.xcu/.tmp/) xcs=$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema module={$(subst,$(<:b)-, $(*))}
$(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)$(@:f:s/.xcu/.tmp/) $@
.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 > $(@:d)allang2.xsl
$(XSLTPROC) -o $(@:d)$(@:f:s/.xcu/.tmp/) \
--stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$(<:b).xcs \
--stringparam schemaRoot $(PWD)$/$(PRJ)$/registry$/schema \
--stringparam module $(subst,$(<:b)-, $(*)) \
$(@:d)allang2.xsl $<
# xsltproc already seems to pretty-print the xml, so
# org.openoffice.helper.PrettyPrinter seems to be unnecessary.
cp $(@:d)$(@:f:s/.xcu/.tmp/) $@
+$(RM) $(@:d)allang2.xsl > $(NULLDEV)
.ENDIF
+$(RM) $(@:d)$(@:f:s/.xcu/.tmp/) > $(NULLDEV)