hurd = $(..)sysdeps/mach/hurd
-define mach-errno-h
-($(foreach h,mach/message.h \
+mach-errno-h = \
+ mach/message.h \
mach/kern_return.h \
mach/mig_errors.h \
- device/device_types.h,\
- echo '#include <$h>';\
- ))
-endef
+ device/device_types.h
# We use the compiler to generate a list of absolute file names for
# the headers we want to search for Mach error codes, listed above (and
# incidentally, all other headers those include).
-include $(common-objpfx)errnos.d
$(common-objpfx)errnos.d: $(mach-errnos-deps)
- $(mach-errno-h) | \
- $(CC) $(CFLAGS) \
- $(subst -include $(common-objpfx)libc-modules.h,,$(CPPFLAGS)) \
- -M -x c - | \
- sed $(sed-remove-objpfx) -e 's,- *:,mach-errnos-deps :=,' \
- -e 's, \.\./, $(..),g' > $@t
+ echo -n "mach-errnos-deps := " > $@t
+ for h in $(mach-errno-h) ; do \
+ echo "#include <$$h>" \
+ | $(CC) $(CFLAGS) \
+ $(subst -include $(common-objpfx)libc-modules.h,,$(CPPFLAGS)) \
+ -M -x c - \
+ | sed $(sed-remove-objpfx) \
+ -e 's, \.\./, $(..),g' \
+ -e 's,\\$$,,g' \
+ -e 's, ,\n,g' \
+ | grep "$$h$$" \
+ | tr '\n' ' ' \
+ >> $@t ; \
+ done
+ echo >> $@t
mv -f $@t $@
$(hurd)/bits/errno.h: $(common-objpfx)stamp-errnos ;
/* This file generated by errnos.awk from
errno.texi
- stdc-predef.h
- libc-symbols.h
mach/message.h
mach/kern_return.h
- mach/port.h
- mach/boolean.h
- stdint.h
- ../stdlib/stdint.h
- ../bits/libc-header-start.h
- features.h
- features-time64.h
- ../sysdeps/generic/features-time64.h
- sys/cdefs.h
- ../misc/sys/cdefs.h
- ../sysdeps/x86/bits/wordsize.h
- ../sysdeps/ieee754/ldbl-96/bits/long-double.h
- gnu/stubs.h
- bits/types.h
- ../posix/bits/types.h
- ../sysdeps/mach/hurd/bits/timesize.h
- ../sysdeps/mach/hurd/bits/typesizes.h
- ../bits/time64.h
- ../bits/wchar.h
- ../bits/stdint-intn.h
- ../bits/stdint-uintn.h
mach/mig_errors.h
device/device_types.h
- mach/std_types.h
Do not edit this file; edit errnos.awk and regenerate it. */
#ifndef _BITS_ERRNO_H
for (i = 1; i < ARGC; i++)
{
arg = ARGV[i];
- sub(/.*(manual|include)\//, "", arg);
+ sub(/.*(manual|include|-gnu)\//, "", arg);
if (arg ~ /.*errnos.d/) continue;
- # Those not not actually define anything for errno.h
- if (arg ~ /mach\/.*\/kern_return.h/) continue;
- if (arg ~ /mach\/.*\/boolean.h/) continue;
- if (arg ~ /mach\/.*\/vm_types.h/) continue;
print " " arg;
}
print " Do not edit this file; edit errnos.awk and regenerate it. */";