[PATCH] implicit Unicode data tables generation
Corinna Vinschen
vinschen@redhat.com
Mon Mar 12 13:35:00 GMT 2018
On Mar 9 08:46, Thomas Wolff wrote:
> diff --git a/newlib/libc/ctype/Makefile.am b/newlib/libc/ctype/Makefile.am
> index fa6a70d..714b333 100644
> --- a/newlib/libc/ctype/Makefile.am
> +++ b/newlib/libc/ctype/Makefile.am
> @@ -135,3 +135,23 @@ CHEWOUT_FILES= \
> CHAPTERS = ctype.tex
>
> $(lpfx)ctype_.$(oext): ctype_.c ctype_iso.h ctype_cp.h
> +
> +#############################################################################
> +# Unicode data
> +
> +$(srcdir)/%.txt:
> + cd $(srcdir); test -r $(notdir $@) || ln -s /usr/share/unicode/ucd/$(notdir $@) .
This is a no-no. Do not create links into the OS tree. You don't
even know if the file exists.
> +$(srcdir)/categories.t: $(srcdir)/UnicodeData.txt
> + cd $(srcdir); sh ./mkcategories
> +
> +$(srcdir)/caseconv.t: $(srcdir)/UnicodeData.txt
> + cd $(srcdir); sh ./mkcaseconv
> +
Consequently, these rules are broken. Consider that somebody might
build from git without manually installing UnicodeData.txt. In that
case the above rules lead to a build error, along the lines of
UnicodeData.txt not found
Error 1
...
It would be helpful to create rules which just skip the dependency
if UnicodeData.txt doesn't exist in the source tree. Unfortunately,
the only way to do that off the top of my head is to make the *.t files
depend on a phony target which then does everything in shell. Better
ideas highly appreciated.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20180312/1979ef83/attachment.sig>
More information about the Newlib
mailing list