-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add in man page support for the different exposed functions with examples #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep new entries in a alphabetical order to existing entries..
Do you mean new files added to be in an alphabetic order, or something else? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some remarks, otherwise I'm fine with this PR.
autogen.sh
Outdated
@@ -27,6 +27,7 @@ depcomp | |||
doc/Doxyfile doc/doxyfile.stamp doc/doxygen_sqlite3.db doc/Makefile doc/Makefile.in | |||
examples/*.o examples/coap-client examples/coap-server examples/coap-rd | |||
examples/coap-*.5 examples/coap-*.txt examples/Makefile.in | |||
man/Makefile man/Makefile.in man/coap_*.[37] man/coap_*.txt man/coap_*.xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep entries here in the alphabetical order.
configure.ac
Outdated
man/coap_handler.txt | ||
man/coap_recovery.txt | ||
man/coap_resource.txt | ||
man/coap_tls_library.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here please keep a alphabetical order of AC_CONFIG_FILES.
man/Makefile.am
Outdated
@@ -0,0 +1,42 @@ | |||
# examples/Makefile.am | |||
# | |||
# Copyright (C) 2015 Carsten Schoenert <c.schoenert@t-online.de> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest you use your name for the copyright holder as you the author of the new file.
I hate this webgui ... |
Understood - I will make changes and push shortly. |
Changes made and pushed. There was some other legacy out of order which I left alone. |
If ever possible avoid merge commits in pull requests, just rebase your changes on top of the devel branch instead and do a force push into your PR branch. |
OK - apologies for not getting it right. So in principal I should do something like - correct? |
Yes. :-) But I would also suggest here you do some more rebasing on your fixups and squash the fixups commits into the original commits. |
I have done some rebasing and squash fixups, so that there is now only the original log entry for autogen.sh, configure.ac and man/Makefile.am. How does it look now? |
Then you have done something different than me. You should only see your patches on top of the devel branch an not any patches that are already exists on the branch devel. |
I am pretty sure I did the following (upstream is obgm/libcoap/develop): git checkout develop I think that as there were other commits on obgm/develop between my initial commit and updated commit - when I squashed the 2 together all the interim commits were rebuilt and hence became a part of my "git push origin manpages". Other than my local repository says the only 'git diff' are what I expect from my changes, I so far have not found out how to do this through this GUI. Is it worth me trashing this pull request and take some time re-doing it from scratch? |
I've no idea what you have done as I've done exactly the same as you have written and I only had finally your patches in this branch in the end. |
I think that what is now pushed from my end looks better. I did a "github rebase -i develop" and removed the unwanted commits. |
Looks better now. |
Thanks. My only comment is that it describes some call backs / functions that have pull requests outstanding. If I get some more spare cycles, I will try to do some of theother missing man pages. |
Updated for COAP_UNKNOWN_RESOURCE change in pull request #133 |
f96cc6f
to
477bd84
Compare
Can we move the subfolder |
man/coap_attribute.txt.in
Outdated
|
||
static void | ||
init_resources(coap_context_t *ctx) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like the examples to follow the coding guidelines of libcoap. Here, this means that the block-opening parenthesis is at the end of the previous line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it happens, a2x does that anyway, but I will make the change. However, there have to be some blank lines to make things format, asthe a2x ' + ' fails tor work for me to start a new line.
I have seen man files being in the doc directory, man being in a separate directory from doc, but not man as a sub-directory of doc so far in other products. I did not want to clutter the doc directory with the actual man pages, but can do this if you want. |
Ok, not sure. @tijuca do you have any preference? |
Updated with uri -> uri_path. Directory not changed. |
55d8311
to
3b89f76
Compare
Hm, it seems that the manual pages in man/ are built only if both, Maybe, we can make this a bit more consistent? |
Hi Olaf, I will try to dis-entangle the documentation building requirements. Would you have any objection to --enable-documentation to being both --enable-manpages + (new) --enable-doxygen ? Sure - happy to move examples man pages to man. I will leave the names with a - seperator, instead of _ separator as I have had to do the the functions man pages. |
Sounds good to me, thanks! |
I believe that I have got this working as expected, and fixed a couple of typos along the way in the man pages |
man/coap_attribute.txt.in
Outdated
*coap_attr_t *coap_find_attr(coap_resource_t *_resource_, const unsigned | ||
char *_name_, size_t _nlen_);* | ||
|
||
Link with -lcoap-1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will run into trouble with burying the API number deep in the manual pages. How about something like
Link with -lcoap-@LIBCOAP_API_VERSION@.
in the respective .in files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had held off changing the -l entry as there is the potential that it could be -llibcoap-2-openssl, etc. as a set of alternatives if the library renaming patch goes ahead.
Easy enough to change it to -lcoap-@LIBCOAP_API_VERSION@ for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you are right. Usually pkg-config solves this but, of course, there are many platforms that do not have pkg-config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now -lcoap-@LIBCOAP_API_VERSION@in latest push
2a47888
to
e6941cd
Compare
Also add in examples/Makefile
Create a new --enable-doxygen Make --enable-documentation include both --enable-manpages and --enable-doxygen and --disable-documentation include --disable-manpages and --disable-doxygen
Delete building man pages as they are now a part of the man directory
./configure now supports --enable-manpages (on by default) where man pages are built and installed as appropriate.
'man coap' provides an overview
coap_attribute, coap_context, coap_handler, coap_recovery, coap_resource and coap_tls_library are in this update
Potentially, coap_logging, coap_session and coap_io have still to be written, and possibly others.