[Asterisk-code-review] Makefile: Allow XML documentation to exist outside source files (asterisk[16])

George Joseph asteriskteam at digium.com
Mon Feb 14 08:00:03 CST 2022


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18014 )


Change subject: Makefile: Allow XML documentation to exist outside source files
......................................................................

Makefile: Allow XML documentation to exist outside source files

Until now, XML documentation had to be in a "c" source file
in the top-level of each module directory.  For instance,
documentation would be found in res/res_pjsip.c but NOT
res/res_pjsip/pjsip_configuration.c.

With this change, you can now place documentation in any
"c" source file AND you can now place it in a separate
XML file altogether.  The following are examples of valid
locations:

res/res_pjsip.c
res/res_pjsip/pjsip_configuration.c
res/res_pjsip/pjsip_doc.xml

If you place the documentation in an XML file, it must be
a fully valid one.  The "configInfo", "manager", "managerEvent",
etc. elements that would be in the "c" file should be wrapped
properly.  Example for "somemodule.xml":

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE docs SYSTEM "appdocsxml.dtd">
<docs>
    <configInfo>
    ...
    </configInfo>
</docs>

It's the "appdocsxml.dtd" that tells the Makefile that this is
a documentation XML file and not some other XML file.

Other than the ".xml" suffix, the name of the file is not
significant.

This change also moves the documentation that was in res_pjsip.c
to 2 new xml files in res/res_pjsip:  pjsip_config.xml and
pjsip_manager.xml.  This cut the number of lines in res_pjsip.c
in half.

Change-Id: I486c16c0b5a44d7a8870008e10c941fb19b71ade
---
M Makefile
M res/res_pjsip.c
A res/res_pjsip/pjsip_config.xml
A res/res_pjsip/pjsip_manager.xml
4 files changed, 2,939 insertions(+), 2,929 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/14/18014/1


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18014
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I486c16c0b5a44d7a8870008e10c941fb19b71ade
Gerrit-Change-Number: 18014
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220214/b48fc380/attachment.html>


More information about the asterisk-code-review mailing list