public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH] newlib: libc: reshuffle include order for the manual
Date: Wed, 16 Feb 2022 23:50:28 -0500	[thread overview]
Message-ID: <20220217045028.13862-1-vapier@gentoo.org> (raw)

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


             reply	other threads:[~2022-02-17  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17  4:50 Mike Frysinger [this message]
2022-02-17 14:53 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220217045028.13862-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).