[PATCH] newlib: powerpc: switch to Automake conditionals

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.