ruby-changes:37236
From: nobu <ko1@a...>
Date: Sun, 18 Jan 2015 12:57:07 +0900 (JST)
Subject: [ruby-changes:37236] nobu:r49317 (trunk): builtin encodings and transcoder locations
nobu 2015-01-18 12:56:52 +0900 (Sun, 18 Jan 2015) New Revision: 49317 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49317 Log: builtin encodings and transcoder locations * Makefile.in (VPATH, NEWLINE_C), common.mk (common-srcs): make and use newline.c under enc/trans directory, not toplevel. no longer search enc directory implicitly. * configure.in, enc/Makefile.in (BUILTIN_ENCS, BUILTIN_TRANSES): prefix respective directory names to builtin encodings and transcoder source names. Modified files: trunk/ChangeLog trunk/Makefile.in trunk/common.mk trunk/configure.in trunk/enc/Makefile.in trunk/enc/depend trunk/win32/Makefile.sub Index: configure.in =================================================================== --- configure.in (revision 49316) +++ configure.in (revision 49317) @@ -4191,7 +4191,7 @@ BUILTIN_ENCS=["`sed -n -e '/^BUILTIN_ENC https://github.com/ruby/ruby/blob/trunk/configure.in#L4191 -e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \ -e '}' "${srcdir}/enc/Makefile.in"`"] BUILTIN_ENCOBJS= -for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS `basename $e .c`"'.$(OBJEXT)'; done +for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS "`echo $e | sed 's/\.c$/.$(OBJEXT)/'`; done AC_SUBST(BUILTIN_ENCOBJS) BUILTIN_TRANSES=["`sed -n -e '/^BUILTIN_TRANSES[ ]*=/{' \ @@ -4200,8 +4200,8 @@ BUILTIN_TRANSES=["`sed -n -e '/^BUILTIN_ https://github.com/ruby/ruby/blob/trunk/configure.in#L4200 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)'; + BUILTIN_TRANSSRCS="$BUILTIN_TRANSSRCS "`echo $e | sed 's/\.trans$/.c/'` + BUILTIN_TRANSOBJS="$BUILTIN_TRANSOBJS "`echo $e | sed 's/\.trans$/.$(OBJEXT)/'` done AC_SUBST(BUILTIN_TRANSSRCS) AC_SUBST(BUILTIN_TRANSOBJS) Index: ChangeLog =================================================================== --- ChangeLog (revision 49316) +++ ChangeLog (revision 49317) @@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jan 18 12:56:49 2015 Nobuyoshi Nakada <nobu@r...> + + * Makefile.in (VPATH, NEWLINE_C), common.mk (common-srcs): make + and use newline.c under enc/trans directory, not toplevel. no + longer search enc directory implicitly. + + * configure.in, enc/Makefile.in (BUILTIN_ENCS, BUILTIN_TRANSES): + prefix respective directory names to builtin encodings and + transcoder source names. + Sun Jan 18 11:49:46 2015 Masaki Suketa <masaki.suketa@n...> * ext/win32ole/win32ole.c (ole_invoke): avoid SEGV when VT_RECORD Index: enc/Makefile.in =================================================================== --- enc/Makefile.in (revision 49316) +++ enc/Makefile.in (revision 49317) @@ -22,10 +22,10 @@ DLEXT = @DLEXT@ https://github.com/ruby/ruby/blob/trunk/enc/Makefile.in#L22 OBJEXT = @OBJEXT@ LIBEXT = @LIBEXT@ -BUILTIN_ENCS = ascii.c us_ascii.c\ - unicode.c utf_8.c +BUILTIN_ENCS = enc/ascii.c enc/us_ascii.c\ + enc/unicode.c enc/utf_8.c -BUILTIN_TRANSES = newline.trans +BUILTIN_TRANSES = enc/trans/newline.trans RUBY_SO_NAME = @RUBY_SO_NAME@ LIBRUBY = @LIBRUBY@ Index: enc/depend =================================================================== --- enc/depend (revision 49316) +++ enc/depend (revision 49317) @@ -157,6 +157,12 @@ clean-srcs: https://github.com/ruby/ruby/blob/trunk/enc/depend#L157 <%# vim: set ft=eruby noexpandtab ts=8 sw=2 : -%> # AUTOGENERATED DEPENDENCIES START +enc/ascii.$(OBJEXT): $(top_srcdir)/regenc.h +enc/ascii.$(OBJEXT): config.h +enc/ascii.$(OBJEXT): defines.h +enc/ascii.$(OBJEXT): enc/ascii.c +enc/ascii.$(OBJEXT): missing.h +enc/ascii.$(OBJEXT): oniguruma.h enc/big5.$(OBJEXT): $(top_srcdir)/regenc.h enc/big5.$(OBJEXT): config.h enc/big5.$(OBJEXT): defines.h @@ -492,6 +498,15 @@ enc/trans/korean.$(OBJEXT): intern.h https://github.com/ruby/ruby/blob/trunk/enc/depend#L498 enc/trans/korean.$(OBJEXT): missing.h enc/trans/korean.$(OBJEXT): st.h enc/trans/korean.$(OBJEXT): subst.h +enc/trans/newline.$(OBJEXT): $(hdrdir)/ruby/ruby.h +enc/trans/newline.$(OBJEXT): $(top_srcdir)/transcode_data.h +enc/trans/newline.$(OBJEXT): config.h +enc/trans/newline.$(OBJEXT): defines.h +enc/trans/newline.$(OBJEXT): enc/trans/newline.c +enc/trans/newline.$(OBJEXT): intern.h +enc/trans/newline.$(OBJEXT): missing.h +enc/trans/newline.$(OBJEXT): st.h +enc/trans/newline.$(OBJEXT): subst.h enc/trans/single_byte.$(OBJEXT): $(hdrdir)/ruby/ruby.h enc/trans/single_byte.$(OBJEXT): $(top_srcdir)/transcode_data.h enc/trans/single_byte.$(OBJEXT): config.h @@ -521,6 +536,25 @@ enc/trans/utf_16_32.$(OBJEXT): intern.h https://github.com/ruby/ruby/blob/trunk/enc/depend#L536 enc/trans/utf_16_32.$(OBJEXT): missing.h enc/trans/utf_16_32.$(OBJEXT): st.h enc/trans/utf_16_32.$(OBJEXT): subst.h +enc/unicode.$(OBJEXT): $(hdrdir)/ruby/ruby.h +enc/unicode.$(OBJEXT): $(top_srcdir)/regenc.h +enc/unicode.$(OBJEXT): $(top_srcdir)/regint.h +enc/unicode.$(OBJEXT): config.h +enc/unicode.$(OBJEXT): defines.h +enc/unicode.$(OBJEXT): enc/unicode.c +enc/unicode.$(OBJEXT): enc/unicode/casefold.h +enc/unicode.$(OBJEXT): enc/unicode/name2ctype.h +enc/unicode.$(OBJEXT): intern.h +enc/unicode.$(OBJEXT): missing.h +enc/unicode.$(OBJEXT): oniguruma.h +enc/unicode.$(OBJEXT): st.h +enc/unicode.$(OBJEXT): subst.h +enc/us_ascii.$(OBJEXT): $(top_srcdir)/regenc.h +enc/us_ascii.$(OBJEXT): config.h +enc/us_ascii.$(OBJEXT): defines.h +enc/us_ascii.$(OBJEXT): enc/us_ascii.c +enc/us_ascii.$(OBJEXT): missing.h +enc/us_ascii.$(OBJEXT): oniguruma.h enc/utf_16be.$(OBJEXT): $(top_srcdir)/regenc.h enc/utf_16be.$(OBJEXT): config.h enc/utf_16be.$(OBJEXT): defines.h @@ -545,6 +579,12 @@ enc/utf_32le.$(OBJEXT): defines.h https://github.com/ruby/ruby/blob/trunk/enc/depend#L579 enc/utf_32le.$(OBJEXT): enc/utf_32le.c enc/utf_32le.$(OBJEXT): missing.h enc/utf_32le.$(OBJEXT): oniguruma.h +enc/utf_8.$(OBJEXT): $(top_srcdir)/regenc.h +enc/utf_8.$(OBJEXT): config.h +enc/utf_8.$(OBJEXT): defines.h +enc/utf_8.$(OBJEXT): enc/utf_8.c +enc/utf_8.$(OBJEXT): missing.h +enc/utf_8.$(OBJEXT): oniguruma.h enc/windows_1251.$(OBJEXT): $(top_srcdir)/regenc.h enc/windows_1251.$(OBJEXT): config.h enc/windows_1251.$(OBJEXT): defines.h Index: common.mk =================================================================== --- common.mk (revision 49316) +++ common.mk (revision 49317) @@ -497,9 +497,9 @@ distclean-platform: clean-platform https://github.com/ruby/ruby/blob/trunk/common.mk#L497 realclean:: realclean-ext realclean-local realclean-enc realclean-golf realclean-extout realclean-local:: distclean-local - $(Q)$(RM) parse.c parse.h lex.c newline.c $(PRELUDES) revision.h + $(Q)$(RM) parse.c parse.h lex.c enc/trans/newline.c $(PRELUDES) revision.h $(Q)$(RM) id.c id.h probes.dmyh - $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) parse.c parse.h lex.c newline.c $(PRELUDES) revision.h + $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) parse.c parse.h lex.c enc/trans/newline.c $(PRELUDES) revision.h $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) id.c id.h probes.dmyh $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure tool/config.guess tool/config.sub gems/*.gem realclean-ext:: PHONY @@ -690,8 +690,9 @@ win32/win32.$(OBJEXT): {$(VPATH)}win32/w https://github.com/ruby/ruby/blob/trunk/common.mk#L690 win32/file.$(OBJEXT): {$(VPATH)}win32/file.c $(RUBY_H_INCLUDES) $(PLATFORM_D) $(NEWLINE_C): $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb + $(Q) $(MAKEDIRS) $(@D) $(Q) $(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo $@ $(srcdir)/enc/trans/newline.trans -newline.$(OBJEXT): $(NEWLINE_C) +enc/trans/newline.$(OBJEXT): $(NEWLINE_C) verconf.h: $(srcdir)/template/verconf.h.tmpl $(srcdir)/tool/generic_erb.rb $(ECHO) creating $@ @@ -731,7 +732,7 @@ INSNS2VMOPT = --srcdir="$(srcdir)" https://github.com/ruby/ruby/blob/trunk/common.mk#L732 {$(VPATH)}vm.inc: $(srcdir)/template/vm.inc.tmpl -common-srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}newline.c {$(VPATH)}id.c \ +common-srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}enc/trans/newline.c {$(VPATH)}id.c \ srcs-lib srcs-ext srcs: common-srcs srcs-enc @@ -1064,12 +1065,6 @@ array.$(OBJEXT): {$(VPATH)}st.h https://github.com/ruby/ruby/blob/trunk/common.mk#L1065 array.$(OBJEXT): {$(VPATH)}subst.h array.$(OBJEXT): {$(VPATH)}util.h array.$(OBJEXT): {$(VPATH)}vm_opts.h -ascii.$(OBJEXT): {$(VPATH)}ascii.c -ascii.$(OBJEXT): {$(VPATH)}config.h -ascii.$(OBJEXT): {$(VPATH)}defines.h -ascii.$(OBJEXT): {$(VPATH)}missing.h -ascii.$(OBJEXT): {$(VPATH)}oniguruma.h -ascii.$(OBJEXT): {$(VPATH)}regenc.h bignum.$(OBJEXT): $(hdrdir)/ruby/ruby.h bignum.$(OBJEXT): $(top_srcdir)/include/ruby.h bignum.$(OBJEXT): {$(VPATH)}bignum.c @@ -1261,6 +1256,46 @@ dmydln.$(OBJEXT): {$(VPATH)}st.h https://github.com/ruby/ruby/blob/trunk/common.mk#L1256 dmydln.$(OBJEXT): {$(VPATH)}subst.h dmyenc.$(OBJEXT): {$(VPATH)}dmyenc.c dmyext.$(OBJEXT): {$(VPATH)}dmyext.c +enc/ascii.$(OBJEXT): {$(VPATH)}config.h +enc/ascii.$(OBJEXT): {$(VPATH)}defines.h +enc/ascii.$(OBJEXT): {$(VPATH)}enc/ascii.c +enc/ascii.$(OBJEXT): {$(VPATH)}missing.h +enc/ascii.$(OBJEXT): {$(VPATH)}oniguruma.h +enc/ascii.$(OBJEXT): {$(VPATH)}regenc.h +enc/trans/newline.$(OBJEXT): $(hdrdir)/ruby/ruby.h +enc/trans/newline.$(OBJEXT): {$(VPATH)}config.h +enc/trans/newline.$(OBJEXT): {$(VPATH)}defines.h +enc/trans/newline.$(OBJEXT): {$(VPATH)}enc/trans/newline.c +enc/trans/newline.$(OBJEXT): {$(VPATH)}intern.h +enc/trans/newline.$(OBJEXT): {$(VPATH)}missing.h +enc/trans/newline.$(OBJEXT): {$(VPATH)}st.h +enc/trans/newline.$(OBJEXT): {$(VPATH)}subst.h +enc/trans/newline.$(OBJEXT): {$(VPATH)}transcode_data.h +enc/unicode.$(OBJEXT): $(hdrdir)/ruby/ruby.h +enc/unicode.$(OBJEXT): {$(VPATH)}config.h +enc/unicode.$(OBJEXT): {$(VPATH)}defines.h +enc/unicode.$(OBJEXT): {$(VPATH)}enc/unicode.c +enc/unicode.$(OBJEXT): {$(VPATH)}enc/unicode/casefold.h +enc/unicode.$(OBJEXT): {$(VPATH)}enc/unicode/name2ctype.h +enc/unicode.$(OBJEXT): {$(VPATH)}intern.h +enc/unicode.$(OBJEXT): {$(VPATH)}missing.h +enc/unicode.$(OBJEXT): {$(VPATH)}oniguruma.h +enc/unicode.$(OBJEXT): {$(VPATH)}regenc.h +enc/unicode.$(OBJEXT): {$(VPATH)}regint.h +enc/unicode.$(OBJEXT): {$(VPATH)}st.h +enc/unicode.$(OBJEXT): {$(VPATH)}subst.h +enc/us_ascii.$(OBJEXT): {$(VPATH)}config.h +enc/us_ascii.$(OBJEXT): {$(VPATH)}defines.h +enc/us_ascii.$(OBJEXT): {$(VPATH)}enc/us_ascii.c +enc/us_ascii.$(OBJEXT): {$(VPATH)}missing.h +enc/us_ascii.$(OBJEXT): {$(VPATH)}oniguruma.h +enc/us_ascii.$(OBJEXT): {$(VPATH)}regenc.h +enc/utf_8.$(OBJEXT): {$(VPATH)}config.h +enc/utf_8.$(OBJEXT): {$(VPATH)}defines.h +enc/utf_8.$(OBJEXT): {$(VPATH)}enc/utf_8.c +enc/utf_8.$(OBJEXT): {$(VPATH)}missing.h +enc/utf_8.$(OBJEXT): {$(VPATH)}oniguruma.h +enc/utf_8.$(OBJEXT): {$(VPATH)}regenc.h encoding.$(OBJEXT): $(hdrdir)/ruby/ruby.h encoding.$(OBJEXT): $(top_srcdir)/include/ruby.h encoding.$(OBJEXT): {$(VPATH)}config.h @@ -1641,15 +1676,6 @@ miniinit.$(OBJEXT): {$(VPATH)}oniguruma. https://github.com/ruby/ruby/blob/trunk/common.mk#L1676 miniinit.$(OBJEXT): {$(VPATH)}st.h miniinit.$(OBJEXT): {$(VPATH)}subst.h miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c -newline.$(OBJEXT): $(hdrdir)/ruby/ruby.h -newline.$(OBJEXT): {$(VPATH)}config.h -newline.$(OBJEXT): {$(VPATH)}defines.h -newline.$(OBJEXT): {$(VPATH)}intern.h -newline.$(OBJEXT): {$(VPATH)}missing.h -newline.$(OBJEXT): {$(VPATH)}newline.c -newline.$(OBJEXT): {$(VPATH)}st.h -newline.$(OBJEXT): {$(VPATH)}subst.h -newline.$(OBJEXT): {$(VPATH)}transcode_data.h node.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h node.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h node.$(OBJEXT): $(CCAN_DIR)/list/list.h @@ -2221,31 +2247,6 @@ transcode.$(OBJEXT): {$(VPATH)}st.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2247 transcode.$(OBJEXT): {$(VPATH)}subst.h transcode.$(OBJEXT): {$(VPATH)}transcode.c transcode.$(OBJEXT): {$(VPATH)}transcode_data.h -unicode.$(OBJEXT): $(hdrdir)/ruby/ruby.h -unicode.$(OBJEXT): {$(VPATH)}config.h -unicode.$(OBJEXT): {$(VPATH)}enc/unicode/casefold.h -unicode.$(OBJEXT): {$(VPATH)}enc/unicode/name2ctype.h -unicode.$(OBJEXT): {$(VPATH)}defines.h -unicode.$(OBJEXT): {$(VPATH)}intern.h -unicode.$(OBJEXT): {$(VPATH)}missing.h -unicode.$(OBJEXT): {$(VPATH)}oniguruma.h -unicode.$(OBJEXT): {$(VPATH)}regenc.h -unicode.$(OBJEXT): {$(VPATH)}regint.h -unicode.$(OBJEXT): {$(VPATH)}st.h -unicode.$(OBJEXT): {$(VPATH)}subst.h -unicode.$(OBJEXT): {$(VPATH)}unicode.c -us_ascii.$(OBJEXT): {$(VPATH)}config.h -us_ascii.$(OBJEXT): {$(VPATH)}defines.h -us_ascii.$(OBJEXT): {$(VPATH)}missing.h -us_ascii.$(OBJEXT): {$(VPATH)}oniguruma.h -us_ascii.$(OBJEXT): {$(VPATH)}regenc.h -us_ascii.$(OBJEXT): {$(VPATH)}us_ascii.c -utf_8.$(OBJEXT): {$(VPATH)}config.h -utf_8.$(OBJEXT): {$(VPATH)}defines.h -utf_8.$(OBJEXT): {$(VPATH)}missing.h -utf_8.$(OBJEXT): {$(VPATH)}oniguruma.h -utf_8.$(OBJEXT): {$(VPATH)}regenc.h -utf_8.$(OBJEXT): {$(VPATH)}utf_8.c util.$(OBJEXT): $(hdrdir)/ruby/ruby.h util.$(OBJEXT): $(top_srcdir)/include/ruby.h util.$(OBJEXT): {$(VPATH)}config.h Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 49316) +++ win32/Makefile.sub (revision 49317) @@ -370,7 +370,7 @@ EXTOBJS = dmyext.$(OBJEXT) https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L370 arch_hdrdir = $(EXTOUT)/include/$(arch) top_srcdir = $(srcdir) hdrdir = $(srcdir)/include -VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/missing;$(win_srcdir) +VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(win_srcdir) !if exist($(srcdir)/.svn) VCS = svn @@ -398,10 +398,10 @@ ruby: $(PROGRAM) https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L398 rubyw: $(WPROGRAM) stub: $(STUBPROGRAM) -!if !exist(newline.c) && exist($(srcdir)/newline.c) -NEWLINE_C = $(srcdir)/newline.c +!if !exist(enc/trans/newline.c) && exist($(srcdir)/enc/trans/newline.c) +NEWLINE_C = $(srcdir)/enc/trans/newline.c !else -NEWLINE_C = newline.c +NEWLINE_C = enc/trans/newline.c !endif !if !exist(miniprelude.c) && exist($(srcdir)/miniprelude.c) MINIPRELUDE_C = $(srcdir)/miniprelude.c @@ -1072,6 +1072,9 @@ $(ruby_pc): $(RBCONFIG) https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1072 @$(MINIRUBY) -r./rbconfig $(srcdir)/tool/expand-config.rb \ $(srcdir)/template/ruby.pc.in > $@ +{$(srcdir)/enc/trans}.c.obj: + $(ECHO) compiling $(<:\=/) + $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/) {$(srcdir)/enc}.c.obj: $(ECHO) compiling $(<:\=/) $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/) Index: Makefile.in =================================================================== --- Makefile.in (revision 49316) +++ Makefile.in (revision 49317) @@ -51,7 +51,7 @@ DOCTARGETS = @RDOCTARGET@ @CAPITARGET@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L51 EXTOUT = @EXTOUT@ arch_hdrdir = $(EXTOUT)/include/$(arch) -VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/missing +VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/missing empty = CC_VERSION = @CC_VERSION@ @@ -171,7 +171,7 @@ SYMBOL_PREFIX = @SYMBOL_PREFIX@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L171 INSTALLED_LIST= .installed.list -NEWLINE_C = newline.c +NEWLINE_C = enc/trans/newline.c MINIPRELUDE_C = miniprelude.c PRELUDE_C = prelude.c RBCONFIG = .rbconfig.time -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/