* [PATCH] newlib: libc: reshuffle include order for the manual
@ 2022-02-17 4:50 Mike Frysinger
2022-02-17 14:53 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2022-02-17 4:50 UTC (permalink / raw)
To: newlib
When migrating the manual to the top-level, the include order was
sorted by name of the subdir. But this changed the chapter order
of the manual in the process. Change the sorting back to match
existing chapters and update the comments to explain.
---
newlib/Makefile.in | 181 +++++++++++++++---------------
newlib/libc/Makefile.am | 4 +-
newlib/libc/Makefile.in | 5 +-
newlib/libc/Makefile.inc | 29 +++--
newlib/libc/argz/Makefile.inc | 0
newlib/libc/errno/Makefile.inc | 0
newlib/libc/machine/Makefile.inc | 0
newlib/libc/sys/Makefile.inc | 0
newlib/libc/syscalls/Makefile.inc | 0
newlib/libc/unix/Makefile.inc | 0
newlib/libc/xdr/Makefile.inc | 0
11 files changed, 115 insertions(+), 104 deletions(-)
create mode 100644 newlib/libc/argz/Makefile.inc
create mode 100644 newlib/libc/errno/Makefile.inc
create mode 100644 newlib/libc/machine/Makefile.inc
create mode 100644 newlib/libc/sys/Makefile.inc
create mode 100644 newlib/libc/syscalls/Makefile.inc
create mode 100644 newlib/libc/unix/Makefile.inc
create mode 100644 newlib/libc/xdr/Makefile.inc
diff --git a/newlib/libc/Makefile.am b/newlib/libc/Makefile.am
index 4534ea4ee0d0..60dcf8b2f355 100644
--- a/newlib/libc/Makefile.am
+++ b/newlib/libc/Makefile.am
@@ -36,14 +36,14 @@ if HAVE_XDR_DIR
XDR_SUBDIR = xdr
endif
-# The order of SUBDIRS is important for the integrated documentation.
-# Do not change the order without considering the doc impact.
SUBDIRS = argz stdlib ctype search $(STDIO_SUBDIR) $(STDIO64_SUBDIR) string $(SIGNAL_SUBDIR) time locale reent \
errno misc $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) $(NEWLIB_ICONV_DIRS) \
$(XDR_SUBDIR) ssp
if HAVE_SYS_DIR
SUBDIRS += $(SYS_DIR)
endif
+# NB: Machine dir must come last so it can override common objects when creating
+# libc.a below.
if HAVE_LIBC_MACHINE_DIR
SUBDIRS += $(LIBC_MACHINE_DIR)
endif
diff --git a/newlib/libc/Makefile.inc b/newlib/libc/Makefile.inc
index f30ced867eec..a26085883e9e 100644
--- a/newlib/libc/Makefile.inc
+++ b/newlib/libc/Makefile.inc
@@ -34,20 +34,31 @@ man: %C%_man
$(INSTALL_DATA) %D%/*.3 $(DESTDIR)$(mandir)/man3/
install-man: %C%_install-man
+## The order of includes is important for two reasons:
+## * The integrated documentation (chapter ordering).
+## * Object overridding -- machine dir must come last.
+## Do not change the order without considering the doc impact.
+include %D%/argz/Makefile.inc
+include %D%/stdlib/Makefile.inc
include %D%/ctype/Makefile.inc
-include %D%/iconv/Makefile.inc
-include %D%/locale/Makefile.inc
-include %D%/misc/Makefile.inc
-include %D%/posix/Makefile.inc
-include %D%/reent/Makefile.inc
include %D%/search/Makefile.inc
-include %D%/signal/Makefile.inc
-include %D%/ssp/Makefile.inc
-include %D%/stdio64/Makefile.inc
include %D%/stdio/Makefile.inc
-include %D%/stdlib/Makefile.inc
+include %D%/stdio64/Makefile.inc
include %D%/string/Makefile.inc
+include %D%/signal/Makefile.inc
include %D%/time/Makefile.inc
+include %D%/locale/Makefile.inc
+include %D%/reent/Makefile.inc
+include %D%/errno/Makefile.inc
+include %D%/misc/Makefile.inc
+include %D%/unix/Makefile.inc
+include %D%/posix/Makefile.inc
+include %D%/syscalls/Makefile.inc
+include %D%/iconv/Makefile.inc
+include %D%/xdr/Makefile.inc
+include %D%/ssp/Makefile.inc
+include %D%/sys/Makefile.inc
+include %D%/machine/Makefile.inc
CLEANFILES += \
%D%/targetdep.tex \
diff --git a/newlib/libc/argz/Makefile.inc b/newlib/libc/argz/Makefile.inc
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/newlib/libc/errno/Makefile.inc b/newlib/libc/errno/Makefile.inc
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/newlib/libc/machine/Makefile.inc b/newlib/libc/machine/Makefile.inc
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/newlib/libc/sys/Makefile.inc b/newlib/libc/sys/Makefile.inc
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/newlib/libc/syscalls/Makefile.inc b/newlib/libc/syscalls/Makefile.inc
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/newlib/libc/unix/Makefile.inc b/newlib/libc/unix/Makefile.inc
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/newlib/libc/xdr/Makefile.inc b/newlib/libc/xdr/Makefile.inc
new file mode 100644
index 000000000000..e69de29bb2d1
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] newlib: libc: reshuffle include order for the manual
2022-02-17 4:50 [PATCH] newlib: libc: reshuffle include order for the manual Mike Frysinger
@ 2022-02-17 14:53 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2022-02-17 14:53 UTC (permalink / raw)
To: newlib
On Feb 16 23:50, Mike Frysinger wrote:
> When migrating the manual to the top-level, the include order was
> sorted by name of the subdir. But this changed the chapter order
> of the manual in the process. Change the sorting back to match
> existing chapters and update the comments to explain.
> ---
> newlib/Makefile.in | 181 +++++++++++++++---------------
> newlib/libc/Makefile.am | 4 +-
> newlib/libc/Makefile.in | 5 +-
> newlib/libc/Makefile.inc | 29 +++--
> newlib/libc/argz/Makefile.inc | 0
> newlib/libc/errno/Makefile.inc | 0
> newlib/libc/machine/Makefile.inc | 0
> newlib/libc/sys/Makefile.inc | 0
> newlib/libc/syscalls/Makefile.inc | 0
> newlib/libc/unix/Makefile.inc | 0
> newlib/libc/xdr/Makefile.inc | 0
> 11 files changed, 115 insertions(+), 104 deletions(-)
> create mode 100644 newlib/libc/argz/Makefile.inc
> create mode 100644 newlib/libc/errno/Makefile.inc
> create mode 100644 newlib/libc/machine/Makefile.inc
> create mode 100644 newlib/libc/sys/Makefile.inc
> create mode 100644 newlib/libc/syscalls/Makefile.inc
> create mode 100644 newlib/libc/unix/Makefile.inc
> create mode 100644 newlib/libc/xdr/Makefile.inc
LGTM
Thx,
Corinna
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-17 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-17 4:50 [PATCH] newlib: libc: reshuffle include order for the manual Mike Frysinger
2022-02-17 14:53 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).