summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--Makefile.in4
-rw-r--r--common.mk89
-rw-r--r--configure.in6
-rw-r--r--enc/Makefile.in6
-rw-r--r--enc/depend40
-rw-r--r--win32/Makefile.sub11
7 files changed, 110 insertions, 56 deletions
diff --git a/ChangeLog b/ChangeLog
index f71a1e6..06a3837 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sun Jan 18 12:56:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@nifty.ne.jp>
* ext/win32ole/win32ole.c (ole_invoke): avoid SEGV when VT_RECORD
diff --git a/Makefile.in b/Makefile.in
index 177fb43..b2b6273 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -51,7 +51,7 @@ DOCTARGETS = @RDOCTARGET@ @CAPITARGET@
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@
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
diff --git a/common.mk b/common.mk
index 819a2f3..e863f41 100644
--- a/common.mk
+++ b/common.mk
@@ -497,9 +497,9 @@ distclean-platform: clean-platform
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/win32.c {$(VPATH)}dln.h {$(VPATH)}dln_fin
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)"
{$(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
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
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.h
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
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
diff --git a/configure.in b/configure.in
index b3deed2..5578863 100644
--- a/configure.in
+++ b/configure.in
@@ -4191,7 +4191,7 @@ BUILTIN_ENCS=["`sed -n -e '/^BUILTIN_ENCS[ ]*=/{' \
-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_TRANSES[ ]*=/{' \
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)
diff --git a/enc/Makefile.in b/enc/Makefile.in
index a64785d..ac9cee9 100644
--- a/enc/Makefile.in
+++ b/enc/Makefile.in
@@ -22,10 +22,10 @@ DLEXT = @DLEXT@
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@
diff --git a/enc/depend b/enc/depend
index 9bbbe5c..76c4f89 100644
--- a/enc/depend
+++ b/enc/depend
@@ -157,6 +157,12 @@ clean-srcs:
<%# 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
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
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
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
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 668f9e1..9165b4d 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -370,7 +370,7 @@ EXTOBJS = dmyext.$(OBJEXT)
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)
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)
@$(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$(<:\=/)