[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: FW: Error with Make
From: |
Pierre Raoul |
Subject: |
RE: FW: Error with Make |
Date: |
Sat, 22 Mar 2003 21:12:23 +0100 |
Magnus Fromreide [mailto:address@hidden on Saturday, March 22, 2003 7:34 PM
wrote:
> To: Pierre Raoul
> Cc: address@hidden
> Subject: Re: FW: Error with Make
>
>
> On Sat, Mar 22, 2003 at 02:03:06PM +0100, Pierre Raoul wrote:
> > Hello,
> >
Thank you for your answer.
> > I'm not sure what is the best place to post this message, so I
> forward it here.
> >
>
> Neither list is good since your problem seems to be a broken makefile.
>
> > # by default YACC = bison -y
> > YACFLAGS = -t -r all -d -S lalr1.cc
> > [...]
> >
> > build/parser.c build/parser.h: parser.y
> > $(YACC) $(YACFLAGS) $<
> >
> > [...]
> >
> > I get
> >
> > MAKE: *** [build/parser.c] Error 1
>
> Here you are telling make that in order to generate build/parser.c XOR
> build/parser.h it should run yacc.
>
> Another example is
>
> foo bar: fie.c
>
> which tells make to build both foo and bar from the source file fie.c
> in two operations.
Why do you write an XOR (exclusive OR) for my make but an AND for your example?
As I understand it, it's exactly the same dependency in the 2 cases:
build/parser.c and build/parser.h must be build from parser.y (option -d on the
command line of bison).
>
> > and the only file that is created is y.output.
>
> Since you have removed parts of the output I can't tell for sure
The complete command lines for this rules line are:
build/parser.c build/parser.h: parser.y
$(YACC) $(YACFLAGS) $<
-mv y.tab.c build/parser.c
-mv y.tab.h build/parser.h
-mv y.output build/parser.output
-mv *.hh build/*.*
> but my guess
> is that there is some bug in the created output and that makes the result
> fail to compile. In that case make is expected to remove the
> temporary files
> it knows about.
>
OK, but:
- with or without the "mv" command lines, make gives the same error,
- up to last week, I used bison 1.35 with the lines below in the makefile:
# by default YACC = bison -y
YACFLAGS = -d -t -v
[...]
build/parser.c build/parser.h: parser.y
$(YACC) $(YACFLAGS) $<
-mv y.tab.c build/parser.c
-mv y.tab.h build/parser.h
-mv y.output build/parser.output
[...]
without any problem (and bison 1.35 still runs without any problem with my old
projects).
These are the reasons why I think may be there is some problem with bison
1.875b.
I hope that the information above can help more.
Regards
Pierre Raoul