bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: more filename -> file_name gotchas


From: Akim Demaille
Subject: Re: more filename -> file_name gotchas
Date: Thu, 15 Sep 2005 13:57:27 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

>>> "Paul" == Paul Eggert <address@hidden> writes:

 >> The check still fails, since in the documentation you changed some
 >> position::filename into position::file_name.  Since the example is
 >> extracted and compiled, it doesn't work.

 > Hmm, I can't reproduce the problem.  The documentation and lalr1.cc
 > both say file_name now, and "make check" works for me.  Perhaps
 > you were testing an intermediate state?

Yes, I was: I fail to remove the sources that were in the srcdir tree
when the output was moved to buiddir.  I was still compiling old
sources extracted in srcdir, although those in builddir were more
recent.  It'd be nice if GNU Make could warn about VPATH
ambiguities...

Sorry for the noise.


 > Sorry about that.  The old rules had a typo and I botched the patch.
 > I fixed things (I hope :-) by installing the following patch.

 > 2005-09-14  Paul Eggert  <address@hidden>

 >      * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
 >      do anything if $@ exists.  This reverts part of the 2005-07-07
 >      patch.

 > --- examples/calc++/Makefile.am      7 Jul 2005 23:16:46 -0000       1.2
 > +++ examples/calc++/Makefile.am      14 Sep 2005 22:10:50 -0000      1.3
 > @@ -62,8 +62,11 @@ $(srcdir)/calc++-parser.stamp: $(srcdir)
 >      @mv -f calc++-parser.tmp $@
 
 >  $(calc_sources_generated): $(srcdir)/calc++-parser.stamp
 > -    rm -f $(srcdir)/calc++-parser.stamp
 > -    $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/calc++-parser.stamp
 > +    @if test -f $@; then :; else \
 > +      rm -f $(srcdir)/calc++-parser.stamp && \
 > +      $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/calc++-parser.stamp; \
 > +    fi
 > +

That's also what I had in mind, thanks!

For some reason I still have very strange behavior.  I don't have time
to investigate now, but I'll try to.

bison/examples/calc++ % bake                                     nostromo 13:49
make: Entering directory `/home/akim/src/bison/_build/examples/calc++'
cd ../../../examples/calc++ && \
   gawk -f ../extexi ../../doc/bison.texinfo -- \
     calc++-parser.yy \
     calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
extexi: extracting calc++-driver.hh
extexi: extracting calc++-driver.cc
extexi: extracting calc++-parser.yy
extexi: extracting calc++-scanner.ll
extexi: extracting calc++.cc
../../tests/bison -d -ra -S lalr1.cc -o 
../../../examples/calc++/calc++-parser.cc \
  ../../../examples/calc++/calc++-parser.yy
make[1]: Entering directory `/home/akim/src/bison/_build/examples/calc++'
../../tests/bison -d -ra -S lalr1.cc -o 
../../../examples/calc++/calc++-parser.cc \
  ../../../examples/calc++/calc++-parser.yy
make[1]: Leaving directory `/home/akim/src/bison/_build/examples/calc++'
make[1]: Entering directory `/home/akim/src/bison/_build/examples/calc++'
../../tests/bison -d -ra -S lalr1.cc -o 
../../../examples/calc++/calc++-parser.cc \
  ../../../examples/calc++/calc++-parser.yy
make[1]: Leaving directory `/home/akim/src/bison/_build/examples/calc++'
make[1]: Entering directory `/home/akim/src/bison/_build/examples/calc++'
../../tests/bison -d -ra -S lalr1.cc -o ../../../examples/calc++/calc++-parserc 
\
  ../../../examples/calc++/calc++-parser.yy
make[1]: Leaving directory `/home/akim/src/bison/_build/examples/calc++'
make  all-am
make[1]: Entering directory `/home/akim/src/bison/_build/examples/calc++'
\
flex   `test -f ../../../examples/calc++/calc++-scanner.ll || echo 
'../../../emples/calc++/'`../../../examples/calc++/calc++-scanner.ll
\
{ sed '/^#/ s|lex.yy\.c|calc++-scanner.cc|' lex.yy.c >calc++-scanner.cc  && \
rm -f lex.yy.c; }
make[2]: Entering directory `/home/akim/src/bison/_build/examples/calc++'
../../tests/bison -d -ra -S lalr1.cc -o ../../../examples/calc++/calc++-parserc 
\
  ../../../examples/calc++/calc++-parser.yy
make[2]: Leaving directory `/home/akim/src/bison/_build/examples/calc++'
make[2]: Entering directory `/home/akim/src/bison/_build/examples/calc++'
../../tests/bison -d -ra -S lalr1.cc -o ../../../examples/calc++/calc++-parserc 
\
  ../../../examples/calc++/calc++-parser.yy
make[2]: Leaving directory `/home/akim/src/bison/_build/examples/calc++'
make[2]: Entering directory `/home/akim/src/bison/_build/examples/calc++'
../../tests/bison -d -ra -S lalr1.cc -o ../../../examples/calc++/calc++-parserc 
\
  ../../../examples/calc++/calc++-parser.yy
make[2]: Leaving directory `/home/akim/src/bison/_build/examples/calc++'
if g++ -DHAVE_CONFIG_H -I. -I../../../examples/calc++ -I../..     -g -O2 -MT 
cc++-scanner.o -MD -MP -MF ".deps/calc++-scanner.Tpo" -c -o calc++-scanner.o 
ca++-scanner.cc; \
then mv -f ".deps/calc++-scanner.Tpo" ".deps/calc++-scanner.Po"; else rm -f 
".ps/calc++-scanner.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I../../../examples/calc++ -I../..     -g -O2 -MT 
cc++.o -MD -MP -MF ".deps/calc++.Tpo" -c -o calc++.o `test -f 
'../../../examplecalc++/calc++.cc' || echo 
'../../../examples/calc++/'`../../../examples/calc++alc++.cc; \
then mv -f ".deps/calc++.Tpo" ".deps/calc++.Po"; else rm -f 
".deps/calc++.Tpo"exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I../../../examples/calc++ -I../..     -g -O2 -MT 
cc++-driver.o -MD -MP -MF ".deps/calc++-driver.Tpo" -c -o calc++-driver.o 
`testf '../../../examples/calc++/calc++-driver.cc' || echo 
'../../../examples/calc+'`../../../examples/calc++/calc++-driver.cc; \
then mv -f ".deps/calc++-driver.Tpo" ".deps/calc++-driver.Po"; else rm -f 
".de/calc++-driver.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I../../../examples/calc++ -I../..     -g -O2 -MT 
cc++-parser.o -MD -MP -MF ".deps/calc++-parser.Tpo" -c -o calc++-parser.o 
`testf '../../../examples/calc++/calc++-parser.cc' || echo 
'../../../examples/calc+'`../../../examples/calc++/calc++-parser.cc; \
then mv -f ".deps/calc++-parser.Tpo" ".deps/calc++-parser.Po"; else rm -f 
".de/calc++-parser.Tpo"; exit 1; fi
g++  -g -O2   -o calc++ calc++-scanner.o calc++.o calc++-driver.o calc++-parseo
make[1]: Leaving directory `/home/akim/src/bison/_build/examples/calc++'
make: Leaving directory `/home/akim/src/bison/_build/examples/calc++'
bison/examples/calc++ %                                          nostromo 13:49





reply via email to

[Prev in Thread] Current Thread [Next in Thread]