public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH] newlib: simplify header setup rules
Date: Thu, 24 Feb 2022 19:27:37 -0500	[thread overview]
Message-ID: <20220225002737.21507-1-vapier@gentoo.org> (raw)

---
 newlib/Makefile.am | 36 +++++++++++++++---------------------
 newlib/Makefile.in | 36 +++++++++++++++---------------------
 2 files changed, 30 insertions(+), 42 deletions(-)

diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index 9d9fd7048493..b5060fc16109 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -214,39 +214,33 @@ stmp-targ-include: config.status
 		targ-include/bits
 	-$(AM_V_at)if [ -n "$(shared_machine_dir)" ]; then \
 	    for i in $(srcdir)/libc/machine/$(shared_machine_dir)/machine/*.h; do \
-		if [ -f $$i ]; then \
-		  cp $$i targ-include/machine/`basename $$i`; \
-		else true; fi ; \
-	      done; \
+		[ -f $$i ] && cp $$i targ-include/machine/; \
+	    done; \
 	    for i in $(srcdir)/libc/machine/$(shared_machine_dir)/sys/*.h; do \
-		if [ -f $$i ]; then \
-		  cp $$i targ-include/sys/`basename $$i`; \
-		else true; fi ; \
-	      done; \
+		[ -f $$i ] && cp $$i targ-include/sys/; \
+	    done; \
 	    for i in $(srcdir)/libc/machine/$(shared_machine_dir)/include/*.h; do \
-		if [ -f $$i ]; then \
-		  cp $$i targ-include/`basename $$i`; \
-		else true; fi ; \
-	      done; \
+		[ -f $$i ] && cp $$i targ-include/; \
+	    done; \
 	  fi
 	-$(AM_V_at)for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/machine/`basename $$i`; \
+	      cp $$i targ-include/machine/; \
 	    else true; fi ; \
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/machine/$(machine_dir)/sys/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/sys/`basename $$i`; \
+	      cp $$i targ-include/sys/; \
 	    else true; fi ; \
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/machine/$(machine_dir)/include/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/`basename $$i`; \
+	      cp $$i targ-include/; \
 	    else true; fi ; \
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/sys/$(sys_dir)/include/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/`basename $$i`; \
+	      cp $$i targ-include/; \
 	    else true; fi ; \
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/sys/$(sys_dir)/include/*; do \
@@ -261,27 +255,27 @@ stmp-targ-include: config.status
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/sys/$(sys_dir)/sys/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/sys/`basename $$i`; \
+	      cp $$i targ-include/sys/; \
 	    else true; fi ; \
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/sys/$(sys_dir)/bits/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/bits/`basename $$i`; \
+	      cp $$i targ-include/bits/; \
 	    else true; fi ; \
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/sys/$(sys_dir)/machine/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/machine/`basename $$i`; \
+	      cp $$i targ-include/machine/; \
 	    else true; fi ; \
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/sys/$(sys_dir)/machine/$(machine_dir)/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/machine/`basename $$i`; \
+	      cp $$i targ-include/machine/; \
 	    else true; fi ; \
 	  done
 	-$(AM_V_at)for i in $(srcdir)/libc/sys/$(sys_dir)/machine/$(machine_dir)/include/*.h; do \
 	    if [ -f $$i ]; then \
-	      cp $$i targ-include/machine/`basename $$i`; \
+	      cp $$i targ-include/machine/; \
 	    else true; fi ; \
 	  done
 	$(AM_V_at)$(MAKE) targ-include/newlib.h
-- 
2.34.1


             reply	other threads:[~2022-02-25  0:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25  0:27 Mike Frysinger [this message]
2022-02-26  4:10 ` [PATCH] newlib: speed up targ-include setup & add error checking Mike Frysinger
2022-02-26  4:50   ` Mike Frysinger
2022-02-28 10:40   ` 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=20220225002737.21507-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).