List Info

Thread: Including a new file in Bison sources




Including a new file in Bison sources
user name
2006-07-20 14:11:27
hi,
I am not an expert with automake, but I need some quick help
here...
if I write two new source files in Bison:

src/hello.h
src/hello.c

later I need to #include "hello.h" in some
existing file like main.c
and call functions in hello.c from here;

what parts of the Makefile.am file do I need to change in
order to get
these two compiled along with the rest of Bison souce files?

Thanks!
./satya


_______________________________________________
help-bisongnu.org http
://lists.gnu.org/mailman/listinfo/help-bison
Including a new file in Bison sources
user name
2006-07-24 10:39:25
Satya wrote:
> hi,
> I am not an expert with automake, but I need some quick
help here...
> if I write two new source files in Bison:
> 
> src/hello.h
> src/hello.c
I guess you mean: if I generate those C source files from a
new bison
source file.

> later I need to #include "hello.h" in some
existing file like main.c
> and call functions in hello.c from here;
> 
> what parts of the Makefile.am file do I need to change
in order to get
> these two compiled along with the rest of Bison souce
files?
And I guess you mean: the rest of C source files. Just list
bison source
file among other sources, and list header as generated
source:
hello_SOURCES = main.c hello.y
BUILT_SOURCES = hello.h

Otherwise, have a look at automake manual:
http://www.gnu.org/software/
automake/manual/html_mono/automake.html#Yacc%20and%20Lex

-- 
Guillaume Rousse
Projet Estime, INRIA
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex - France


_______________________________________________
help-bisongnu.org http
://lists.gnu.org/mailman/listinfo/help-bison
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )