mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in (BUILTIN_TRANSSRCS): defined.
(BUILTIN_TRANSOBJS): defined. * enc/Makefile.in (BUILTIN_TRANSES): defined. * enc/make_encmake.rb (BUILTIN_TRANSES): defined. * enc/depend: don't generate rules for builtin transcoders. * common.mk (COMMONOBJS): add BUILTIN_TRANSOBJS. (enc.mk): pass BUILTIN_TRANSOBJS. (newline.c): new rule. (newline.$(OBJEXT)): new ru.e (srcs): newline.c added. * Makefile.in (BUILTIN_TRANSSRCS): defined. (BUILTIN_TRANSOBJS): defined. * transcode.c (Init_transcode): call Init_newline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2a9369fcba
commit
2c78899641
8 changed files with 58 additions and 2 deletions
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
|||
Mon Aug 25 00:52:31 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* configure.in (BUILTIN_TRANSSRCS): defined.
|
||||
(BUILTIN_TRANSOBJS): defined.
|
||||
|
||||
* enc/Makefile.in (BUILTIN_TRANSES): defined.
|
||||
|
||||
* enc/make_encmake.rb (BUILTIN_TRANSES): defined.
|
||||
|
||||
* enc/depend: don't generate rules for builtin transcoders.
|
||||
|
||||
* common.mk (COMMONOBJS): add BUILTIN_TRANSOBJS.
|
||||
(enc.mk): pass BUILTIN_TRANSOBJS.
|
||||
(newline.c): new rule.
|
||||
(newline.$(OBJEXT)): new ru.e
|
||||
(srcs): newline.c added.
|
||||
|
||||
* Makefile.in (BUILTIN_TRANSSRCS): defined.
|
||||
(BUILTIN_TRANSOBJS): defined.
|
||||
|
||||
* transcode.c (Init_transcode): call Init_newline.
|
||||
|
||||
Mon Aug 25 00:11:02 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* transcode.c (declare_transcoder): arguments order changed.
|
||||
|
|
|
@ -57,6 +57,8 @@ SOLIBS = @SOLIBS@
|
|||
MAINLIBS = @MAINLIBS@
|
||||
ARCHMINIOBJS = @MINIOBJS@
|
||||
BUILTIN_ENCOBJS = @BUILTIN_ENCOBJS@
|
||||
BUILTIN_TRANSSRCS = @BUILTIN_TRANSSRCS@
|
||||
BUILTIN_TRANSOBJS = @BUILTIN_TRANSOBJS@
|
||||
|
||||
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
|
||||
RUBY_SO_NAME=@RUBY_SO_NAME@
|
||||
|
|
12
common.mk
12
common.mk
|
@ -81,6 +81,7 @@ COMMONOBJS = array.$(OBJEXT) \
|
|||
thread.$(OBJEXT) \
|
||||
cont.$(OBJEXT) \
|
||||
$(BUILTIN_ENCOBJS) \
|
||||
$(BUILTIN_TRANSOBJS) \
|
||||
$(MISSING)
|
||||
|
||||
OBJS = dln.$(OBJEXT) \
|
||||
|
@ -381,7 +382,7 @@ encs: enc.mk $(LIBRUBY) $(PREP) transdb.h
|
|||
|
||||
enc.mk: $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
|
||||
$(srcdir)/lib/mkmf.rb $(RBCONFIG)
|
||||
$(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" $@ $(ENCS)
|
||||
$(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" $@ $(ENCS)
|
||||
|
||||
.PRECIOUS: $(MKFILES)
|
||||
|
||||
|
@ -661,6 +662,10 @@ unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regint.h \
|
|||
utf_8.$(OBJEXT): {$(VPATH)}utf_8.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
|
||||
{$(VPATH)}defines.h {$(VPATH)}oniguruma.h
|
||||
|
||||
newline.c: $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb
|
||||
newline.$(OBJEXT): {$(VPATH)}newline.c {$(VPATH)}defines.h {$(VPATH)}intern.h \
|
||||
{$(VPATH)}missing.h {$(VPATH)}st.h {$(VPATH)}transcode_data.h
|
||||
|
||||
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
|
||||
vmtc.inc vm.inc
|
||||
|
||||
|
@ -686,7 +691,7 @@ vmtc.inc: $(srcdir)/template/vmtc.inc.tmpl
|
|||
|
||||
vm.inc: $(srcdir)/template/vm.inc.tmpl
|
||||
|
||||
srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c $(srcdir)/ext/ripper/ripper.c srcs-enc
|
||||
srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}newline.c $(srcdir)/ext/ripper/ripper.c srcs-enc
|
||||
|
||||
srcs-enc: enc.mk
|
||||
$(MAKE) -f enc.mk RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) srcs
|
||||
|
@ -715,6 +720,9 @@ prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(PRELUDE_SCRIPTS) $(PR
|
|||
golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(srcdir)/prelude.rb $(srcdir)/golf_prelude.rb $(PREP)
|
||||
$(COMPILE_PRELUDE) $(srcdir)/golf_prelude.rb $@
|
||||
|
||||
newline.c:
|
||||
$(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo newline.c $(srcdir)/enc/trans/newline.trans
|
||||
|
||||
prereq: incs srcs preludes
|
||||
|
||||
preludes: {$(VPATH)}miniprelude.c
|
||||
|
|
12
configure.in
12
configure.in
|
@ -2088,6 +2088,18 @@ BUILTIN_ENCOBJS=
|
|||
for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS `basename $e .c`"'.$(OBJEXT)'; done
|
||||
AC_SUBST(BUILTIN_ENCOBJS)
|
||||
|
||||
BUILTIN_TRANSES=["`sed -n -e '/^BUILTIN_TRANSES[ ]*=/{' \
|
||||
-e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \
|
||||
-e '}' "${srcdir}/enc/Makefile.in"`"]
|
||||
BUILTIN_TRANSSRCS=
|
||||
BUILTIN_TRANSOBJS=
|
||||
for e in $BUILTIN_TRANSES; do
|
||||
BUILTIN_TRANSSRCS="$BUILTIN_TRANSSRCS `basename $e .trans`"'.c';
|
||||
BUILTIN_TRANSOBJS="$BUILTIN_TRANSOBJS `basename $e .trans`"'.$(OBJEXT)';
|
||||
done
|
||||
AC_SUBST(BUILTIN_TRANSSRCS)
|
||||
AC_SUBST(BUILTIN_TRANSOBJS)
|
||||
|
||||
AC_CONFIG_FILES($FIRSTMAKEFILE)
|
||||
AC_CONFIG_FILES(Makefile, [{
|
||||
sed '/^MISSING/s/\$U\././g' Makefile
|
||||
|
|
|
@ -17,6 +17,8 @@ OBJEXT = @OBJEXT@
|
|||
BUILTIN_ENCS = ascii.c us_ascii.c\
|
||||
unicode.c utf_8.c
|
||||
|
||||
BUILTIN_TRANSES = newline.trans
|
||||
|
||||
RUBY_SO_NAME = @RUBY_SO_NAME@
|
||||
LIBRUBY = @LIBRUBY@
|
||||
LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
% end
|
||||
% }
|
||||
% }
|
||||
% trans -= BUILTIN_TRANSES
|
||||
% atrans -= BUILTIN_TRANSES
|
||||
% trans.uniq!
|
||||
% atrans = atrans.sort_by(&alphanumeric_order)
|
||||
% trans = trans.sort_by(&alphanumeric_order)
|
||||
|
|
|
@ -12,6 +12,7 @@ require 'erb'
|
|||
CONFIG["MAKEDIRS"] ||= '@$(MINIRUBY) -run -e mkdir -- -p'
|
||||
|
||||
BUILTIN_ENCS = []
|
||||
BUILTIN_TRANSES = []
|
||||
ENC_PATTERNS = []
|
||||
NOENC_PATTERNS = []
|
||||
|
||||
|
@ -20,6 +21,9 @@ until ARGV.empty?
|
|||
when /\A--builtin-encs=/
|
||||
BUILTIN_ENCS.concat $'.split.map {|e| File.basename(e, '.*') << '.c'}
|
||||
ARGV.shift
|
||||
when /\A--builtin-transes=/
|
||||
BUILTIN_TRANSES.concat $'.split.map {|e| File.basename(e, '.*') }
|
||||
ARGV.shift
|
||||
when /\A--encs=/
|
||||
ENC_PATTERNS.concat $'.split
|
||||
ARGV.shift
|
||||
|
|
|
@ -2424,6 +2424,8 @@ ecerr_error_bytes(VALUE self)
|
|||
return rb_attr_get(self, rb_intern("error_bytes"));
|
||||
}
|
||||
|
||||
extern void Init_newline(void);
|
||||
|
||||
void
|
||||
Init_transcode(void)
|
||||
{
|
||||
|
@ -2470,4 +2472,6 @@ Init_transcode(void)
|
|||
rb_define_method(rb_eInvalidByteSequence, "source_encoding", ecerr_source_encoding, 0);
|
||||
rb_define_method(rb_eInvalidByteSequence, "destination_encoding", ecerr_destination_encoding, 0);
|
||||
rb_define_method(rb_eInvalidByteSequence, "error_bytes", ecerr_error_bytes, 0);
|
||||
|
||||
Init_newline();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue