summaryrefslogtreecommitdiff
path: root/officecfg/util
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-07-05 12:48:28 +0000
committerOliver Bolte <obo@openoffice.org>2004-07-05 12:48:28 +0000
commitb912e9319b150dbe3d497eb5024694ac704f7b65 (patch)
tree13f3dc1bae541c54954bc2172c6094a53568c3fd /officecfg/util
parentf65a0428809efee050fe692e7cf214fabd203696 (diff)
INTEGRATION: CWS scp2officecfg (1.24.92); FILE MERGED
2004/07/05 09:30:45 jb 1.24.92.5: RESYNC: (1.24-1.25); FILE MERGED 2004/06/17 09:39:01 jb 1.24.92.4: Stop generating .properties files from schema documentation items 2004/06/11 09:26:06 jb 1.24.92.3: #i25937# Use placeholder that works on all platforms; adjust argument quoting to work for windows also 2004/06/07 18:45:11 jb 1.24.92.2: #i25937# Remove leftovers from generated Langpack xcu files: drop DOCTYPE declaration in template; strip license comment while processing 2004/05/18 15:38:58 jb 1.24.92.1: #i29185#,#i25937# Add rules to build module files Add rules to build special language pack registration module files Change all rules to build from local source files in each directory, using $(PACKAGE) and $(PACKAGEDIR).
Diffstat (limited to 'officecfg/util')
-rw-r--r--officecfg/util/makefile.pmk125
1 files changed, 79 insertions, 46 deletions
diff --git a/officecfg/util/makefile.pmk b/officecfg/util/makefile.pmk
index 8283981f85df..3a6c80cb9abd 100644
--- a/officecfg/util/makefile.pmk
+++ b/officecfg/util/makefile.pmk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.pmk,v $
#
-# $Revision: 1.25 $
+# $Revision: 1.26 $
#
-# last change: $Author: hjs $ $Date: 2004-06-25 15:34:11 $
+# last change: $Author: obo $ $Date: 2004-07-05 13:48:28 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -60,98 +60,131 @@
#
#*************************************************************************
+PACKAGEDIR*:=$(subst,.,$/ $(PACKAGE))
+
# --- XCS ---
-$(MISC)$/registry$/schema$/%.xcs : %.xcs
+$(MISC)$/registry$/schema$/$(PACKAGEDIR)$/%.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
+ $(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)$(<:b).val \
- --stringparam file $(<:d)$(<:b) \
- --stringparam pathSeparator $/ \
+ $(XSLTPROC) -o $(@:d)$*.val \
+ --stringparam componentName $(PACKAGE).$(<:b) \
$(PRJ)$/util$/schema_val.xsl $<
- $(XSLTPROC) -o $(@:d)$(<:b).san \
- --stringparam file $(<:d)$(<:b) \
- --stringparam pathSeparator $/ \
+ $(XSLTPROC) -o $(@:d)$*.san \
$(PRJ)$/util$/sanity.xsl $<
- $(XSLTPROC) -o $(@:d)$(<:b).tmp \
+ $(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)$(<:b).tmp $(@:d)$(<:b).xcs
+ cp $(@:d)$*.tmp $@
.ENDIF
- +$(RM) $(@:d)$(<:b).tmp > $(NULLDEV)
- +$(RM) $(@:d)$(<:b).val > $(NULLDEV)
+ +$(RM) $(@:d)$*.tmp > $(NULLDEV)
+ +$(RM) $(@:d)$*.val > $(NULLDEV)
+ +$(RM) $(@:d)$*.san > $(NULLDEV)
-$(MISC)$/registry$/res$/{$(alllangiso)}$/%.properties :| %.xcs
+# Create properties files for localized <info> contents (Currently not built)
+$(MISC)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.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 $@)))}
+ $(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 $(@:d)$(<:b).properties \
- --stringparam locale {$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $(subst,.properties,.xcs $@)))} \
+ $(XSLTPROC) -o $@ \
+ --stringparam locale {$(subst,$/$(PACKAGEDIR)$/$(@:f), $(subst,$(MISC)$/registry$/res$/, $@))} \
$(PRJ)$/util$/resource.xsl $<
.ENDIF
# --- XCU ---
-$(MISC)$/registry$/data$/%.xcu : %.xcu
+$(MISC)$/registry$/data$/$(PACKAGEDIR)$/%.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
+ $(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 > $(PRJ)$/util$/alllang2.xsl
- $(XSLTPROC) -o $(@:d)$(<:b).val \
- --stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs \
+ $(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)$(<:b).tmp \
- --stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs \
+ $(XSLTPROC) -o $(@:d)$*.tmp \
+ --stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(PACKAGEDIR)$/$*.xcs \
--stringparam schemaRoot $(PWD)$/$(PRJ)$/registry$/schema \
- $(PRJ)$/util$/alllang2.xsl $<
+ $(@:d)allang2.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
+ cp $(@:d)$*.tmp $@
+$(RM) $(PRJ)$/util$/dataval2.xsl > $(NULLDEV)
- +$(RM) $(PRJ)$/util$/alllang2.xsl > $(NULLDEV)
+ +$(RM) $(@:d)allang2.xsl > $(NULLDEV)
.ENDIF
- +$(RM) $(@:d)$(<:b).tmp > $(NULLDEV)
- +$(RM) $(@:d)$(<:b).val > $(NULLDEV)
+ +$(RM) $(@:d)$*.tmp > $(NULLDEV)
+ +$(RM) $(@:d)$*.val > $(NULLDEV)
+
+# --- localizations ---
-$(MISC)$/registry$/res$/{$(alllangiso)}$/%.xcu :| %.xcu
+$(MISC)$/registry$/res$/{$(alllangiso)}$/$(PACKAGEDIR)$/%.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
+ $(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 $*
+ -$(MKDIR) -p $(@:d)
+ $(SED) -e "s/__LANGUAGE__/$*/" -e "/^<!--/,/-->/d" $< > $@
+
+
+# --- modules ---
+
+$(MISC)$/registry$/spool$/$(PACKAGE).%.xcu :| $$(@:b:s!.!$/!:s!-!.!:b).xcu
+ @+echo -------------+ creating a module file
+ -$(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)$(@: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 > $(PRJ)$/util$/alllang2.xsl
- $(XSLTPROC) -o $(@:d)$(<:b).tmp \
- --stringparam xcs $(PWD)$/$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs \
+ $(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 locale {$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $@))} \
- $(PRJ)$/util$/alllang2.xsl $<
+ --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)$(<:b).tmp $(@:d)$(<:b).xcu
- +$(RM) $(PRJ)$/util$/alllang2.xsl > $(NULLDEV)
+ cp $(@:d)$(@:f:s/.xcu/.tmp/) $@
+ +$(RM) $(@:d)allang2.xsl > $(NULLDEV)
.ENDIF
- +$(RM) $(@:d)$(<:b).tmp > $(NULLDEV)
+ +$(RM) $(@:d)$(@:f:s/.xcu/.tmp/) > $(NULLDEV)