GTK-Doc యెలా పనిచేయును?
GTK-Doc అనునది మూలపు(సోర్స్) ఫైళ్ళ యొక్క ఫంక్షన్స్ నందు ప్రత్యేకించి-రూపొందించిన కామెంట్ బ్లాక్స్ నందలి పత్రికీకరణను వుపయోగించి పనిచేయును, లేదా GTK-Doc వుపయోగించే మాదిరి(టెంప్లేట్) ఫైళ్ళకు జతచేసిన పత్రికీకరణను వుపయోగించును (GTK-Doc హెడర్ ఫైళ్ళ నందు డిక్లేర్ చేసివున్న ఫంక్షన్లకు మాత్రమే పత్రికీకరణ యిచ్చును; అది స్టాటిక్ ఫంక్షన్ల కొరకు అవుట్పుట్ అందించదు).
GTK-Doc చాలా పెర్ల్ స్క్రిప్టులను కలిగివుంది, ప్రతిది వేరువేరు స్టెప్పును కార్యక్రమమునందు జరుపును.
అక్కడ కార్యక్రమమునందు 5 ముఖ్య స్టెప్పులు వున్నవి:
-
పత్రికీకరణను వ్రాయుట. మూలకర్త(ఆథర్) సోర్స్ ఫైళ్ళనందు ప్రతి ఫంక్షన్కు, మాక్రోకు, యూనియన్కు పత్రకీకరణను యిస్తాడు. (గతంలో సమాచారమును మాదిరి ఫైళ్ళనందు ప్రవేశపెట్టేవారు, యిది యిప్పడు సమర్ధించబడదు).
-
Gathering information about the code. gtkdoc-scan scans the header files of the code looking for declarations of functions, macros, enums, structs, and unions. It creates the file <module>-decl-list.txt containing a list of the declarations, placing them into sections according to which header file they are in. On the first run this file is copied to <module>-sections.txt. The author can rearrange the sections, and the order of the declarations within them, to produce the final desired order. The second file it generates is <module>-decl.txt. This file contains the full declarations found by the scanner. If for some reason one would like some symbols to show up in the docs, where the full declaration cannot be found by the scanner or the declaration should appear differently, one can place entities similar to the ones in <module>-decl.txt into <module>-overrides.txt.
gtkdoc-scangobj can also be used to dynamically query a library about any GObject subclasses it exports. It saves information about each object's position in the class hierarchy and about any GObject properties and signals it provides.
gtkdoc-scanobj should not be used anymore. It was needed in the past when GObject was still GtkObject inside gtk+.
-
Generating the XML and HTML/PDF. gtkdoc-mkdb turns the template files into XML files in the xml/ subdirectory. If the source code contains documentation on functions, using the special comment blocks, it gets merged in here. If there are no tmpl files used it only reads docs from sources and introspection data.
gtkdoc-mkhtml turns the XML files into HTML files in the html/ subdirectory. Likewise gtkdoc-mkpdf turns the XML files into a PDF document called <package>.pdf.
Files in xml/ and html/ directories are always overwritten. One should never edit them directly.
-
పత్రముల మధ్య క్రాస్-రిఫరెన్సెస్ను పరిష్కరించుచున్నది. HTML ఫైళ్ళను సంస్థాపించిన తర్వాత, వేరు వేరు పత్రముల మధ్య క్రాస్-రిఫరెన్సెస్ను అమర్చుటకు gtkdoc-fixxref నడుపవచ్చును. ఉదాహరణకు, GTK+ పత్రికీకరణ అనునది GLib మాన్యుయల్ నందు వుంచిన పత్రికీకరణకు చాలా క్రాస్-రిఫరెన్సెస్ కలిగివుంది. పంపిణీ కొరకు మూలపు టార్బాల్ను సృష్టించునప్పుడు, gtkdoc-rebase అనునది అన్ని బహిర్గత లింకులను వెబ్-లింకులకు మార్చును. పంపిణీచేసిన (ముందుగాజనియింపచేసిన) పత్రములను సంస్థాపించునప్పుడు అదే అనువర్తనము లింకులను స్థానిక లింకులకు (ఆ పత్రములు యెక్కడ సంస్థాపించబడినవో అక్కడికి) తిరిగివుంచుటకు ప్రయత్నించును.