Re: Error in make file



Baho Utot <baho-utot@xxxxxxxxxxxx> writes:

The following is a fragment of my Makefile (GNU Make 3.81).

I believe the error stems from the grep (line) but I don't know why it
errors.

PKGLIST is a list of sub directories to "grep the Build.Log" looking for
compile and installation errors.

This is the error:

make: *** [errors] Error 1

Makefile fragment

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?

I copied your fragment into a Makefile,
changed all the spaces to tabs and ran it.
Here is the output:

for dir in Linux-API-Headers Man-pages Glibc; do \
echo "Checking: "$dir; \
grep Error $dir/Build.Log; \
done
Checking: Linux-API-Headers
grep: Linux-API-Headers/Build.Log: No such file or directory
Checking: Man-pages
grep: Man-pages/Build.Log: No such file or directory
Checking: Glibc
grep: Glibc/Build.Log: No such file or directory
make: *** [errors] Error 2


everything looks fine to me.
.



Relevant Pages

  • Re: find strings in sub directories
    ... > How do I find a specific string with grep in all files including files in ... Mirko ... SDF - Super Dimensional Fortress ...
    (comp.unix.shell)
  • Re: find strings in sub directories
    ... [This followup was posted to comp.unix.shell] ... > How do I find a specific string with grep in all files including files in ...
    (comp.unix.shell)
  • Re: Error in make file
    ... I believe the error stems from the grep but I don't know why it ... PKGLIST is a list of sub directories to "grep the Build.Log" looking ... Makefile fragment ...
    (comp.os.linux.misc)
  • Re: Error in make file
    ... I believe the error stems from the grep but I don't know why it ... PKGLIST is a list of sub directories to "grep the Build.Log" looking for ... Makefile fragment ...
    (comp.os.linux.misc)
  • Re: Error in make file
    ... I believe the error stems from the grep but I don't know why it ... PKGLIST is a list of sub directories to "grep the Build.Log" looking for ... Makefile fragment ...
    (comp.os.linux.misc)