-#! /bin/bash
-# Copyright (C) 2005,2007,2009,2011 Free Software Foundation, Inc.
+#!/bin/bash
+# Copyright (C) 2005-2017 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# To avoid long paths.
cd "$objpfx"
+# OK if *.os is missing.
+shopt -s nullglob
+
# Search all dependency files for file names in the include directory.
# There are a few system headers we are known to use.
+# These include Linux kernel headers (asm*, arch, and linux),
+# and Mach kernel headers (mach).
exec ${AWK} -v includedir="$includedir" '
BEGIN {
status = 0
exclude = "^" includedir \
- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
+ "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|cthreads\\.h|gd|nss3/|nspr4?/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{