Add 'update' target to Makefile
This target downloads all necessary Unicode data files using curl and rebuilds utf8proc_data.c using data_generator.rb (saving the new copy to utf8proc_data.c.new).
This commit is contained in:
parent
7d4541ee09
commit
13a72c152a
20
Makefile
20
Makefile
@ -1,5 +1,7 @@
|
|||||||
# libutf8proc Makefile
|
# libutf8proc Makefile
|
||||||
|
|
||||||
|
CURL=curl
|
||||||
|
RUBY=ruby
|
||||||
|
|
||||||
# settings
|
# settings
|
||||||
|
|
||||||
@ -16,8 +18,26 @@ c-library: libutf8proc.a libutf8proc.so
|
|||||||
clean:
|
clean:
|
||||||
rm -f utf8proc.o libutf8proc.a libutf8proc.so
|
rm -f utf8proc.o libutf8proc.a libutf8proc.so
|
||||||
|
|
||||||
|
update: utf8proc_data.c.new
|
||||||
|
|
||||||
# real targets
|
# real targets
|
||||||
|
|
||||||
|
utf8proc_data.c.new: UnicodeData.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt
|
||||||
|
$(RUBY) data_generator.rb < UnicodeData.txt > utf8proc_data.c.new
|
||||||
|
|
||||||
|
UnicodeData.txt:
|
||||||
|
$(CURL) -O http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
|
||||||
|
|
||||||
|
DerivedCoreProperties.txt:
|
||||||
|
$(CURL) -O http://www.unicode.org/Public/UNIDATA/DerivedCoreProperties.txt
|
||||||
|
|
||||||
|
CompositionExclusions.txt:
|
||||||
|
$(CURL) -O http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt
|
||||||
|
|
||||||
|
CaseFolding.txt:
|
||||||
|
$(CURL) -O http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
|
||||||
|
|
||||||
|
|
||||||
utf8proc.o: utf8proc.h utf8proc.c utf8proc_data.c
|
utf8proc.o: utf8proc.h utf8proc.c utf8proc_data.c
|
||||||
$(cc) -c -o utf8proc.o utf8proc.c
|
$(cc) -c -o utf8proc.o utf8proc.c
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user