mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Move case-folding.rb to tooldir with enc-prefix
This commit is contained in:
parent
e9982fd679
commit
ca4cbe59ed
2 changed files with 6 additions and 6 deletions
|
@ -1644,19 +1644,19 @@ $(UNICODE_HDR_DIR)/name2ctype.h:
|
||||||
$(MV) $@.new $@
|
$(MV) $@.new $@
|
||||||
|
|
||||||
# the next non-comment line was:
|
# 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
|
# but was changed to make sure CI works on systems that don't have gperf
|
||||||
unicode-up: $(UNICODE_DATA_HEADERS)
|
unicode-up: $(UNICODE_DATA_HEADERS)
|
||||||
|
|
||||||
$(UNICODE_HDR_DIR)/$(ALWAYS_UPDATE_UNICODE:yes=casefold.h): \
|
$(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)/UnicodeData.txt \
|
||||||
$(UNICODE_SRC_DATA_DIR)/SpecialCasing.txt \
|
$(UNICODE_SRC_DATA_DIR)/SpecialCasing.txt \
|
||||||
$(UNICODE_SRC_DATA_DIR)/CaseFolding.txt
|
$(UNICODE_SRC_DATA_DIR)/CaseFolding.txt
|
||||||
|
|
||||||
$(UNICODE_HDR_DIR)/casefold.h:
|
$(UNICODE_HDR_DIR)/casefold.h:
|
||||||
$(MAKEDIRS) $(@D)
|
$(MAKEDIRS) $(@D)
|
||||||
$(Q) $(BASERUBY) $(srcdir)/enc/unicode/case-folding.rb \
|
$(Q) $(BASERUBY) $(tooldir)/enc-case-folding.rb \
|
||||||
--output-file=$@ \
|
--output-file=$@ \
|
||||||
--mapping-data-directory=$(UNICODE_SRC_DATA_DIR)
|
--mapping-data-directory=$(UNICODE_SRC_DATA_DIR)
|
||||||
|
|
||||||
|
|
6
enc/unicode/case-folding.rb → tool/enc-case-folding.rb
Normal file → Executable file
6
enc/unicode/case-folding.rb → tool/enc-case-folding.rb
Normal file → Executable file
|
@ -3,12 +3,12 @@ require 'stringio'
|
||||||
|
|
||||||
# Usage (for case folding only):
|
# Usage (for case folding only):
|
||||||
# $ wget http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
|
# $ 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):
|
# or (for case folding and case mapping):
|
||||||
# $ wget http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
|
# $ 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/UnicodeData.txt
|
||||||
# $ wget http://www.unicode.org/Public/UNIDATA/SpecialCasing.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
|
# using -d or --debug will include UTF-8 characters in comments for debugging
|
||||||
|
|
||||||
class CaseFolding
|
class CaseFolding
|
||||||
|
@ -158,7 +158,7 @@ class CaseFolding
|
||||||
def display(dest, mapping_data)
|
def display(dest, mapping_data)
|
||||||
# print the header
|
# print the header
|
||||||
dest.print("/* DO NOT EDIT THIS FILE. */\n")
|
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+/)
|
versions = version.scan(/\d+/)
|
||||||
dest.print("#if defined ONIG_UNICODE_VERSION_STRING && !( \\\n")
|
dest.print("#if defined ONIG_UNICODE_VERSION_STRING && !( \\\n")
|
Loading…
Reference in a new issue