Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-02-19 08:22:14 +0300
committerMike Frysinger <vapier@gentoo.org>2022-03-01 03:03:57 +0300
commitec5ea6efaebae94f0b37d88b6f1cdc5d24ef878a (patch)
treefa0866f3a39045db3a714a06aec7d04348836678 /newlib/Makefile.am
parent95a28b1f9ed78a873b4bc30e1ffc39ddb23a13a3 (diff)
newlib: simplify header setup rules
Since POSIX cp requires copying a file to a directory without having to specify the name explicitly, rely on that to avoid calling basename on every source file. We can also drop the stub `true` call if the -f test failed. The use of `if` already takes care of that in POSIX shell.
Diffstat (limited to 'newlib/Makefile.am')
-rw-r--r--newlib/Makefile.am36
1 files changed, 15 insertions, 21 deletions
diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index ad69e95fb..6ee0adf04 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -211,39 +211,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 \
@@ -258,27 +252,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