This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: what is this shell call trying to solve?
- From: Raja R Harinath <harinath at cs dot umn dot edu>
- To: Phil Edwards <pedwards at dmapub dot dma dot org>
- Cc: automake at gnu dot org
- Date: Tue, 22 Jan 2002 10:18:59 -0600
- Subject: Re: what is this shell call trying to solve?
- References: <200201221100.GAA11177@dmapub.dma.org>
Phil Edwards <pedwards@dmapub.dma.org> writes:
> Been playing with 1.5 and have been pretty pleased with the support for
> source files in subdirectories. I have noticed however something which
> strikes me as odd:
>
> % make
> make all-am
> make[1]: Entering directory `/tmp/pme/foo'
> source='/home/pme/easysems/main.cc' object='main.o' libtool=no \
> depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \
> depmode=gcc3 /bin/sh /home/pme/easysems/depcomp \
> * g++ -DHAVE_CONFIG_H -I. -I/home/pme/easysems -I. -g -O2 -c -o
> * main.o `test -f /home/pme/easysems/main.cc ||
> * echo '/home/pme/easysems/'`/home/pme/easysems/main.cc
> g++ -g -O2 -o semmanip getopt.o getopt1.o semmanip_opts.o main.o
> make[1]: Leaving directory `/tmp/pme/foo'
> %
>
> The call to the compiler, broken across three lines here and marked with
> '*', uses a shell expansion which doesn't make any sense. Something is
> visibly wrong here, but I don't know what. Everything works, but it
> looks like it's trying to test for a failure condition and... I dunno,
> do something strang in that condition.
That code is there support non-srcdir builds in the face of 'make's
with broken VPATH implementations. If you look at the Makefile,
you'll see that it is checking to see whether 'make' said that the
source file was in $(srcdir), and if not, the 'echo' supplies the
$(srcdir).
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash