On Sat, Apr 27, 2019 at 3:24 PM Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> 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 > conventianl way to do so is to surround the code with ifdef REGENERATE_*. This is a typo. conventianl -> conventional > 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. > > It works like this: > > $ make REGENERATE_UTF8DATA=1 fs/unicode/ > [ snip ] > HOSTCC fs/unicode/mkutf8data > GEN fs/unicode/utf8data.h > CC fs/unicode/utf8-norm.o > CC fs/unicode/utf8-core.o > AR fs/unicode/built-in.a > > Also, I added utf8data.h to .gitignore and dontdiff. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> > --- -- Best Regards Masahiro Yamada