[PATCH] implicit Unicode data tables generation
Yaakov Selkowitz
yselkowitz@cygwin.com
Mon Mar 12 13:41:00 GMT 2018
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.
--
Yaakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20180312/9bdaddb5/attachment.sig>
More information about the Newlib
mailing list