2000-08-13 Manuel Guesdon <mguesdon@orange-concept.com>

* Tools/GNUmakefile: added DocTemplates
	* Tools/Makefile.postamble: added DocTemplates
	* Tools/indextemplate.gsdoc: New file. Use it as template for
		gsdoc index generation
	* Tools/AutoDocTemplate.gsdoc: New File: Use it as templae for AutoDoc
		source-to-documentation generation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7203 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mguesdon 2000-08-13 16:43:25 +00:00
parent 17e760e07d
commit 48ebe3c965
5 changed files with 314 additions and 0 deletions

View file

@ -1,3 +1,12 @@
2000-08-13 Manuel Guesdon <mguesdon@orange-concept.com>
* Tools/GNUmakefile: added DocTemplates
* Tools/Makefile.postamble: added DocTemplates
* Tools/indextemplate.gsdoc: New file. Use it as template for
gsdoc index generation
* Tools/AutoDocTemplate.gsdoc: New File: Use it as templae for AutoDoc
source-to-documentation generation.
2000-08-13 Manuel Guesdon <mguesdon@orange-concept.com>
* Tools/gsdoc-0_6_6.dtd: added ivariable, constant and stylesheet

272
Tools/AutoDocTemplate.gsdoc Normal file
View file

@ -0,0 +1,272 @@
<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "[[infoDictionary.dtd-ref]]">
<gsdoc
[[if mainInterface.interfaceTitle == Class]]
base="[[mainInterface.className]]"
[[else]]
[[if mainInterface.interfaceTitle == Category]]
base="[[mainInterface.className]]+[[mainInterface.categoryName]]"
[[else]]
[[if mainInterface.interfaceTitle == Protocol]]
base="[[mainInterface.protocolName]]Protocol"
[[endif Protocol]]
[[endif Category]]
[[endif Class]]
prev="[[infoDictionary.prev]]"
next="[[infoDictionary.next]]"
up="[[infoDictionary.up]]"
stylesheeturl="[[infoDictionary.stylesheeturl]]">
<head>
<title>[[infoDictionary.basetitle]] [[mainTitle]]</title>
<author name="[[infoDictionary.author-name]]">
<email address="[[infoDictionary.author-email]]"/>
<url url="[[infoDictionary.author-url]]"/>
<desc>[[infoDictionary.author-desc]]</desc>
</author>
<version>[[version]]</version>
<date>[[timestampString]]</date>
<abstract>
[[if mainInterface.interfaceTitle == Class]]
[<uref url="[[mainInterface.className]].gsdoc">Source : [[mainInterface.className]].gsdoc</uref>]
[[else]]
[[if mainInterface.interfaceTitle == Category]]
[<uref url="[[mainInterface.className]]+[[mainInterface.categoryName]].gsdoc">Source : [[mainInterface.className]]+[[mainInterface.categoryName]].gsdoc</uref>]
[[else]]
[[if mainInterface.interfaceTitle == Protocol]]
[<uref url="[[mainInterface.protocolName]]Protocol.gsdoc">Source : [[mainInterface.protocolName]]Protocol.gsdoc</uref>]
[[endif Protocol]]
[[endif Category]]
[[endif Class]]
<uref url="[[infoDictionary.dtd-url]]">DTD</uref>] </abstract>
<copy>[[copyrightYear]][[if copyrightOwner.length > 0]] by [[copyrightOwner]][[endif]]</copy>
</head>
<body>
<front>
<contents/>
</front>
<chapter>
[[if hasMainInterface == 1]]
<heading>[[mainTitle]]</heading>
[[if mainInterface.interfaceTitle == Class]]
<class name="[[mainInterface.className]]" [[if mainInterface.inheritsString.length > 0]] super="[[mainInterface.inheritsString]]"[[endif]]>
[[else]]
[[if mainInterface.interfaceTitle == Category]]
<category name="[[mainInterface.categoryName]]" class="[[mainInterface.className]]">
[[else]]
[[if mainInterface.interfaceTitle == Protocol]]
<protocol name="[[mainInterface.protocolName]]Protocol">
[[endif Protocol]]
[[endif Category]]
[[endif Class]]
<declared>[[importString]]</declared>
[[if mainInterface.conformedProtocols.count > 0]]
[[foreach protocolName mainInterface.conformedProtocols prot1]]
<conform>[[protocolName]]</conform>
[[endforeach prot1]]
[[endif conformedProtocols]]
[[endif hasMainInterface == 1]]
[[if hasMainInterface == 1]]
<desc>
[[mainInterface.interfaceTitle]] Description -
[[mainInterface.entityDescription.formattedCommentString]]
</desc>
[[endif hasMainInterface == 1]]
[[if hasMainInterface != 0]][[comment - Everything else is only done if we have an interface]]
[[if mainInterface.interfaceTitle == Class]]
[[if mainInterface.ivarArray.count > 0]]
[[comment Instance Variables]]
[[foreach ivar mainInterface.ivarArray ivar1]]
<ivariable name="[[ivar.fullName]]" type="[[ivar.formattedType]]" posttype="[[ivar.posttype]]">
<desc>[[ivar.entityDescription.formattedCommentString]]</desc>
</ivariable>
[[endforeach ivar1]]
[[endif ivarArray]][[endif Class]]
[[if mainInterface.classMethods.count > 0]]
[[comment Class Methods]]
[[foreach method mainInterface.classMethods method1]]
[[if methodIndex > 0]] [[comment Start]] [[endif]]
[[comment <uref url="//apple_ref/occ/[[if mainInterface.interfaceTitle == Protocol]]intfm[[else]]clm[[endif]]/[[mainTitle]]/[[method.selectorName]]"></uref>
<uref url="[[method.methodName]]">[[method.selectorName]]</uref>]]
[[comment +]]<method type="[[method.formattedReturnType]]" factory="yes">
[[if method.argumentCount == 0]]
<sel>[[method.selectorName]]</sel>
[[else]]
[[foreach arg method.arguments arg1]]
[[if argIndex > 0]] [[endif]]
<sel>[[arg.argName]]:</sel>
<arg type="[[arg.argType]]">[[arg.varName]]</arg>
[[endforeach arg1]]
[[endif]]
<desc>[[method.entityDescription.formattedCommentString]]</desc>
</method>
[[if methodIndex > 0]] [[comment Stop]] [[endif]]
[[endforeach method1]]
[[endif classMethods]]
[[if mainInterface.instanceMethods.count > 0]]
[[comment Instance Methods]]
[[foreach method mainInterface.instanceMethods method1]]
[[if methodIndex > 0]] [[comment Start]] [[endif]]
[[comment <uref url="//apple_ref/occ/[[if mainInterface.interfaceTitle == Protocol]]intfm[[else]]instm[[endif]]/[[mainTitle]]/[[method.selectorName]]"></uref>
<uref url="[[method.methodName]]">[[method.selectorName]]</uref>]]
[[comment -]] <method type="[[method.formattedReturnType]]">
[[if method.argumentCount == 0]]
<sel>[[method.selectorName]]</sel>
[[else]]
[[foreach arg method.arguments arg1]]
[[if argIndex > 0]] [[endif]]
<sel>[[arg.argName]]:</sel>
<arg type="[[arg.argType]]">[[arg.varName]]</arg>
[[endforeach arg1]]
[[endif]]
<desc>[[method.entityDescription.formattedCommentString]]</desc>
</method>
[[if methodIndex > 0]] [[comment Stop]] [[endif]]
[[endforeach method1]]
[[endif instanceMethods]]
[[if mainInterface.interfaceTitle == Class]]
</class>
[[else]]
[[if mainInterface.interfaceTitle == Category]]
</category>
[[else]]
[[if mainInterface.interfaceTitle == Protocol]]
</protocol>
[[endif Category]]
[[endif Category]]
[[endif Class]]
[[endif hasMainInterface]]
</chapter>
[[if typedefArray.count > 0]]
<chapter>
<heading>Defined Types</heading>
[[foreach group typedefGroupArray group4]]
[[foreach typedef group.itemArray typedef1]]
[[comment <uref url="//apple_ref/c/tdef/[[typedef.name]]">[[typedef.name]]</uref>]]
<type name="[[typedef.name]]">
<typespec>[[typedef.formattedValue]][[typedef.suffixValue]]</typespec>
[[if group.comment.commentString.length > 0]]
<desc>
[[group.comment.formattedCommentString]]
</desc>
[[endif commentLength]]
</type>
[[endforeach typedef1]]
[[endforeach group4]]
</chapter>
[[endif typedefArray]]
[[if constantArray.count > 0]]
<chapter>
<heading>Symbolic Constants</heading>
[[foreach group constantGroupArray group5]]
[[foreach constant group.itemArray constant1]]
[[comment <uref url="//apple_ref/c/econst/[[constant.name]]">[[constant.name]]</uref>]]
<constant name="[[constant.name]]" value="[[constant.formattedValue]]">
[[if group.comment.commentString.length > 0]]
<desc>[[group.comment.formattedCommentString]]</desc>
[[endif commentLength]]
</constant>
[[endforeach constant1]]
[[endforeach group5]]
</chapter>
[[endif constantArray]]
[[if macroArray.count > 0]]
<chapter>
<heading>Macro Definitions</heading>
[[foreach group macroGroupArray group2]]
[[foreach macro group.itemArray macro1]]
<macro name="[[macro.name]]">
<arg>[[macro.parameterString]]</arg>
[[if group.comment.commentString.length > 0]]
<desc>[[group.comment.formattedCommentString]]</desc>
[[endif commentLength]]
[[endforeach macro1]]
[[endforeach group2]]
</chapter>
[[endif macroArray]]
[[if functionArray.count > 0]]
<chapter>
<heading>Functions</heading>
[[foreach group functionGroupArray group3]]
[[foreach function group.itemArray function1]]
[[comment <uref url="//apple_ref/c/func/[[function.name]]">[[function.name]]</uref>]]
<function name="[[function.name]]" type="[[function.formattedType]]">
<desc>[[function.formattedParameterString]]<br>
[[if group.comment.commentString.length > 0]]
[[group.comment.formattedCommentString]]
[[endif commentLength]]
[[endforeach function1]]
[[endforeach group3]]
</chapter>
[[endif functionArray]]
[[if inlineFunctionArray.count > 0]]
<chapter>
<heading>Static Inline Functions</heading>
[[foreach group inlineFunctionGroupArray group3]]
[[foreach function group.itemArray function1]]
[[comment <uref url="//apple_ref/c/func/[[function.name]]">[[function.name]]</uref>]]
<function name="[[function.name]]" type="[[function.formattedType]]">
<desc>[[function.formattedParameterString]]<br>
[[if group.comment.commentString.length > 0]]
[[group.comment.formattedCommentString]]
[[endif commentLength]]
[[endforeach function1]]
[[endforeach group3]]
</chapter>
[[endif inlineFunctionArray]]
[[if variableArray.count > 0]]
<chapter>
<heading>Global Variables</heading>
[[foreach group variableGroupArray group6]]
[[foreach global group.itemArray global1]]
[[comment <uref url="//apple_ref/c/data/[[global.name]]">[[global.name]]</uref>]]
<variable name="[[global.name]]" type="[[global.formattedType]]" posttype="[[global.posttype]]">
[[if group.comment.commentString.length > 0]]
<desc>[[group.comment.formattedCommentString]]</desc>
[[endif commentLength]]
</variable>
[[endforeach global1]]
[[endforeach group6]]
</chapter>
[[endif variableArray]]
</body>
</gsdoc>

