From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id CCCAD3858D20 for ; Thu, 17 Feb 2022 04:43:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCCAD3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 6FBC0342FFA; Thu, 17 Feb 2022 04:43:48 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH] newlib: powerpc: switch to Automake conditionals Date: Wed, 16 Feb 2022 23:43:45 -0500 Message-Id: <20220217044345.5525-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2022 04:43:50 -0000 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