aboutsummaryrefslogtreecommitdiff
path: root/scripts/genksyms/lex.l
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 18:41:27 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 18:41:27 -0800
commitdede6faac448db4251f8996d7dec6afb5a43726a (patch)
treedcf34d731bc4626b9e232151acee3673da84adaf /scripts/genksyms/lex.l
parent21404b772a1c65f7b935b8c0fddc388a949f4e31 (diff)
parent5f7efb4c6da9f90cb306923ced2a6494d065a595 (diff)
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: Kbuild: append missing-syscalls to the default target list genksyms: Regenerate lexer and parser genksyms: Do not expand internal types genksyms: Minor parser cleanup Makefile: remove a duplicated line fixdep: fix extraneous dependencies scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement kbuild: prevent make from deleting _shipped files kbuild: Do not delete empty files in make distclean
Diffstat (limited to 'scripts/genksyms/lex.l')
-rw-r--r--scripts/genksyms/lex.l8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index 400ae06a70d..f770071719c 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -116,6 +116,7 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
cur_node->tag = \
find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\
SYM_ENUM_CONST : SYM_NORMAL ; \
+ cur_node->in_source_file = in_source_file; \
} while (0)
#define APP _APP(yytext, yyleng)
@@ -166,6 +167,13 @@ repeat:
cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1);
cur_line = atoi(yytext+2);
+ if (!source_file) {
+ source_file = xstrdup(cur_filename);
+ in_source_file = 1;
+ } else {
+ in_source_file = (strcmp(cur_filename, source_file) == 0);
+ }
+
goto repeat;
}