public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH] newlib: integrate iconv update to maintainer build
Date: Sun, 13 Mar 2022 22:01:40 -0400	[thread overview]
Message-ID: <20220314020140.28934-1-vapier@gentoo.org> (raw)

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


             reply	other threads:[~2022-03-14  2:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14  2:01 Mike Frysinger [this message]
2022-03-16  7:28 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220314020140.28934-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).