3 # Copyright (C) 2012-2024 Free Software Foundation, Inc.
5 # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
6 # National Institute of Advanced Industrial Science and Technology (AIST)
7 # Registration Number H13PRO009
9 # This file is part of GNU Emacs.
11 # GNU Emacs is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
16 # GNU Emacs is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
29 top_srcdir
= @top_srcdir@
30 top_builddir
= @top_builddir@
32 # Prevent any settings in the user environment causing problems.
33 unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
35 EMACS
= ${top_builddir}/src
/emacs
36 unidir
= ${top_srcdir}/lisp
/international
37 emacs
= "${EMACS}" -batch
--no-site-file
--no-site-lisp
40 unifiles
= $(addprefix ${unidir}/,$(sort $(shell sed
-n
's/^[ \t][ \t]*${lparen}"\(uni-[^"]*\)"$$/\1/p' ${srcdir}/unidata-gen.el
)))
42 -include ${top_builddir}/src
/verbose.mk
46 all: ${top_srcdir}/src
/macuvs.h
${unifiles} ${unidir}/charscript.el \
47 ${unidir}/charprop.el
${unidir}/emoji-zwj.el
${unidir}/emoji-labels.el \
48 ${unidir}/uni-scripts.el
${unidir}/uni-confusable.el \
49 ${unidir}/idna-mapping.el
51 ## Specify .elc as an order-only prereq so as to not needlessly rebuild
52 ## target just because the .elc is missing.
53 ## Same with charprop.el below.
54 ${top_srcdir}/src
/macuvs.h
: ${srcdir}/uvs.el
${srcdir}/IVD_Sequences.txt | \
56 $(AM_V_GEN
)${emacs} -L
${srcdir} -l uvs \
57 --eval
'(uvs-print-table-ivd (unmsys--file-name "${srcdir}/IVD_Sequences.txt") "Adobe-Japan1")' \
61 $(AM_V_ELC
)${emacs} -f batch-byte-compile
$<
63 unidata.txt
: ${srcdir}/UnicodeData.txt
64 $(AM_V_GEN
)sed
-e
's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e
's/;/" "/g' \
67 ## charprop doesn't actually depend on unifiles, but for now at least
68 ## pretend that it does since other Makefiles assume that if charprop
69 ## is up-to-date, the unifiles are too.
70 ${unidir}/charprop.el
: ${unifiles} ${srcdir}/unidata-gen.el |
${srcdir}/unidata-gen.elc
71 $(AM_V_GEN
)[ ! -f
$@
] || chmod
+w
$@
72 $(AM_V_at
)${emacs} -L
${srcdir} -l unidata-gen \
73 -f unidata-gen-charprop
$@
75 ${unifiles}: ${srcdir}/unidata-gen.el \
76 ${srcdir}/UnicodeData.txt
${srcdir}/BidiMirroring.txt \
77 ${srcdir}/BidiBrackets.txt | \
78 ${srcdir}/unidata-gen.elc unidata.txt
79 $(AM_V_GEN
)[ ! -f
$@
] || chmod
+w
$@
80 $(AM_V_at
)${emacs} -L
${srcdir} -l unidata-gen \
81 -f unidata-gen-file
$@
${srcdir}
83 ${unidir}/emoji-labels.el
: ${unidir}/..
/international
/emoji.el \
84 ${srcdir}/emoji-test.txt
85 $(AM_V_GEN
)${emacs} -l emoji.el
-f emoji--generate-file
$@
87 ${unidir}/uni-scripts.el
: ${srcdir}/unidata-gen.el \
88 ${srcdir}/Scripts.txt \
89 ${srcdir}/ScriptExtensions.txt \
90 ${srcdir}/PropertyValueAliases.txt
91 $(AM_V_GEN
)${emacs} -L
${srcdir} \
92 -l unidata-gen.el
-f unidata-gen-scripts
$@
94 ${unidir}/uni-confusable.el
: ${srcdir}/unidata-gen.el \
95 ${srcdir}/confusables.txt
96 $(AM_V_GEN
)${emacs} -L
${srcdir} \
97 -l unidata-gen.el
-f unidata-gen-confusable
$@
99 ${unidir}/idna-mapping.el
: ${srcdir}/unidata-gen.el \
100 ${srcdir}/IdnaMappingTable.txt
101 $(AM_V_GEN
)${emacs} -L
${srcdir} \
102 -l unidata-gen.el
-f unidata-gen-idna-mapping
$@
104 .PHONY
: charscript.el
105 charscript.el
: ${unidir}/charscript.el
107 blocks
= ${srcdir}/blocks.awk
108 blocks_sources
= ${srcdir}/Blocks.txt
${srcdir}/emoji-data.txt
109 ${unidir}/charscript.el
: ${blocks}
111 # Don't use $^, since that includes the awk script.
112 ${unidir}/charscript.el
: ${blocks_sources}
113 $(AM_V_GEN
)$(AWK
) -f
${blocks} ${blocks_sources} > $@
116 emoji-zwj.el
: ${unidir}/emoji-zwj.el
118 zwj
= ${srcdir}/emoji-zwj.awk
119 zwj_sources
= ${srcdir}/emoji-zwj-sequences.txt
$(srcdir)/emoji-sequences.txt
120 ${unidir}/emoji-zwj.el
: ${zwj}
122 # Don't use $^, since that includes the awk script.
123 ${unidir}/emoji-zwj.el
: ${zwj_sources}
124 $(AM_V_GEN
)$(AWK
) -f
${zwj} ${zwj_sources} > $@
126 .PHONY
: clean bootstrap-clean
distclean maintainer-clean gen-clean
129 rm -f
${srcdir}/*.elc unidata.txt
131 ## IMO this should also run gen-clean.
132 bootstrap-clean
: clean
137 ## macuvs.h is a generated file, but it's also checked in because
138 ## macOS builds would need to do a headless bootstrap without it,
139 ## which is currently awkward. To avoid changing checked-in files
140 ## from a make target, we don't delete it here.
142 rm -f
${unidir}/charscript.el
*
143 rm -f
${unidir}/emoji-zwj.el
*
144 rm -f
${unifiles} ${unidir}/charprop.el
145 rm -f
${unidir}/emoji-labels.el
${unidir}/idna-mapping.el \
146 ${unidir}/uni-confusable.el
${unidir}/uni-scripts.el
147 ## ref: https://lists.gnu.org/r/emacs-devel/2013-11/msg01029.html
149 maintainer-clean
: gen-clean
distclean