From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH] newlib: powerpc: switch to Automake conditionals
Date: Wed, 16 Feb 2022 23:43:45 -0500 [thread overview]
Message-ID: <20220217044345.5525-1-vapier@gentoo.org> (raw)
Using xxx_LIBADD, xxx_DEPENDENCIES, and EXTRA_xxx_SOURCES is one way of
conditionally including files into a target. But it's meant more for the
cases where the variables added to LIBADD & DEPENDENCIES are constructed
via substitution (e.g. AC_SUBST) or other dynamic methods. With Automake
conditionals, then the much simpler form is to conditionally append to
the xxx_SOURCES variable and let Automake sort everything out.
---
newlib/libc/machine/powerpc/Makefile.am | 62 ++++++++---------
newlib/libc/machine/powerpc/Makefile.in | 91 +++++++++++++++----------
2 files changed, 81 insertions(+), 72 deletions(-)
diff --git a/newlib/libc/machine/powerpc/Makefile.am b/newlib/libc/machine/powerpc/Makefile.am
index eebe640dee84..650d889a6f0c 100644
--- a/newlib/libc/machine/powerpc/Makefile.am
+++ b/newlib/libc/machine/powerpc/Makefile.am
@@ -10,42 +10,34 @@ AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
lib_a_SOURCES = setjmp.S
lib_a_CFLAGS=$(AM_CFLAGS)
-lib_a_LIBADD =
if HAVE_POWERPC_ALTIVEC
-lib_a_LIBADD += \
- lib_a-vfprintf.o \
- lib_a-vfscanf.o \
- lib_a-vec_malloc.o \
- lib_a-vec_calloc.o \
- lib_a-vec_free.o \
- lib_a-vec_realloc.o \
- lib_a-vec_mallocr.o \
- lib_a-vec_callocr.o \
- lib_a-vec_reallocr.o
+lib_a_SOURCES += \
+ vfprintf.c \
+ vfscanf.c \
+ vec_malloc.c \
+ vec_calloc.c \
+ vec_free.c \
+ vec_realloc.c \
+ vec_mallocr.c \
+ vec_callocr.c \
+ vec_reallocr.c
endif
if HAVE_POWERPC_SPE
-lib_a_LIBADD += \
- lib_a-atosfix16.o \
- lib_a-atosfix32.o \
- lib_a-atosfix64.o \
- lib_a-atoufix16.o \
- lib_a-atoufix32.o \
- lib_a-atoufix64.o \
- lib_a-simdldtoa.o \
- lib_a-strtosfix16.o \
- lib_a-strtosfix32.o \
- lib_a-strtosfix64.o \
- lib_a-strtoufix16.o \
- lib_a-strtoufix32.o \
- lib_a-strtoufix64.o \
- lib_a-ufix64toa.o \
- lib_a-vfprintf.o \
- lib_a-vfscanf.o
+lib_a_SOURCES += \
+ atosfix16.c \
+ atosfix32.c \
+ atosfix64.c \
+ atoufix16.c \
+ atoufix32.c \
+ atoufix64.c \
+ simdldtoa.c \
+ strtosfix16.c \
+ strtosfix32.c \
+ strtosfix64.c \
+ strtoufix16.c \
+ strtoufix32.c \
+ strtoufix64.c \
+ ufix64toa.c \
+ vfprintf.c \
+ vfscanf.c
endif
-lib_a_DEPENDENCIES = $(lib_a_LIBADD)
-EXTRA_lib_a_SOURCES = \
- vfprintf.c vfscanf.c \
- vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c vec_callocr.c vec_reallocr.c \
- atosfix16.c atosfix32.c atosfix64.c atoufix16.c atoufix32.c atoufix64.c \
- simdldtoa.c strtosfix16.c strtosfix32.c strtosfix64.c strtoufix16.c \
- strtoufix32.c strtoufix64.c ufix64toa.c
--
2.34.1
next reply other threads:[~2022-02-17 4:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 4:43 Mike Frysinger [this message]
2022-02-17 14:06 ` 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=20220217044345.5525-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).