title: How to compile yacc/bison with multiple files?
body: <p>I'd like to adjust the yacc-parser of the kconfig-libs (<code>/&lt;path-to-kconfig&gt;/libs/parser</code>). But I'm having problems for resolving various symbols, variables, functions, tokens, etc. I guess the problem is, that for the compiling not all files of the kconfig-parser are included. Here's what I do:</p>
  
  <pre><code>lex lconf.l
  bison -d -y ./yconf.y 
  gcc -o yconf y.tab.c
  </code></pre>
  
  <p>I get error messages like:</p>
  
  <pre><code>./yconf.y 499:44: Error: &gt;&gt;ROOTMENU&lt;&lt; not declared (first use in this function)
  rootmenu.prompt = menu_add_prompt(P_MENU, ROOTMENU, NULL);
                                            ^
  
  ./yconf.y:576:2: Error: »zconfnerrs« not declared (first use in this function)
  zconfnerrs++;
  ^
  
  ./yconf.y:546:3: Error: »zconfnerrs« not declared (first use in this function)
  zconfnerrs++;
  ^
  </code></pre>
  
  <p>There are more files (.c and .h) in the directory of the parser, that (I guess) need to be included for the compiler-process: <code>hconf.c, lconf.c util.c symbol.c menu.c expr.c confdata.c, lkc.h lkc_proto.h</code> (but in the sourcecode there are already the specific <code>#include</code> commands)</p>
  
  <p>I'm using this code straight out-of-the-box. When I use the makefile in  that directory it compiles without problems, but doing it manually like shown above doesn't seem to work. Unfortunately the makefile looks rather cryptic for me - since I'm not a makefile-pro - so it's not easy to look up what they did.</p>
  
  <p>Thanks for advises, about where to "pass" these files, so that the compiling can be properly done.</p>
  
  <p>Kind Regards</p>
  
  <p>[<strong>Edit</strong>:]
  The sources of the kconfiglib, can be found at <a href="http://ymorin.is-a-geek.org/projects/kconfig-frontends" rel="nofollow">http://ymorin.is-a-geek.org/projects/kconfig-frontends</a>. The sources of the parser are located here: <code>/&lt;path-to-kconfig&gt;/libs/parser</code></p>