automake
[Top][All Lists]
Advanced

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

Re: what is this shell call trying to solve?


From: Raja R Harinath
Subject: Re: what is this shell call trying to solve?
Date: Tue, 22 Jan 2002 10:18:59 -0600
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i686-pc-linux-gnu)

Phil Edwards <address@hidden> 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 ------------------------------ address@hidden
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



reply via email to

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