diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-21 08:01:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-21 08:01:09 +0000 |
commit | a7b920686af51c7f54a2b1bd9e53c657db41d360 (patch) | |
tree | ccd8d2c80200ef1440468d510d6e3ee79894ded5 /Makefile.in | |
parent | a606038c6abf31740e38448a164f872d3c94c83f (diff) | |
download | ruby-a7b920686af51c7f54a2b1bd9e53c657db41d360.tar.gz |
* enc/unicode/name2ctype.h: split from enc/unicode.c and made a
perfect hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index ed312e50d8..47a55f3a75 100644 --- a/Makefile.in +++ b/Makefile.in @@ -208,6 +208,28 @@ lex.c: defs/keywords cp $@ $(srcdir)/lex.c.blt; \ fi +NAME2CTYPE_OPTIONS = -7 -c -j1 -i1 -t -C -P -T -H uniname2ctype_hash -Q uniname2ctype_pool -N uniname2ctype_p + +enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd + $(MAKEDIRS) $(@D) + @\ + if cmp -s $(?:.kwd=.src) $?; then \ + set -x; \ + cp $(?:.kwd=.h.blt) $@; \ + else \ + trap '$(RM) $@-1.h $@-2.h' 0 && \ + set -x; \ + sed '/^#ifdef USE_UNICODE_PROPERTIES/,/^#endif/d' $? | gperf $(NAME2CTYPE_OPTIONS) > $@-1.h && \ + gperf $(NAME2CTYPE_OPTIONS) < $? > $@-2.h && \ + diff -DUSE_UNICODE_PROPERTIES $@-1.h $@-2.h > $@.tmp; \ + mv $@.tmp $@ && \ + cp $? $(?:.kwd=.src) && \ + cp $@ $(?:.kwd=.h.blt); \ + fi + +enc/unicode/name2ctype_prop.h: $(srcdir)/enc/unicode/name2ctype.kwd + $(MAKEDIRS) $(@D) + .c.@OBJEXT@: $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $< |