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 C71013858D20 for ; Mon, 14 Mar 2022 02:01:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C71013858D20 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 E24B7342FDC; Mon, 14 Mar 2022 02:01:32 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH] newlib: integrate iconv update to maintainer build Date: Sun, 13 Mar 2022 22:01:40 -0400 Message-Id: <20220314020140.28934-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.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, 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: Mon, 14 Mar 2022 02:01:35 -0000 To help prevent people from missing running this script, integrate it into the build via maintainer mode. Also fix the inverted exit status to make this work correctly -- for some reason, it exited 1 when it worked, and 0 when it failed. --- newlib/Makefile.in | 18 +++++++++++++++++- newlib/libc/iconv/Makefile.inc | 18 ++++++++++++++++++ newlib/libc/iconv/ces/mkdeps.pl | 4 ++-- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/newlib/libc/iconv/Makefile.inc b/newlib/libc/iconv/Makefile.inc index 77c0b05991b4..49585c73d9fe 100644 --- a/newlib/libc/iconv/Makefile.inc +++ b/newlib/libc/iconv/Makefile.inc @@ -5,6 +5,24 @@ endif LIBC_CHAPTERS += %D%/iconv.tex +## If mkdeps.pl or encodings.deps changes, make sure to regenerate outputs. +%C%_mkdeps_outputs = \ + $(top_srcdir)/iconv.m4 \ + $(srcdir)/%D%/ccs/ccsbi.c \ + $(srcdir)/%D%/ccs/ccsbi.h \ + $(srcdir)/%D%/ccs/ccsnames.h \ + $(srcdir)/%D%/ces/cesbi.c \ + $(srcdir)/%D%/ces/cesbi.h \ + $(srcdir)/%D%/ces/cesdeps.h \ + $(srcdir)/%D%/encoding.aliases \ + $(srcdir)/%D%/lib/aliasesbi.c \ + $(srcdir)/%D%/lib/encnames.h + +$(%C%_mkdeps_outputs): @MAINTAINER_MODE_TRUE@ $(srcdir)/%D%/ces/mkdeps.pl $(srcdir)/%D%/lib/encoding.deps + $(AM_V_GEN)cd $(srcdir)/%D%/ces && ./mkdeps.pl + +noinst_DATA += $(%C%_mkdeps_outputs) + include %D%/ces/Makefile.inc include %D%/ccs/Makefile.inc include %D%/lib/Makefile.inc diff --git a/newlib/libc/iconv/ces/mkdeps.pl b/newlib/libc/iconv/ces/mkdeps.pl index b279fd4e8c05..649f2c5fe5bb 100755 --- a/newlib/libc/iconv/ces/mkdeps.pl +++ b/newlib/libc/iconv/ces/mkdeps.pl @@ -200,7 +200,7 @@ delete $sections{$section_cesdeps}; print STDERR "Warning: section \"$_\" was ignored!\n" foreach (keys %sections); -exit 1; +exit 0; } # ============================================================================= @@ -213,7 +213,7 @@ exit 1; sub err($) { print STDERR "Error while running script.\n$_[0]\n"; - exit 0; + exit 1; } -- 2.34.1