docproc: print a comment about autogeneration for rst output

Leave a hint to folks which file to edit instead.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Jani Nikula 2016-05-12 16:15:44 +03:00 committed by Jonathan Corbet
parent 064669b43b
commit 0e95abf9be

View file

@ -45,6 +45,7 @@
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <time.h>
/* exitstatus is used to keep track of any failing calls to kernel-doc, /* exitstatus is used to keep track of any failing calls to kernel-doc,
* but execution continues. */ * but execution continues. */
@ -616,6 +617,12 @@ int main(int argc, char *argv[])
} }
if (strcmp("doc", subcommand) == 0) { if (strcmp("doc", subcommand) == 0) {
if (file_format == FORMAT_RST) {
time_t t = time(NULL);
printf(".. generated from %s by docproc %s\n",
filename, ctime(&t));
}
/* Need to do this in two passes. /* Need to do this in two passes.
* First pass is used to collect all symbols exported * First pass is used to collect all symbols exported
* in the various files; * in the various files;