View file

@ -34,6 +34,10 @@ include ../config.mak
dtddir = $(GNUSTEP_RESOURCES)/DTDs
DTD_FILES = gsdoc-0_6_5.dtd gsdoc-0_6_6.dtd
# DocTemplates to install
doctemplatesdir = $(GNUSTEP_RESOURCES)/DocTemplates
DOCTEMPLATES_FILES = indextemplate.gsdoc AutoDocTemplate.gsdoc
# The application to be compiled
TOOL_NAME = gdnc gsdoc defaults plmerge \
plparse sfparse pldes plser

View file

@ -25,6 +25,12 @@ after-install::
for file in $(DTD_FILES); do \
$(INSTALL_DATA) $$file $(dtddir)/$$file; \
done; \
if [ ! -f $(doctemplatesdir) ]; then \
$(MKDIRS) $(doctemplatesdir); \
fi; \
for file in $(DOCTEMPLATES_FILES); do \
$(INSTALL_DATA) $$file $(doctemplatesdir)/$$file; \
done; \
if [ "`$(WHOAMI)`" != "root" ]; then \
echo ""; \
echo "************************************************************"; \

23
Tools/indextemplate.gsdoc Normal file
View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "/usr/GNUstep/System/Libraries/Resources/DTDs/gsdoc-0_6_6.dtd">
<gsdoc base="[[indexBaseFileName]]" next="[[next]]" up="[[infoDictionary.up]]" stylesheeturl="[[infoDictionary.stylesheeturl]]">
<head>
<title>[[projectName]]</title>
<author name="[[infoDictionary.authorName]]">
<email address="[[infoDictionary.authorEMail]]"/>
<url url="[[infoDictionary.authorURL]]"/>
<desc>[[infoDictionary.authorDesc]]</desc>
</author>
<version>[[infoDictionary.version]]</version>
<date>[[infoDictionary.date]] [[timestampString]]</date>
<abstract>
[<uref url="[[indexFileName]]">Source : [[indexFileName]]</uref>] <uref url="http://www.gnustep.org/gsdoc.xml">DTD</uref>]
</abstract>
<copy>[[infoDictionary.copyright]]</copy>
</head>
<body>
[[content]]
</body>
</gsdoc>