From: "Theodore Ts'o" <tytso@mit.edu>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Olaf Weber <olaf@sgi.com>,
Gabriel Krisman Bertazi <krisman@collabora.co.uk>,
Gabriel Krisman Bertazi <krisman@collabora.com>,
linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Michal Marek <michal.lkml@markovi.net>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2] unicode: refactor the rule for regenerating utf8data.h
Date: Tue, 30 Apr 2019 22:59:30 -0400 [thread overview]
Message-ID: <20190501025930.GB5377@mit.edu> (raw)
In-Reply-To: <1556507731-830-1-git-send-email-yamada.masahiro@socionext.com>
On Mon, Apr 29, 2019 at 12:15:31PM +0900, Masahiro Yamada wrote:
> scripts/mkutf8data is used only when regenerating utf8data.h,
> which never happens in the normal kernel build. However, it is
> irrespectively built if CONFIG_UNICODE is enabled.
>
> Moreover, there is no good reason for it to reside in the scripts/
> directory since it is only used in fs/unicode/.
>
> Hence, move it from scripts/ to fs/unicode/.
>
> In some cases, we bypass build artifacts in the normal build. The
> conventional way to do so is to surround the code with ifdef REGENERATE_*.
>
> For example,
>
> - 7373f4f83c71 ("kbuild: add implicit rules for parser generation")
> - 6aaf49b495b4 ("crypto: arm,arm64 - Fix random regeneration of S_shipped")
>
> I rewrote the rule in a more kbuild'ish style.
>
> In the normal build, utf8data.h is just shipped from the check-in file.
>
> $ make
> [ snip ]
> SHIPPED fs/unicode/utf8data.h
> CC fs/unicode/utf8-norm.o
> CC fs/unicode/utf8-core.o
> CC fs/unicode/utf8-selftest.o
> AR fs/unicode/built-in.a
>
> If you want to generate utf8data.h based on UCD, put *.txt files into
> fs/unicode/, then pass REGENERATE_UTF8DATA=1 from the command line.
> The mkutf8data tool will be automatically compiled to generate the
> utf8data.h from the *.txt files.
>
> $ make REGENERATE_UTF8DATA=1
> [ snip ]
> HOSTCC fs/unicode/mkutf8data
> GEN fs/unicode/utf8data.h
> CC fs/unicode/utf8-norm.o
> CC fs/unicode/utf8-core.o
> CC fs/unicode/utf8-selftest.o
> AR fs/unicode/built-in.a
>
> I renamed the check-in utf8data.h to utf8data.h_shipped so that this
> will work for the out-of-tree build.
>
> You can update it based on the latest UCD like this:
>
> $ make REGENERATE_UTF8DATA=1 fs/unicode/
> $ cp fs/unicode/utf8data.h fs/unicode/utf8data.h_shipped
>
> Also, I added entries to .gitignore and dontdiff.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> Changes in v2:
> - Make this work correctly with O= option
Thanks, I've updated my tree to use this version of the commit.
- Ted
prev parent reply other threads:[~2019-05-01 3:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 3:15 [PATCH v2] unicode: refactor the rule for regenerating utf8data.h Masahiro Yamada
2019-05-01 2:59 ` Theodore Ts'o [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190501025930.GB5377@mit.edu \
--to=tytso@mit.edu \
--cc=corbet@lwn.net \
--cc=krisman@collabora.co.uk \
--cc=krisman@collabora.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=olaf@sgi.com \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).