Re: [PATCH] unicode: refactor the rule for regenerating utf8data.h

From: Theodore Ts'o
Date: Sun Apr 28 2019 - 13:44:07 EST


Thanks, for the suggestion and the patch! I agree it's much better
with your proposed change (and it gets mkutf8data out of your hair :-)

I did need to make one change to your patch in order for it to work
correctly with a build directory. That is, to support

make -O /build/ext4 REGENERATE_UTF8DATA=1 fs/unicode/

I'll apply it to the ext4 git tree with this change.

- Ted

diff --git a/fs/unicode/Makefile b/fs/unicode/Makefile
index 1a109b7a1da9..45955264ac04 100644
--- a/fs/unicode/Makefile
+++ b/fs/unicode/Makefile
@@ -14,13 +14,13 @@ $(obj)/utf8-norm.o: $(obj)/utf8data.h

quiet_cmd_utf8data = GEN $@
cmd_utf8data = $(obj)/mkutf8data \
- -a $(src)/DerivedAge.txt \
- -c $(src)/DerivedCombiningClass.txt \
- -p $(src)/DerivedCoreProperties.txt \
- -d $(src)/UnicodeData.txt \
- -f $(src)/CaseFolding.txt \
- -n $(src)/NormalizationCorrections.txt \
- -t $(src)/NormalizationTest.txt \
+ -a $(srctree)/$(src)/DerivedAge.txt \
+ -c $(srctree)/$(src)/DerivedCombiningClass.txt \
+ -p $(srctree)/$(src)/DerivedCoreProperties.txt \
+ -d $(srctree)/$(src)/UnicodeData.txt \
+ -f $(srctree)/$(src)/CaseFolding.txt \
+ -n $(srctree)/$(src)/NormalizationCorrections.txt \
+ -t $(srctree)/$(src)/NormalizationTest.txt \
-o $@

$(obj)/utf8data.h: $(filter %.txt, $(cmd_utf8data)) $(obj)/mkutf8data FORCE