summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/dontdiff2
-rw-r--r--fs/unicode/.gitignore2
-rw-r--r--fs/unicode/Makefile41
-rw-r--r--fs/unicode/README.utf8data9
-rw-r--r--fs/unicode/mkutf8data.c (renamed from scripts/mkutf8data.c)0
-rw-r--r--fs/unicode/utf8data.h_shipped (renamed from fs/unicode/utf8data.h)0
-rw-r--r--scripts/Makefile1
7 files changed, 38 insertions, 17 deletions
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index ef25a066d952..93693775639f 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -176,6 +176,7 @@ mkprep
mkregtable
mktables
mktree
+mkutf8data
modpost
modules.builtin
modules.order
@@ -254,6 +255,7 @@ vsyscall_32.lds
wanxlfw.inc
uImage
unifdef
+utf8data.h
wakeup.bin
wakeup.elf
wakeup.lds
diff --git a/fs/unicode/.gitignore b/fs/unicode/.gitignore
new file mode 100644
index 000000000000..0381e2221480
--- /dev/null
+++ b/fs/unicode/.gitignore
@@ -0,0 +1,2 @@
+mkutf8data
+utf8data.h
diff --git a/fs/unicode/Makefile b/fs/unicode/Makefile
index 671d31f83006..d46e9baee285 100644
--- a/fs/unicode/Makefile
+++ b/fs/unicode/Makefile
@@ -5,15 +5,34 @@ obj-$(CONFIG_UNICODE_NORMALIZATION_SELFTEST) += utf8-selftest.o
unicode-y := utf8-norm.o utf8-core.o
-# This rule is not invoked during the kernel compilation. It is used to
-# regenerate the utf8data.h header file.
-utf8data.h.new: *.txt $(objdir)/scripts/mkutf8data
- $(objdir)/scripts/mkutf8data \
- -a DerivedAge.txt \
- -c DerivedCombiningClass.txt \
- -p DerivedCoreProperties.txt \
- -d UnicodeData.txt \
- -f CaseFolding.txt \
- -n NormalizationCorrections.txt \
- -t NormalizationTest.txt \
+$(obj)/utf8-norm.o: $(obj)/utf8data.h
+
+# In the normal build, the checked-in utf8data.h is just shipped.
+#
+# To generate utf8data.h from UCD, put *.txt files in this directory
+# and pass REGENERATE_UTF8DATA=1 from the command line.
+ifdef REGENERATE_UTF8DATA
+
+quiet_cmd_utf8data = GEN $@
+ cmd_utf8data = $< \
+ -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: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE
+ $(call if_changed,utf8data)
+
+else
+
+$(obj)/utf8data.h: $(src)/utf8data.h_shipped FORCE
+ $(call if_changed,shipped)
+
+endif
+
+targets += utf8data.h
+hostprogs-y += mkutf8data
diff --git a/fs/unicode/README.utf8data b/fs/unicode/README.utf8data
index dd56ef50c5d5..9307cf0727de 100644
--- a/fs/unicode/README.utf8data
+++ b/fs/unicode/README.utf8data
@@ -55,15 +55,14 @@ released version of the UCD can be found here:
http://www.unicode.org/Public/UCD/latest/
-To build the utf8data.h file, from a kernel tree that has been built,
-cd to this directory (fs/unicode) and run this command:
+Then, build under fs/unicode/ with REGENERATE_UTF8DATA=1:
- make C=../.. objdir=../.. utf8data.h.new
+ make REGENERATE_UTF8DATA=1 fs/unicode/
-After sanity checking the newly generated utf8data.h.new file (the
+After sanity checking the newly generated utf8data.h file (the
version generated from the 12.1.0 UCD should be 4,109 lines long, and
have a total size of 324k) and/or comparing it with the older version
-of utf8data.h, rename it to utf8data.h.
+of utf8data.h_shipped, rename it to utf8data.h_shipped.
If you are a kernel developer updating to a newer version of the
Unicode Character Database, please update this README.utf8data file
diff --git a/scripts/mkutf8data.c b/fs/unicode/mkutf8data.c
index ff2025ac5a32..ff2025ac5a32 100644
--- a/scripts/mkutf8data.c
+++ b/fs/unicode/mkutf8data.c
diff --git a/fs/unicode/utf8data.h b/fs/unicode/utf8data.h_shipped
index 76e4f0e1b089..76e4f0e1b089 100644
--- a/fs/unicode/utf8data.h
+++ b/fs/unicode/utf8data.h_shipped
diff --git a/scripts/Makefile b/scripts/Makefile
index b87e3e0ade4d..9d442ee050bd 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -20,7 +20,6 @@ hostprogs-$(CONFIG_ASN1) += asn1_compiler
hostprogs-$(CONFIG_MODULE_SIG) += sign-file
hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
-hostprogs-$(CONFIG_UNICODE) += mkutf8data
HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include
HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include