public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] newlib: powerpc: switch to Automake conditionals
@ 2022-02-18  1:45 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2022-02-18  1:45 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=48942fe31a0622bb2b4b5b7cebbf9af2bd53430f

commit 48942fe31a0622bb2b4b5b7cebbf9af2bd53430f
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Mon Feb 14 21:37:38 2022 -0500

    newlib: powerpc: switch to Automake conditionals
    
    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.

Diff:
---
 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 eebe640de..650d889a6 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
diff --git a/newlib/libc/machine/powerpc/Makefile.in b/newlib/libc/machine/powerpc/Makefile.in
index 261c1e874..42c0d63bd 100644
--- a/newlib/libc/machine/powerpc/Makefile.in
+++ b/newlib/libc/machine/powerpc/Makefile.in
@@ -89,33 +89,33 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 @HAVE_POWERPC_ALTIVEC_TRUE@am__append_1 = \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vfprintf.o \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vfscanf.o \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_malloc.o \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_calloc.o \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_free.o \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_realloc.o \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_mallocr.o \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_callocr.o \
-@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_reallocr.o
+@HAVE_POWERPC_ALTIVEC_TRUE@	vfprintf.c \
+@HAVE_POWERPC_ALTIVEC_TRUE@	vfscanf.c \
+@HAVE_POWERPC_ALTIVEC_TRUE@	vec_malloc.c \
+@HAVE_POWERPC_ALTIVEC_TRUE@	vec_calloc.c \
+@HAVE_POWERPC_ALTIVEC_TRUE@	vec_free.c \
+@HAVE_POWERPC_ALTIVEC_TRUE@	vec_realloc.c \
+@HAVE_POWERPC_ALTIVEC_TRUE@	vec_mallocr.c \
+@HAVE_POWERPC_ALTIVEC_TRUE@	vec_callocr.c \
+@HAVE_POWERPC_ALTIVEC_TRUE@	vec_reallocr.c
 
 @HAVE_POWERPC_SPE_TRUE@am__append_2 = \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-atosfix16.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-atosfix32.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-atosfix64.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-atoufix16.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-atoufix32.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-atoufix64.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-simdldtoa.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-strtosfix16.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-strtosfix32.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-strtosfix64.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-strtoufix16.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-strtoufix32.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-strtoufix64.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-ufix64toa.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-vfprintf.o \
-@HAVE_POWERPC_SPE_TRUE@	lib_a-vfscanf.o
+@HAVE_POWERPC_SPE_TRUE@	atosfix16.c \
+@HAVE_POWERPC_SPE_TRUE@	atosfix32.c \
+@HAVE_POWERPC_SPE_TRUE@	atosfix64.c \
+@HAVE_POWERPC_SPE_TRUE@	atoufix16.c \
+@HAVE_POWERPC_SPE_TRUE@	atoufix32.c \
+@HAVE_POWERPC_SPE_TRUE@	atoufix64.c \
+@HAVE_POWERPC_SPE_TRUE@	simdldtoa.c \
+@HAVE_POWERPC_SPE_TRUE@	strtosfix16.c \
+@HAVE_POWERPC_SPE_TRUE@	strtosfix32.c \
+@HAVE_POWERPC_SPE_TRUE@	strtosfix64.c \
+@HAVE_POWERPC_SPE_TRUE@	strtoufix16.c \
+@HAVE_POWERPC_SPE_TRUE@	strtoufix32.c \
+@HAVE_POWERPC_SPE_TRUE@	strtoufix64.c \
+@HAVE_POWERPC_SPE_TRUE@	ufix64toa.c \
+@HAVE_POWERPC_SPE_TRUE@	vfprintf.c \
+@HAVE_POWERPC_SPE_TRUE@	vfscanf.c
 
 subdir = machine/powerpc
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -141,7 +141,33 @@ am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
 am__v_AR_0 = @echo "  AR      " $@;
 am__v_AR_1 = 
 lib_a_AR = $(AR) $(ARFLAGS)
-am_lib_a_OBJECTS = setjmp.$(OBJEXT)
+lib_a_LIBADD =
+@HAVE_POWERPC_ALTIVEC_TRUE@am__objects_1 = lib_a-vfprintf.$(OBJEXT) \
+@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vfscanf.$(OBJEXT) \
+@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_malloc.$(OBJEXT) \
+@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_calloc.$(OBJEXT) \
+@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_free.$(OBJEXT) \
+@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_realloc.$(OBJEXT) \
+@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_mallocr.$(OBJEXT) \
+@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_callocr.$(OBJEXT) \
+@HAVE_POWERPC_ALTIVEC_TRUE@	lib_a-vec_reallocr.$(OBJEXT)
+@HAVE_POWERPC_SPE_TRUE@am__objects_2 = lib_a-atosfix16.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-atosfix32.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-atosfix64.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-atoufix16.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-atoufix32.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-atoufix64.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-simdldtoa.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-strtosfix16.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-strtosfix32.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-strtosfix64.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-strtoufix16.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-strtoufix32.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-strtoufix64.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-ufix64toa.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-vfprintf.$(OBJEXT) \
+@HAVE_POWERPC_SPE_TRUE@	lib_a-vfscanf.$(OBJEXT)
+am_lib_a_OBJECTS = setjmp.$(OBJEXT) $(am__objects_1) $(am__objects_2)
 lib_a_OBJECTS = $(am_lib_a_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -180,7 +206,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(lib_a_SOURCES) $(EXTRA_lib_a_SOURCES)
+SOURCES = $(lib_a_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -327,17 +353,8 @@ AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(TARGET_CFLAGS)
 AM_CCASFLAGS = $(AM_CPPFLAGS)
 noinst_LIBRARIES = lib.a
 AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
-lib_a_SOURCES = setjmp.S
+lib_a_SOURCES = setjmp.S $(am__append_1) $(am__append_2)
 lib_a_CFLAGS = $(AM_CFLAGS)
-lib_a_LIBADD = $(am__append_1) $(am__append_2)
-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
-
 all: all-am
 
 .SUFFIXES:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-18  1:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18  1:45 [newlib-cygwin] newlib: powerpc: switch to Automake conditionals Michael Frysinger

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).