diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 11:23:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 11:23:06 -0700 |
commit | 821f3eff7cdb9d6c7076effabd46c96c322daed1 (patch) | |
tree | 60f13155196fd6c84424c8aebc133ca4a5f56749 /scripts/basic/docproc.c | |
parent | ebc283118ee448dcb6e6cae74a8a43f17a1ccc3f (diff) | |
parent | f77bf01425b11947eeb3b5b54685212c302741b8 (diff) | |
download | op-kernel-dev-821f3eff7cdb9d6c7076effabd46c96c322daed1.zip op-kernel-dev-821f3eff7cdb9d6c7076effabd46c96c322daed1.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
kbuild: introduce ccflags-y, asflags-y and ldflags-y
kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
kbuild: enable use of AFLAGS and CFLAGS on commandline
kbuild: enable 'make AFLAGS=...' to add additional options to AS
kbuild: fix AFLAGS use in h8300 and m68knommu
kbuild: check for wrong use of CFLAGS
kbuild: enable 'make CFLAGS=...' to add additional options to CC
kbuild: fix up CFLAGS usage
kbuild: make modpost detect unterminated device id lists
kbuild: call export_report from the Makefile
kbuild: move Kai Germaschewski to CREDITS
kconfig/menuconfig: distinguish between selected-by-another options and comments
kconfig: tristate choices with mixed tristate and boolean values
include/linux/Kbuild: remove duplicate entries
kbuild: kill backward compatibility checks
kbuild: kill EXTRA_ARFLAGS
kbuild: fix documentation in makefiles.txt
kbuild: call make once for all targets when O=.. is used
kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
kbuild: update _shipped files for kconfig syntax cleanup
...
Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
Diffstat (limited to 'scripts/basic/docproc.c')
-rw-r--r-- | scripts/basic/docproc.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index f4d2f68..e5c6ac7 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c @@ -10,8 +10,10 @@ * documentation-frontend * Scans the template file and call kernel-doc for * all occurrences of ![EIF]file - * Beforehand each referenced file are scanned for - * any exported sympols "EXPORT_SYMBOL()" statements. + * Beforehand each referenced file is scanned for + * any symbols that are exported via these macros: + * EXPORT_SYMBOL(), EXPORT_SYMBOL_GPL(), & + * EXPORT_SYMBOL_GPL_FUTURE() * This is used to create proper -function and * -nofunction arguments in calls to kernel-doc. * Usage: docproc doc file.tmpl @@ -73,7 +75,7 @@ void usage (void) } /* - * Execute kernel-doc with parameters givin in svec + * Execute kernel-doc with parameters given in svec */ void exec_kernel_doc(char **svec) { @@ -82,7 +84,7 @@ void exec_kernel_doc(char **svec) char real_filename[PATH_MAX + 1]; /* Make sure output generated so far are flushed */ fflush(stdout); - switch(pid=fork()) { + switch (pid=fork()) { case -1: perror("fork"); exit(1); @@ -133,6 +135,7 @@ struct symfile * add_new_file(char * filename) symfilelist[symfilecnt++].filename = strdup(filename); return &symfilelist[symfilecnt - 1]; } + /* Check if file already are present in the list */ struct symfile * filename_exist(char * filename) { @@ -156,8 +159,8 @@ void noaction2(char * file, char * line) { file = file; line = line; } void printline(char * line) { printf("%s", line); } /* - * Find all symbols exported with EXPORT_SYMBOL and EXPORT_SYMBOL_GPL - * in filename. + * Find all symbols in filename that are exported with EXPORT_SYMBOL & + * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly). * All symbols located are stored in symfilelist. */ void find_export_symbols(char * filename) @@ -179,15 +182,15 @@ void find_export_symbols(char * filename) perror(real_filename); exit(1); } - while(fgets(line, MAXLINESZ, fp)) { + while (fgets(line, MAXLINESZ, fp)) { char *p; char *e; - if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != 0) || - ((p = strstr(line, "EXPORT_SYMBOL")) != 0)) { + if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) || + ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) { /* Skip EXPORT_SYMBOL{_GPL} */ while (isalnum(*p) || *p == '_') p++; - /* Remove paranteses and additional ws */ + /* Remove parentheses & additional whitespace */ while (isspace(*p)) p++; if (*p != '(') @@ -211,7 +214,7 @@ void find_export_symbols(char * filename) * Document all external or internal functions in a file. * Call kernel-doc with following parameters: * kernel-doc -docbook -nofunction function_name1 filename - * function names are obtained from all the src files + * Function names are obtained from all the src files * by find_export_symbols. * intfunc uses -nofunction * extfunc uses -function @@ -262,7 +265,7 @@ void singfunc(char * filename, char * line) vec[idx++] = KERNELDOC; vec[idx++] = DOCBOOK; - /* Split line up in individual parameters preceeded by FUNCTION */ + /* Split line up in individual parameters preceded by FUNCTION */ for (i=0; line[i]; i++) { if (isspace(line[i])) { line[i] = '\0'; @@ -292,7 +295,7 @@ void parse_file(FILE *infile) { char line[MAXLINESZ]; char * s; - while(fgets(line, MAXLINESZ, infile)) { + while (fgets(line, MAXLINESZ, infile)) { if (line[0] == '!') { s = line + 2; switch (line[1]) { @@ -351,9 +354,9 @@ int main(int argc, char *argv[]) { /* Need to do this in two passes. * First pass is used to collect all symbols exported - * in the various files. + * in the various files; * Second pass generate the documentation. - * This is required because function are declared + * This is required because some functions are declared * and exported in different files :-(( */ /* Collect symbols */ @@ -396,4 +399,3 @@ int main(int argc, char *argv[]) fflush(stdout); return exitstatus; } - |