[PATCH] implicit Unicode data tables generation

Corinna Vinschen vinschen@redhat.com
Mon Mar 12 14:22:00 GMT 2018


On Mar 12 08:41, Yaakov Selkowitz wrote:
> On 2018-03-12 08:35, Corinna Vinschen wrote:
> > 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.
> 
> I think either unicode-ucd is a required build dependency, or otherwise
> these rules would have to be explicit only and keep the generated files
> in git for the benefit of those without it.

A build dependency to unicode-ucd should not be required.  Why not have
automatic build rules which are simply skipped if the file doesn't
exist?  So somebody can download the file and the rules do the rest?
It's not *that* important, but a nice feature.


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/89d1a982/attachment.sig>


More information about the Newlib mailing list