public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] newlib: integrate iconv update to maintainer build
@ 2022-03-14  2:01 Mike Frysinger
  2022-03-16  7:28 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2022-03-14  2:01 UTC (permalink / raw)
  To: newlib

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] newlib: integrate iconv update to maintainer build
  2022-03-14  2:01 [PATCH] newlib: integrate iconv update to maintainer build Mike Frysinger
@ 2022-03-16  7:28 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2022-03-16  7:28 UTC (permalink / raw)
  To: newlib

On Mar 13 22:01, Mike Frysinger wrote:
> 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(-)

LGTM


Thx,
Corinna


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-16  7:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14  2:01 [PATCH] newlib: integrate iconv update to maintainer build Mike Frysinger
2022-03-16  7:28 ` Corinna Vinschen

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