This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 3.0.1 does not work on Solaris 8/sparc
- To: rittle at latour dot rsch dot comm dot mot dot com
- Subject: Re: gcc 3.0.1 does not work on Solaris 8/sparc
- From: Marc Espie <espie at quatramaran dot ens dot fr>
- Date: Sat, 8 Sep 2001 18:37:58 +0200
- Cc: gcc at gcc dot gnu dot org
- Organization: Ecole Normale Superieure (quatramaran)
- References: <Pine.GSO.4.21.0109061511530.8910-100000@rfhpc8320.fh-regensburg.de>
In article <200109071950.f87JoRL85733@latour.rsch.comm.mot.com> you write:
>In article <20010906222916.A2729@mediaone.net> you write:
>The root problem is that ln is returning an error code that kills
>plain make on many systems but not GNU make. Here is the sample
>makefile that proves the issue (and it seems like deja vu):
>; cat Makefile
>all: b
>
>b: c
> (echo hi && ln -s a b); echo done
>
>c:
> touch c
>
>a:
> touch a
>
This is plain gnu-make non portability. You definitely do NOT want to do
things that way.
If a command may fail, you want to acknowledge that fact, e.g.,
echo hi && ln -s a b || true; echo done
would work.
Or you can explicitly set +e to recognize possible failures:
(set +e; echo hi && ln -s a b); echo done
This is a quality-of-implementation issue: most makes out there invoke
shell-script fragments with 'set -e', so that errors *WILL* be noticed, unless
the line has been explicitly prefixed with '-'.
For some reason, gnu-make does not do things that way.