gcc 3.0.1 does not work on Solaris 8/sparc

Marc Espie espie@quatramaran.ens.fr
Sat Sep 8 09:38:00 GMT 2001


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.



More information about the Gcc mailing list