This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] implicit Unicode data tables generation


Am 13.03.2018 um 16:43 schrieb Corinna Vinschen:
On Mar 13 14:56, Thomas Wolff wrote:
On 13.03.2018 11:46, Corinna Vinschen wrote:
On Mar 12 20:32, Thomas Wolff wrote:
Am 12.03.2018 um 15:21 schrieb Corinna Vinschen:
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.
The easiest way would be that the mkunidata scripts just ignore the missing
files, like in the patch attached.
On the other hand, in my original scripts I had the additional fallback
option to download them from unicode.org on demand.
If that's acceptable in a build process, I could add that back in.
Or just drop those rules and stay explicit?
Implicit would be nice, it's not actually a hard requirement.

We must not rely on system-installed files outside the source tree,
build tree or outside the toolchain.
That's why my patch yesterday would ignore missing of the files.
Please provide a patch removing any ln to files under /usr/share, etc.
...
...
You can also never make assumptions about the age of a file provided by
your build OS.  There's a good chance the OS is providing an older
Unicode data file version than the one you actually want to build the
dependent files from.  Worst case, older than the currently supported
Unicode version.

The bottom line is, the Unicode data file has been either downloaded into
the expected location in libc/ctype, or it's not available.

The explicit rules add a rule to download the Unicode.txt file into the
src tree.  That's the only file we may rely on.  If it doesn't exist,
an implicit rule should not break the build.
Well, my mentioned patch wouldn't break it anymore.
Actually it was broken and would still abort if unicode-ucd isn't installed.
And the contributed version of string/mkunidata is broken, too; it does nothing because it contains an "exit" as a test artefact.
Sorry for this embarassing incident.

I can tweak the script further to your preference, ...
The attached patch should be sufficient for various requirements. See extended commit description.
Thomas

Attachment: 0001-fix-enhance-Unicode-table-generation-scripts.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]