automatically generate source code
This commit is contained in:
parent
fe22b09491
commit
b53f680474
2 changed files with 151 additions and 5 deletions
|
@ -4,9 +4,9 @@
|
|||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.5 $
|
||||
# $Revision: 1.6 $
|
||||
#
|
||||
# last change: $Author: os $ $Date: 2007-04-23 07:43:13 $
|
||||
# last change: $Author: hbrinkm $ $Date: 2007-06-15 09:26:53 $
|
||||
#
|
||||
# The Contents of this file are made available subject to
|
||||
# the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -89,3 +89,77 @@ DEFLIB1NAME=$(TARGET)
|
|||
# --- Targets ------------------------------------------------------
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
||||
.IF "$(WRITERFILTER_GEN)"=="yes"
|
||||
|
||||
OOXMLCXXOUTDIR=.
|
||||
OOXMLHXXOUTDIR=.
|
||||
WRITERFILTERINCDIR=..$/..$/inc
|
||||
|
||||
OOXMLMODEL=model.xml
|
||||
OOXMLPREPROCESSXSL=modelpreprocess.xsl
|
||||
OOXMLRESORUCETOKENSXSL=resourcestokens.xsl
|
||||
OOXMLRESOURCESXSL=resources.xsl
|
||||
OOXMLRESOURCESIMPLXSL=resourcesimpl.xsl
|
||||
OOXMLTOKENMAPINITXSL=tokenmapinit.xsl
|
||||
OOXMLVALUESIMPLXSL=valuesimpl.xsl
|
||||
OOXMLRESOURCEIDSXSL=resourceids.xsl
|
||||
OOXMLGPERFATTRIBUTESXSL=gperfattributes.xsl
|
||||
OOXMLGPERFELEMENTSXSL=gperfelements.xsl
|
||||
|
||||
OOXMLRESOURCEIDSHXX=$(WRITERFILTERINCDIR)$/ooxml$/resourceids.hxx
|
||||
|
||||
OOXMLTOKENSHXX=$(OOXMLHXXOUTDIR)$/OOXMLtokens.hxx
|
||||
OOXMLRESOURCESHXX=$(OOXMLHXXOUTDIR)$/OOXMLresources.hxx
|
||||
OOXMLRESOURCESCXX=$(OOXMLCXXOUTDIR)$/OOXMLresources.cxx
|
||||
TOKENMAPINITCXX=$(OOXMLCXXOUTDIR)$/TokenMapInit.cxx
|
||||
OOXMLVALUESCXX=$(OOXMLCXXOUTDIR)$/OOXMLvalues.cxx
|
||||
GPERFATTRIBUTESHXX=$(OOXMLHXXOUTDIR)$/gperfattributes.hxx
|
||||
GPERFELEMENTSHXX=$(OOXMLHXXOUTDIR)$/gperfelements.hxx
|
||||
MODELPROCESSED=$(MISC)$/model_preprocessed.xml
|
||||
|
||||
OOXMLGENHEADERS=$(OOXMLRESOURCESHXX) $(OOXMLTOKENSHXX) $(GPERFATTRIBUTESHXX) $(GPERFELEMENTSHXX)
|
||||
|
||||
XALANJAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/xalan.jar
|
||||
XALAN=$(JAVA) -jar $(XALANJAR)
|
||||
|
||||
$(MODELPROCESSED): $(OOXMLPREPROCESSXSL) $(OOXMLMODEL)
|
||||
$(XALAN) -xsl $(OOXMLPREPROCESSXSL) -in $(OOXMLMODEL) > $(MODELPROCESSED)
|
||||
|
||||
$(OOXMLTOKENSHXX): $(OOXMLRESORUCETOKENSXSL) $(MODELPROCESSED)
|
||||
$(XALAN) -xsl $(OOXMLRESORUCETOKENSXSL) -in $(MODELPROCESSED) > $(OOXMLTOKENSHXX)
|
||||
$(OOXMLRESOURCESHXX): $(OOXMLRESOURCESXSL) $(MODELPROCESSED)
|
||||
$(XALAN) -xsl $(OOXMLRESOURCESXSL) -in $(MODELPROCESSED) > $(OOXMLRESOURCESHXX)
|
||||
|
||||
$(OOXMLRESOURCESCXX): $(OOXMLRESOURCESIMPLXSL) $(MODELPROCESSED) $(OOXMLRESOURCESHXX)
|
||||
$(XALAN) -xsl $(OOXMLRESOURCESIMPLXSL) -in $(MODELPROCESSED) > $(OOXMLRESOURCESCXX)
|
||||
|
||||
$(TOKENMAPINITCXX): $(OOXMLTOKENMAPINITXSL) $(MODELPROCESSED)
|
||||
$(XALAN) -xsl $(OOXMLTOKENMAPINITXSL) -in $(MODELPROCESSED) > $(TOKENMAPINITCXX)
|
||||
|
||||
$(OOXMLVALUESCXX): $(OOXMLVALUESIMPLXSL) $(MODELPROCESSED) $(OOXMLRESOURCESHXX)
|
||||
$(XALAN) -xsl $(OOXMLVALUESIMPLXSL) -in $(MODELPROCESSED) > $(OOXMLVALUESCXX)
|
||||
|
||||
$(OOXMLRESOURCEIDSHXX): $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED)
|
||||
$(XALAN) -xsl $(OOXMLRESOURCEIDSXSL) -in $(MODELPROCESSED) > $(OOXMLRESOURCEIDSHXX)
|
||||
|
||||
$(GPERFELEMENTSHXX): $(OOXMLGPERFELEMENTSXSL) $(MODELPROCESSED)
|
||||
$(XALAN) -xsl $(OOXMLGPERFELEMENTSXSL) -in $(MODELPROCESSED) | gperf -t -E -S1 -LC++ > $(GPERFELEMENTSHXX)
|
||||
|
||||
$(GPERFATTRIBUTESHXX): $(OOXMLGPERFATTRIBUTESXSL) $(MODELPROCESSED)
|
||||
$(XALAN) -xsl $(OOXMLGPERFATTRIBUTESXSL) -in $(MODELPROCESSED) | gperf -t -E -S1 -LC++ > $(GPERFATTRIBUTESHXX)
|
||||
|
||||
$(SLO)/OOXMLresources.obj: $(OOXMLRESOURCESCXX)
|
||||
|
||||
$(SLO)/TokenMapInit.obj: $(TOKENMAPINITCXX)
|
||||
|
||||
$(SLO)/OOXMLvalues.obj: $(OOXMLVALUESCXX)
|
||||
|
||||
$(SLO)$/NamespaceMapper.obj: $(OOXMLGENHEADERS)
|
||||
$(SLO)$/OOXMLContext.obj: $(OOXMLGENHEADERS)
|
||||
$(SLO)$/OOXMLDocumentImpl.obj: $(OOXMLGENHEADERS)
|
||||
$(SLO)$/OOXMLPropertySetImpl.obj: $(OOXMLGENHEADERS)
|
||||
$(SLO)$/OOXMLSaxHandler.obj: $(OOXMLGENHEADERS)
|
||||
$(SLO)$/OOXMLStreamImpl.obj: $(OOXMLGENHEADERS)
|
||||
$(SLO)$/TokenMap.obj: $(OOXMLGENHEADERS)
|
||||
.ENDIF
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.3 $
|
||||
# $Revision: 1.4 $
|
||||
#
|
||||
# last change: $Author: os $ $Date: 2007-04-23 07:44:39 $
|
||||
# last change: $Author: hbrinkm $ $Date: 2007-06-15 09:31:01 $
|
||||
#
|
||||
# The Contents of this file are made available subject to
|
||||
# the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -56,10 +56,24 @@ SLOFILES= \
|
|||
|
||||
SHL1TARGET=$(TARGET)
|
||||
|
||||
.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
|
||||
ODIAPILIB=-lodiapi
|
||||
RTFTOKLIB=-lrtftok
|
||||
DOCTOKLIB=-ldoctok
|
||||
OOXMLLIB=-looxml
|
||||
.ELIF "$(GUI)"=="WNT"
|
||||
ODIAPILIB=$(LB)$/iodiapi.lib
|
||||
RTFTOKLIB=$(LB)$/irtftok.lib
|
||||
DOCTOKLIB=$(LB)$/idoctok.lib
|
||||
OOXMLLIB=$(LB)$/iooxml.lib
|
||||
.ENDIF
|
||||
|
||||
SHL1STDLIBS=$(SALLIB)\
|
||||
$(CPPULIB)\
|
||||
$(CPPUHELPERLIB) \
|
||||
$(COMPHELPERLIB)
|
||||
$(COMPHELPERLIB) \
|
||||
$(DOCTOKLIB) \
|
||||
$(OOXMLLIB)
|
||||
SHL1IMPLIB=i$(SHL1TARGET)
|
||||
#SHL1USE_EXPORTS=name
|
||||
SHL1USE_EXPORTS=ordinal
|
||||
|
@ -73,3 +87,61 @@ DEFLIB1NAME=$(TARGET)
|
|||
# --- Targets ------------------------------------------------------
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
||||
.IF "$(WRITERFILTER_GEN)"=="yes"
|
||||
|
||||
RESOURCEMODELCXXOUTDIR=.
|
||||
WRITERFILTERINCDIR=..$/..$/inc
|
||||
|
||||
OOXMLMODEL=..$/ooxml$/model.xml
|
||||
OOXMLPREPROCESSXSL=..$/ooxml$/modelpreprocess.xsl
|
||||
OOXMLQNAMETOSTRXSL=..$/ooxml$/qnametostr.xsl
|
||||
OOXMLRESOURCEIDSXSL=..$/ooxml$/resourceids.xsl
|
||||
DOCTOKMODEL=..$/doctok$/resources.xmi
|
||||
DOCTOKQNAMETOSTRXSL=..$/doctok$/qnametostr.xsl
|
||||
DOCTOKSPRMCODETOSTRXSL=..$/doctok$/sprmcodetostr.xsl
|
||||
DOCTOKRESOURCEIDSXSL=..$/doctok$/resourceids.xsl
|
||||
DOCTOKSPRMIDSXSL=..$/doctok$/sprmids.xsl
|
||||
|
||||
OOXMLRESOURCEIDSHXX=$(WRITERFILTERINCDIR)$/ooxml$/resourceids.hxx
|
||||
DOCTOKRESOURCEIDSHXX=$(WRITERFILTERINCDIR)$/doctok$/resourceids.hxx
|
||||
RESOURCESPRMIDSHXX=$(WRITERFILTERINCDIR)$/resourcemodel$/sprmids.hxx
|
||||
|
||||
MODELPROCESSED=$(MISC)$/model_preprocessed
|
||||
QNAMETOSTRCXX=$(RESOURCEMODELCXXOUTDIR)$/qnametostr.cxx
|
||||
SPRMCODETOSTRCXX=$(RESOURCEMODELCXXOUTDIR)$/sprmcodetostr.cxx
|
||||
|
||||
XALANJAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/xalan.jar
|
||||
XALAN=$(JAVA) -jar $(XALANJAR)
|
||||
|
||||
$(MODELPROCESSED): $(OOXMLPREPROCESSXSL) $(OOXMLMODEL)
|
||||
$(XALAN) -xsl $(OOXMLPREPROCESSXSL) -in $(OOXMLMODEL) > $(MODELPROCESSED)
|
||||
|
||||
$(QNAMETOSTRCXX): $(OOXMLQNAMETOSTRXSL) $(MODELPROCESSED) $(DOCTOKQNAMETOSTRXSL) qnametostrheader qnametostrfooter $(DOCTOKRESOURCEIDSHXX) $(OOXMLRESOURCEIDSHXX)
|
||||
$(TYPE) qnametostrheader > $(QNAMETOSTRCXX)
|
||||
$(XALAN) -xsl $(OOXMLQNAMETOSTRXSL) -in $(MODELPROCESSED) >> $(QNAMETOSTRCXX)
|
||||
$(XALAN) -xsl $(DOCTOKQNAMETOSTRXSL) -in $(DOCTOKMODEL) >> $(QNAMETOSTRCXX)
|
||||
$(TYPE) qnametostrfooter >> $(QNAMETOSTRCXX)
|
||||
|
||||
$(SLO)$/qnametostr.obj: $(QNAMETOSTRCXX)
|
||||
|
||||
$(SPRMCODETOSTRCXX): sprmcodetostrheader $(DOCTOKSPRMCODETOSTRXSL) $(DOCTOKMODEL) $(RESOURCESPRMIDSHXX)
|
||||
$(TYPE) sprmcodetostrheader > $(SPRMCODETOSTRCXX)
|
||||
$(XALAN) -xsl $(DOCTOKSPRMCODETOSTRXSL) -in $(DOCTOKMODEL) >> $(SPRMCODETOSTRCXX)
|
||||
echo "}" >> $(SPRMCODETOSTRCXX)
|
||||
|
||||
$(SLO)$/sprmcodetostr.obj: $(SPRMCODETOSTRCXX)
|
||||
|
||||
$(DOCTOKRESOURCEIDSHXX): $(DOCTOKMODEL) $(DOCTOKRESOURCEIDSXSL)
|
||||
$(MKDIRHIER) $(INCCOM)$/doctok
|
||||
$(XALAN) -xsl $(DOCTOKRESOURCEIDSXSL) -in $(DOCTOKMODEL) > $(DOCTOKRESOURCEIDSHXX)
|
||||
|
||||
$(OOXMLRESOURCEIDSHXX): $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED)
|
||||
$(MKDIRHIER) $(INCCOM)$/ooxml
|
||||
$(XALAN) -xsl $(OOXMLRESOURCEIDSXSL) -in $(MODELPROCESSED) > $(OOXMLRESOURCEIDSHXX)
|
||||
|
||||
$(RESOURCESPRMIDSHXX): $(DOCTOKMODEL) $(DOCTOKSPRMIDSXSL)
|
||||
$(MKDIRHIER) $(INCCOM)$/resourcemodel
|
||||
$(XALAN) -xsl $(DOCTOKSPRMIDSXSL) -in $(DOCTOKMODEL) > $(RESOURCESPRMIDSHXX)
|
||||
|
||||
.ENDIF
|
Loading…
Reference in a new issue