android_kernel_xiaomi_sm7250/Documentation
Masahiro Yamada 2022b4157d unicode: refactor the rule for regenerating utf8data.h
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,

 - 7373f4f83c ("kbuild: add implicit rules for parser generation")
 - 6aaf49b495 ("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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-09-23 13:23:29 -07:00
..
ABI f2fs: Add option to limit required GC for checkpoint=disable 2019-06-13 20:18:09 -07:00
accelerators
accounting
acpi
admin-guide xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
aoe
arm
arm64 Documentation/arm64/sve: Couple of improvements and typos 2018-08-29 11:33:19 +01:00
auxdisplay
backlight
block
blockdev
bpf
bus-devices
cdrom
cgroup-v1
cma
connector
console
core-api idr: Change documentation license 2018-10-15 16:31:29 -04:00
cpu-freq
cpuidle
crypto
dev-tools
device-mapper dm raid: bump target version, update comments and documentation 2018-09-06 17:07:58 -04:00
devicetree Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2018-09-28 18:04:50 -07:00
doc-guide
driver-api docs: fpga: document fpga manager flags 2018-09-30 08:49:55 -07:00
driver-model
early-userspace
EDID
extcon
fault-injection
fb uvesafb: Fix URLs in the documentation 2018-09-26 18:11:23 +02:00
features
filesystems ext4 crypto: fix to check feature status before get policy 2019-09-23 13:23:27 -07:00
firmware_class
fmc
fpga
gpio
gpu
hid
hwmon hwmon: (ina2xx) fix sysfs shunt resistor read access 2018-08-26 17:45:25 -07:00
i2c i2c: refactor function to release a DMA safe buffer 2018-08-30 23:13:15 +02:00
ia64
ide
iio
infiniband
input
ioctl
isdn
kbuild
kdump
kernel-hacking
laptops
leds
lightnvm
livepatch
locking
m68k
maintainer
md
media media: video_function_calls.rst: drop obsolete video-set-attributes reference 2018-08-29 13:24:30 -04:00
memory-devices
mic
mips
misc-devices
mmc
mtd
namespaces
netlabel
networking net-tcp: /proc/sys/net/ipv4/tcp_probe_interval is a u32 not int 2018-09-26 20:33:21 -07:00
nfc
nios2
nvdimm
nvmem
openrisc
parisc
PCI
pcmcia
perf
phy
platform
power
powerpc
pps
process Code of Conduct: Change the contact email address 2018-10-22 07:33:36 +01:00
pti
ptp
rapidio
RCU
riscv
s390
scheduler
scsi scsi: documentation: add scsi_mod.use_blk_mq to scsi-parameters 2018-08-27 12:26:10 -04:00
security
serial
sh
sound
sparc
sphinx
sphinx-static
spi
sysctl namei: allow restricted O_CREAT of FIFOs and regular files 2018-08-23 18:48:43 -07:00
target
thermal
timers
trace
translations
usb
userspace-api
virtual KVM: x86: Control guest reads of MSR_PLATFORM_INFO 2018-09-20 00:51:46 +02:00
vm
w1
watchdog
wimax
x86 x86/doc: Fix Documentation/x86/earlyprintk.txt 2018-09-10 15:09:30 +02:00
xtensa
.gitignore
00-INDEX
atomic_bitops.txt
atomic_t.txt
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
Changes
clearing-warn-once.txt
CodingStyle
conf.py
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt
DMA-ISA-LPC.txt
docutils.conf
dontdiff unicode: refactor the rule for regenerating utf8data.h 2019-09-23 13:23:29 -07:00
efi-stub.txt
eisa.txt
flexible-arrays.txt
futex-requeue-pi.txt
gcc-plugins.txt
highuid.txt
hw_random.txt
hwspinlock.txt
index.rst
intel_txt.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isa.txt
isapnp.txt
kernel-per-CPU-kthreads.txt
kobject.txt
kprobes.txt
kref.txt
ldm.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lsm.txt
lzo.txt
mailbox.txt
Makefile
memory-barriers.txt
memory-hotplug.txt
men-chameleon-bus.txt
nommu-mmap.txt
ntb.txt
numastat.txt
padata.txt
parport-lowlevel.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
pwm.txt
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rtc.txt
SAK.txt
sgi-ioc4.txt
siphash.txt
SM501.txt
smsc_ece1099.txt
speculation.txt
static-keys.txt
SubmittingPatches
svga.txt
switchtec.txt
sync_file.txt
tee.txt
this_cpu_ops.txt
unaligned-memory-access.txt
vfio-mediated-device.txt
vfio.txt
video-output.txt
xillybus.txt
xz.txt
zorro.txt