Move case-folding.rb to tooldir with enc-prefix

This commit is contained in:
Nobuyoshi Nakada 2022-09-14 19:15:45 +09:00
Родитель e9982fd679
Коммит ca4cbe59ed
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7CD2805BFA3770C6
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1644,19 +1644,19 @@ $(UNICODE_HDR_DIR)/name2ctype.h:
$(MV) $@.new $@
# the next non-comment line was:
# $(UNICODE_HDR_DIR)/casefold.h: $(srcdir)/enc/unicode/case-folding.rb \
# $(UNICODE_HDR_DIR)/casefold.h: $(tooldir)/enc-case-folding.rb \
# but was changed to make sure CI works on systems that don't have gperf
unicode-up: $(UNICODE_DATA_HEADERS)
$(UNICODE_HDR_DIR)/$(ALWAYS_UPDATE_UNICODE:yes=casefold.h): \
$(srcdir)/enc/unicode/case-folding.rb \
$(tooldir)/enc-case-folding.rb \
$(UNICODE_SRC_DATA_DIR)/UnicodeData.txt \
$(UNICODE_SRC_DATA_DIR)/SpecialCasing.txt \
$(UNICODE_SRC_DATA_DIR)/CaseFolding.txt
$(UNICODE_HDR_DIR)/casefold.h:
$(MAKEDIRS) $(@D)
$(Q) $(BASERUBY) $(srcdir)/enc/unicode/case-folding.rb \
$(Q) $(BASERUBY) $(tooldir)/enc-case-folding.rb \
--output-file=$@ \
--mapping-data-directory=$(UNICODE_SRC_DATA_DIR)

Просмотреть файл

@ -3,12 +3,12 @@ require 'stringio'
# Usage (for case folding only):
# $ wget http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
# $ ruby case-folding.rb CaseFolding.txt -o casefold.h
# $ ruby enc-case-folding.rb CaseFolding.txt -o casefold.h
# or (for case folding and case mapping):
# $ wget http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
# $ wget http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
# $ wget http://www.unicode.org/Public/UNIDATA/SpecialCasing.txt
# $ ruby case-folding.rb -m . -o casefold.h
# $ ruby enc-case-folding.rb -m . -o casefold.h
# using -d or --debug will include UTF-8 characters in comments for debugging
class CaseFolding
@ -158,7 +158,7 @@ class CaseFolding
def display(dest, mapping_data)
# print the header
dest.print("/* DO NOT EDIT THIS FILE. */\n")
dest.print("/* Generated by enc/unicode/case-folding.rb */\n\n")
dest.print("/* Generated by enc-case-folding.rb */\n\n")
versions = version.scan(/\d+/)
dest.print("#if defined ONIG_UNICODE_VERSION_STRING && !( \\\n")