Re: Error in make file



Baho Utot <baho-utot@xxxxxxxxxxxx> writes:

Dan Espen wrote:

Baho Utot <baho-utot@xxxxxxxxxxxx> writes:

Dan Espen wrote:

Baho Utot <baho-utot@xxxxxxxxxxxx> writes:

The following is a fragment of my Makefile (GNU Make 3.81).
PKGLIST = Linux-API-Headers Man-pages Glibc

errors:
for dir in $(PKGLIST); do \
echo "Checking: "$$dir; \
grep Error $$dir/Build.Log; \
done

Anyone know the fix?

Just prefix the whole command with "-".

Well Ok i did that.
It is still there as it, Now it prints

make: [errors] Error 1 (ignored)

Yes, that's the way it tells you there was an
error but it's continuing anway.

Oh well maybe I should just leave it :)

If it really bothers you that much, change the shell.

For example, if you want to suppress a failure in
the shell you can say, if a command fails, that's OK:

grep Error $$dir/Build.Log || true;

That will make the line always give a good return code.
.