[klibc] Fix errlist.c generation in out-of-tree build
Kbuild expands every -I in the compiler options so that in an
out-of-tree build both the source directory and corresponding
object directory are on the include path.
We currently pass $(KLIBCCPPFLAGS) to makeerrlist.pl, which is not
expanded, so in an out-of-tree buld it only looks in the object
directories and does not find linux/errno.h. Use the flags macro to
expand $(KLIBCCPPFLAGS).
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index 9efbb4e..526442d 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -107,7 +107,8 @@
# Readable errormessages extracted from src..
targets += errlist.c
quiet_cmd_errlist = GEN $@
- cmd_errlist = $(PERL) $< $(KLIBCCPPFLAGS) -errlist > $@ || rm -f $@
+ cmd_errlist = $(PERL) $< $(call flags,KLIBCCPPFLAGS) -errlist > $@ \
+ || rm -f $@
$(obj)/errlist.c: $(srctree)/$(src)/makeerrlist.pl
$(call cmd,errlist)