Thread: little bug in current CVS
Hi, after make clean, make failed with message: make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend' prereqdir=`cd parser/ && pwd` && \ cd ../../src/include/parser/ && rm -f parse.h && \ ln -s $prereqdir/parse.h . ln: ./parser: File exists make[2]: *** [../../src/include/parser/parse.h] Error 1 Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
Oleg Bartunov <oleg@sai.msu.su> writes: > make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend' > prereqdir=`cd parser/ && pwd` && \ > cd ../../src/include/parser/ && rm -f parse.h && \ > ln -s $prereqdir/parse.h . > ln: ./parser: File exists > make[2]: *** [../../src/include/parser/parse.h] Error 1 Hm. I bet your shell is failing to strip whitespace from the output of pwd, so that the ln command ends up looking like ln -s /home/postgres/cvs/pgsql/src/backend/parser /parse.h . Can you check that theory by inserting an 'echo'? regards, tom lane
On Tue, 6 Feb 2001, Tom Lane wrote: > Oleg Bartunov <oleg@sai.msu.su> writes: > > make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend' > > prereqdir=`cd parser/ && pwd` && \ > > cd ../../src/include/parser/ && rm -f parse.h && \ > > ln -s $prereqdir/parse.h . > > ln: ./parser: File exists > > make[2]: *** [../../src/include/parser/parse.h] Error 1 > > Hm. I bet your shell is failing to strip whitespace from the output of > pwd, so that the ln command ends up looking like > > ln -s /home/postgres/cvs/pgsql/src/backend/parser /parse.h . > > Can you check that theory by inserting an 'echo'? you're right. shell is BASH_VERSION='2.04.0(1)-release' Makefile looks too complex: $(top_builddir)/src/include/parser/parse.h: $(srcdir)/parser/parse.h prereqdir=`cd $(dir $<) && pwd` && \ cd$(dir $@) && rm -f $(notdir $@) && \ $(LN_S) $$prereqdir/$(notdir $<) . We're already in src/backend directory, why not useln -sf parser/parse.h . > > regards, tom lane > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
Oleg Bartunov writes: > after make clean, make failed with message: > > make[2]: Entering directory /home/postgres/cvs/pgsql/src/backend' > prereqdir=`cd parser/ && pwd` && \ > cd ../../src/include/parser/ && rm -f parse.h && \ > ln -s $prereqdir/parse.h . > ln: ./parser: File exists > make[2]: *** [../../src/include/parser/parse.h] Error 1 Try changing the second line to this prereqdir=`CDPATH=: ; cd parser/ && pwd` && \ -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/