* [PATCH] newlib: powerpc: switch to Automake conditionals
@ 2022-02-17 4:43 Mike Frysinger
2022-02-17 14:06 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2022-02-17 4:43 UTC (permalink / raw)
To: newlib
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] newlib: powerpc: switch to Automake conditionals
2022-02-17 4:43 [PATCH] newlib: powerpc: switch to Automake conditionals Mike Frysinger
@ 2022-02-17 14:06 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2022-02-17 14:06 UTC (permalink / raw)
To: newlib
On Feb 16 23:43, Mike Frysinger wrote:
> 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(-)
ACK,
Corinna
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-17 14:06 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:43 [PATCH] newlib: powerpc: switch to Automake conditionals Mike Frysinger
2022-02-17 14:06 ` 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).