summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.in2
-rw-r--r--bcc32/Makefile.sub4
-rw-r--r--common.mk35
-rw-r--r--enc/ascii.c (renamed from ascii.c)0
-rw-r--r--enc/euc_jp.c (renamed from euc_jp.c)0
-rw-r--r--enc/sjis.c (renamed from sjis.c)0
-rw-r--r--enc/unicode.c (renamed from unicode.c)0
-rw-r--r--enc/utf8.c (renamed from utf8.c)0
-rw-r--r--win32/Makefile.sub4
-rw-r--r--wince/Makefile.sub7
11 files changed, 39 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 21cdcbe..16846bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Oct 11 06:35:43 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * Makefile.in, */Makefile.sub (VPATH): add enc directory.
+
+ * common.mk (ENCOBJS): encoding objects.
+
+ * enc: directory for encodings.
+
Thu Oct 11 00:04:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* include/ruby/oniguruma.h (OnigEncodingTypeST): add OnigEncoding
diff --git a/Makefile.in b/Makefile.in
index 4c110cd..2c5b4b2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -33,7 +33,7 @@ RDOCTARGET = @RDOCTARGET@
EXTOUT = @EXTOUT@
RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system
arch_hdrdir = $(EXTOUT)/include/$(arch)
-VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/missing
+VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/missing
empty =
OUTFLAG = @OUTFLAG@$(empty)
diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub
index 915b160..e18702e 100644
--- a/bcc32/Makefile.sub
+++ b/bcc32/Makefile.sub
@@ -190,9 +190,9 @@ MINIOBJS = dmydln.$(OBJEXT)
arch_hdrdir = $(EXTOUT)/include/$(arch)
hdrdir = $(srcdir)/include
-VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(srcdir)/win32
+VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/missing;$(srcdir)/win32
-.path.c = .;$(srcdir);$(srcdir)/win32;$(srcdir)/missing
+.path.c = .;$(srcdir);$(srcdir)/enc;$(srcdir)/win32;$(srcdir)/missing
.path.ci = $(srcdir)
.path.inc = .;$(srcdir)
.path.def = .;$(srcdir)
diff --git a/common.mk b/common.mk
index 86a6461..73207ef 100644
--- a/common.mk
+++ b/common.mk
@@ -18,8 +18,13 @@ MAINOBJ = main.$(OBJEXT)
EXTOBJS =
DLDOBJS = $(DMYEXT)
+ENCOBJS = ascii.$(OBJEXT) \
+ euc_jp.$(OBJEXT) \
+ sjis.$(OBJEXT) \
+ unicode.$(OBJEXT) \
+ utf8.$(OBJEXT)
+
OBJS = array.$(OBJEXT) \
- ascii.$(OBJEXT) \
bignum.$(OBJEXT) \
class.$(OBJEXT) \
compar.$(OBJEXT) \
@@ -29,7 +34,6 @@ OBJS = array.$(OBJEXT) \
enum.$(OBJEXT) \
enumerator.$(OBJEXT) \
error.$(OBJEXT) \
- euc_jp.$(OBJEXT) \
eval.$(OBJEXT) \
eval_load.$(OBJEXT) \
proc.$(OBJEXT) \
@@ -57,14 +61,11 @@ OBJS = array.$(OBJEXT) \
regsyntax.$(OBJEXT) \
ruby.$(OBJEXT) \
signal.$(OBJEXT) \
- sjis.$(OBJEXT) \
sprintf.$(OBJEXT) \
st.$(OBJEXT) \
string.$(OBJEXT) \
struct.$(OBJEXT) \
time.$(OBJEXT) \
- unicode.$(OBJEXT) \
- utf8.$(OBJEXT) \
util.$(OBJEXT) \
variable.$(OBJEXT) \
version.$(OBJEXT) \
@@ -78,6 +79,7 @@ OBJS = array.$(OBJEXT) \
cont.$(OBJEXT) \
id.$(OBJEXT) \
prelude.$(OBJEXT) \
+ $(ENCOBJS) \
$(MISSING)
SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
@@ -383,8 +385,6 @@ win32.$(OBJEXT): {$(VPATH)}win32.c
array.$(OBJEXT): {$(VPATH)}array.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
{$(VPATH)}util.h {$(VPATH)}st.h
-ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
bignum.$(OBJEXT): {$(VPATH)}bignum.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
class.$(OBJEXT): {$(VPATH)}class.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
@@ -415,8 +415,6 @@ error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}st.h {$(VPATH)}vm_opts.h {$(VPATH)}signal.h \
{$(VPATH)}vm_core.h {$(VPATH)}id.h {$(VPATH)}node.h {$(VPATH)}debug.h \
{$(VPATH)}thread_$(THREAD_MODEL).h
-euc_jp.$(OBJEXT): {$(VPATH)}euc_jp.c {$(VPATH)}regenc.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_error.ci {$(VPATH)}eval_intern.h \
{$(VPATH)}eval_method.ci {$(VPATH)}eval_safe.ci {$(VPATH)}eval_jump.ci \
{$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}vm_core.h {$(VPATH)}id.h \
@@ -518,8 +516,6 @@ signal.$(OBJEXT): {$(VPATH)}signal.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}signal.h {$(VPATH)}vm_core.h {$(VPATH)}id.h {$(VPATH)}node.h \
{$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
{$(VPATH)}thread_$(THREAD_MODEL).h
-sjis.$(OBJEXT): {$(VPATH)}sjis.c {$(VPATH)}regenc.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
sprintf.$(OBJEXT): {$(VPATH)}sprintf.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
{$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \
@@ -544,10 +540,6 @@ cont.$(OBJEXT): {$(VPATH)}cont.c {$(VPATH)}eval_intern.h \
{$(VPATH)}signal.h {$(VPATH)}st.h {$(VPATH)}dln.h
time.$(OBJEXT): {$(VPATH)}time.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h
-unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regenc.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
-utf8.$(OBJEXT): {$(VPATH)}utf8.c {$(VPATH)}regenc.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
util.$(OBJEXT): {$(VPATH)}util.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
{$(VPATH)}util.h
@@ -595,6 +587,17 @@ blockinlining.$(OBJEXT): {$(VPATH)}blockinlining.c \
id.$(OBJEXT): {$(VPATH)}id.c {$(VPATH)}ruby.h
prelude.$(OBJEXT): {$(VPATH)}prelude.c {$(VPATH)}ruby.h {$(VPATH)}vm_core.h
+ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h \
+ {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
+euc_jp.$(OBJEXT): {$(VPATH)}euc_jp.c {$(VPATH)}regenc.h \
+ {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
+sjis.$(OBJEXT): {$(VPATH)}sjis.c {$(VPATH)}regenc.h \
+ {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
+unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regenc.h \
+ {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
+utf8.$(OBJEXT): {$(VPATH)}utf8.c {$(VPATH)}regenc.h \
+ {$(VPATH)}oniguruma.h {$(VPATH)}config.h {$(VPATH)}defines.h
+
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc \
vmtc.inc vm.inc
@@ -625,7 +628,7 @@ incs: $(INSNS) node_name.inc
node_name.inc: {$(VPATH)}node.h
$(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@
-prelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb
+{$(VPATH)}prelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb
$(BASERUBY) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@
prereq: incs prelude.c
diff --git a/ascii.c b/enc/ascii.c
index 894cea4..894cea4 100644
--- a/ascii.c
+++ b/enc/ascii.c
diff --git a/euc_jp.c b/enc/euc_jp.c
index f48c904..f48c904 100644
--- a/euc_jp.c
+++ b/enc/euc_jp.c
diff --git a/sjis.c b/enc/sjis.c
index fbfddcc..fbfddcc 100644
--- a/sjis.c
+++ b/enc/sjis.c
diff --git a/unicode.c b/enc/unicode.c
index 8b1a130..8b1a130 100644
--- a/unicode.c
+++ b/enc/unicode.c
diff --git a/utf8.c b/enc/utf8.c
index 3add59f..3add59f 100644
--- a/utf8.c
+++ b/enc/utf8.c
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 0f4d717..63a2265 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -202,7 +202,7 @@ MINIOBJS = dmydln.$(OBJEXT)
arch_hdrdir = $(EXTOUT)/include/$(arch)
hdrdir = $(srcdir)/include
-VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(srcdir)/win32
+VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/missing;$(srcdir)/win32
all: $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk
@@ -547,6 +547,8 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: $(RBCONFIG)
-so_name=$(RUBY_SO_NAME) \
. $(icondirs) $(srcdir)/win32
+{$(srcdir)/enc}.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)/missing}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)/win32}.c.obj:
diff --git a/wince/Makefile.sub b/wince/Makefile.sub
index d8f1f86..63a3068 100644
--- a/wince/Makefile.sub
+++ b/wince/Makefile.sub
@@ -28,7 +28,6 @@ iconinc=-I$(icondirs: = -I)
!endif
###############
-VPATH = $(srcdir);$(srcdir)/missing;$(srcdir)/wince
.SUFFIXES: .y .def .lib
!if !defined(CC)
@@ -185,6 +184,10 @@ INSTALLED_LIST= .installed.list
WINMAINOBJ = wincemain.$(OBJEXT)
+arch_hdrdir = $(EXTOUT)/include/$(arch)
+hdrdir = $(srcdir)/include
+VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/missing;$(srcdir)/wince
+
all: $(srcdir)/wince/Makefile.sub $(srcdir)/common.mk
ruby: $(PROGRAM)
@@ -490,6 +493,8 @@ class File
end
<<KEEP
+{$(srcdir)/enc}.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)/missing}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)/win32}.c.obj: