This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 01/25] Move most headers installed by top-level Makefile to misc/.
- From: Zack Weinberg <zackw at panix dot com>
- To: libc-alpha at sourceware dot org
- Cc: joseph at codesourcery dot com, carlos at redhat dot com
- Date: Wed, 26 Jun 2019 13:49:46 -0400
- Subject: [PATCH 01/25] Move most headers installed by top-level Makefile to misc/.
- References: <20190626174954.8009-1-zackw@panix.com>
The Makefile glue to run tests on installed headers is currently
duplicated between the top-level Makefile and Rules, because the
top-level Makefile doesn't read Rules but does install some headers.
This patch moves most of the headers installed by the top-level Makefile
to misc/ (chosen arbitrarily; I'm open to putting them somewhere else
if reviewers feel it would be better) and removes the duplicated logic
from the top-level Makefile. I believe this also means that none of
the headers in include/ are installed headers anymore.
gnu/lib-names*.h are still generated by code in Makerules and installed
by the top-level Makefile. I tried to move them to misc/ as well, but
that broke the generation process in a manner that didn't make any sense
so I gave up. The tests performed on installed headers are not
especially useful for gnu/lib-names*.h so I think we can live with this
for now.
* include/bits/xopen_lim.h
* include/features.h
* include/gnu-versions.h
* include/gnu/libc-version.h
* include/limits.h
* include/stdc-predef.h
* include/values.h:
Move to misc/ and replace with a trivial wrapper.
* Makefile (headers): Remove all headers moved to misc/.
Don't set a vpath for %.h.
(check-installed-headers-c.out, check-installed-headers-cxx.out)
(check-wrapper-headers.out): Remove rules.
* misc/Makefile (headers): Add all of the above headers and
sort the list.
* sysdeps/mach/hurd/bits/errno.h: Regenerate.
---
Makefile | 38 +--
include/bits/xopen_lim.h | 149 +--------
include/features.h | 478 +--------------------------
include/gnu-versions.h | 53 +--
include/gnu/libc-version.h | 35 +-
include/limits.h | 193 +----------
include/stdc-predef.h | 61 +---
include/values.h | 69 +---
misc/Makefile | 31 +-
{include => misc}/bits/xopen_lim.h | 0
{include => misc}/features.h | 0
{include => misc}/gnu-versions.h | 0
{include => misc}/gnu/libc-version.h | 0
{include => misc}/limits.h | 0
{include => misc}/stdc-predef.h | 0
{include => misc}/values.h | 0
sysdeps/mach/hurd/bits/errno.h | 1 +
17 files changed, 26 insertions(+), 1082 deletions(-)
rewrite include/bits/xopen_lim.h (100%)
rewrite include/features.h (100%)
rewrite include/gnu-versions.h (100%)
rewrite include/gnu/libc-version.h (100%)
rewrite include/limits.h (100%)
rewrite include/stdc-predef.h (100%)
rewrite include/values.h (100%)
copy {include => misc}/bits/xopen_lim.h (100%)
copy {include => misc}/features.h (100%)
copy {include => misc}/gnu-versions.h (100%)
copy {include => misc}/gnu/libc-version.h (100%)
copy {include => misc}/limits.h (100%)
copy {include => misc}/stdc-predef.h (100%)
copy {include => misc}/values.h (100%)
diff --git a/Makefile b/Makefile
index dc5de7aa6b..d34aa8bc97 100644
--- a/Makefile
+++ b/Makefile
@@ -59,17 +59,11 @@ endif # $(AUTOCONF) = no
subdir_objs subdir_stubs subdir_testclean \
$(addprefix install-, no-libc.a bin lib data headers others)
-headers := limits.h values.h features.h gnu-versions.h \
- bits/xopen_lim.h gnu/libc-version.h stdc-predef.h \
- bits/libc-header-start.h
+headers :=
echo-headers: subdir_echo-headers
-# The headers are in the include directory.
-subdir-dirs = include
-vpath %.h $(subdir-dirs)
-
-# What to install.
+# This header is created during the install process. See below.
install-others = $(inst_includedir)/gnu/stubs.h
install-bin-script =
@@ -311,34 +305,6 @@ $(objpfx)check-local-headers.out: scripts/check-local-headers.sh
"$(includedir)" "$(objpfx)" < /dev/null > $@; \
$(evaluate-test)
-ifneq "$(headers)" ""
-# Special test of all the installed headers in this directory.
-tests-special += $(objpfx)check-installed-headers-c.out
-libof-check-installed-headers-c := testsuite
-$(objpfx)check-installed-headers-c.out: \
- scripts/check-installed-headers.sh $(headers)
- $(SHELL) $(..)scripts/check-installed-headers.sh c \
- "$(CC) $(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
- $(headers) > $@; \
- $(evaluate-test)
-
-ifneq "$(CXX)" ""
-tests-special += $(objpfx)check-installed-headers-cxx.out
-libof-check-installed-headers-cxx := testsuite
-$(objpfx)check-installed-headers-cxx.out: \
- scripts/check-installed-headers.sh $(headers)
- $(SHELL) $(..)scripts/check-installed-headers.sh c++ \
- "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
- $(headers) > $@; \
- $(evaluate-test)
-endif # $(CXX)
-
-tests-special += $(objpfx)check-wrapper-headers.out
-$(objpfx)check-wrapper-headers.out: scripts/check-wrapper-headers.py $(headers)
- $(PYTHON) $< --root=. --subdir=. $(headers) \
- --generated $(common-generated) > $@; $(evaluate-test)
-endif # $(headers)
-
define summarize-tests
@egrep -v '^(PASS|XFAIL):' $(objpfx)$1 || true
@echo "Summary of test results$2:"
diff --git a/include/bits/xopen_lim.h b/include/bits/xopen_lim.h
dissimilarity index 100%
index b76a94bd14..9c2c1ecf9b 100644
--- a/include/bits/xopen_lim.h
+++ b/include/bits/xopen_lim.h
@@ -?,? +1 @@
+#include <misc/bits/xopen_lim.h>
diff --git a/include/features.h b/include/features.h
dissimilarity index 100%
index e016b3e5c7..504a6848bc 100644
--- a/include/features.h
+++ b/include/features.h
@@ -?,? +1 @@
+#include <misc/features.h>
diff --git a/include/gnu-versions.h b/include/gnu-versions.h
dissimilarity index 100%
index 6db552a700..eafc8c842d 100644
--- a/include/gnu-versions.h
+++ b/include/gnu-versions.h
@@ -?,? +1 @@
+#include <misc/gnu-versions.h>
diff --git a/include/gnu/libc-version.h b/include/gnu/libc-version.h
dissimilarity index 100%
index 0e2e91b6e6..745fb5bbd2 100644
--- a/include/gnu/libc-version.h
+++ b/include/gnu/libc-version.h
@@ -?,? +1 @@
+#include <misc/gnu/libc-version.h>
diff --git a/include/limits.h b/include/limits.h
dissimilarity index 100%
index 08bb5248be..9eb278c69b 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -?,? +1 @@
+#include <misc/limits.h>
diff --git a/include/stdc-predef.h b/include/stdc-predef.h
dissimilarity index 100%
index 5cc5eef22f..0a8122ae37 100644
--- a/include/stdc-predef.h
+++ b/include/stdc-predef.h
@@ -?,? +1 @@
+#include <misc/stdc-predef.h>
diff --git a/include/values.h b/include/values.h
dissimilarity index 100%
index ae987a5675..56ad18e803 100644
--- a/include/values.h
+++ b/include/values.h
@@ -?,? +1 @@
+#include <misc/values.h>
diff --git a/misc/Makefile b/misc/Makefile
index 032f28fc38..e6c73896cd 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -23,21 +23,22 @@ subdir := misc
include ../Makeconfig
-headers := sys/uio.h bits/uio-ext.h bits/uio_lim.h \
- sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
- sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \
- ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \
- ttyent.h paths.h sys/reboot.h \
- sys/mman.h sys/param.h bits/param.h \
- fstab.h mntent.h search.h err.h error.h \
- sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
- sys/select.h sys/sysinfo.h \
- regexp.h bits/select.h bits/mman.h sys/xattr.h \
- syslog.h sys/syslog.h \
- bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \
- bits/select2.h bits/hwcap.h sys/auxv.h \
- sys/sysmacros.h bits/sysmacros.h bits/types/struct_iovec.h \
- bits/err-ldbl.h bits/error-ldbl.h
+headers := \
+ a.out.h ar.h err.h error.h features.h fstab.h gnu-versions.h \
+ libgen.h limits.h mntent.h paths.h regexp.h search.h sgtty.h \
+ stab.h stdc-predef.h syscall.h sysexits.h syslog.h ttyent.h \
+ values.h \
+ bits/err-ldbl.h bits/error-ldbl.h bits/error.h bits/hwcap.h \
+ bits/ioctl-types.h bits/ioctls.h bits/libc-header-start.h \
+ bits/mman.h bits/param.h bits/select.h bits/select2.h \
+ bits/stab.def bits/syslog-ldbl.h bits/syslog-path.h \
+ bits/syslog.h bits/sysmacros.h bits/types/struct_iovec.h \
+ bits/uio-ext.h bits/uio_lim.h bits/xopen_lim.h \
+ gnu/libc-version.h \
+ sys/auxv.h sys/cdefs.h sys/dir.h sys/file.h sys/ioctl.h \
+ sys/mman.h sys/param.h sys/ptrace.h sys/queue.h sys/reboot.h \
+ sys/select.h sys/swap.h sys/syscall.h sys/sysinfo.h \
+ sys/syslog.h sys/sysmacros.h sys/uio.h sys/xattr.h
routines := brk sbrk sstk ioctl \
readv writev preadv preadv64 pwritev pwritev64 \
diff --git a/include/bits/xopen_lim.h b/misc/bits/xopen_lim.h
similarity index 100%
copy from include/bits/xopen_lim.h
copy to misc/bits/xopen_lim.h
diff --git a/include/features.h b/misc/features.h
similarity index 100%
copy from include/features.h
copy to misc/features.h
diff --git a/include/gnu-versions.h b/misc/gnu-versions.h
similarity index 100%
copy from include/gnu-versions.h
copy to misc/gnu-versions.h
diff --git a/include/gnu/libc-version.h b/misc/gnu/libc-version.h
similarity index 100%
copy from include/gnu/libc-version.h
copy to misc/gnu/libc-version.h
diff --git a/include/limits.h b/misc/limits.h
similarity index 100%
copy from include/limits.h
copy to misc/limits.h
diff --git a/include/stdc-predef.h b/misc/stdc-predef.h
similarity index 100%
copy from include/stdc-predef.h
copy to misc/stdc-predef.h
diff --git a/include/values.h b/misc/values.h
similarity index 100%
copy from include/values.h
copy to misc/values.h
diff --git a/sysdeps/mach/hurd/bits/errno.h b/sysdeps/mach/hurd/bits/errno.h
index 8f2fbfd80f..8e8d1cc468 100644
--- a/sysdeps/mach/hurd/bits/errno.h
+++ b/sysdeps/mach/hurd/bits/errno.h
@@ -1,6 +1,7 @@
/* This file generated by errnos.awk from
errno.texi
stdc-predef.h
+ ../misc/stdc-predef.h
libc-symbols.h
mach/message.h
mach/kern_return.h
--
2.20.1