diff --git a/ChangeLog b/ChangeLog index 21cdcbedf9..16846bd73d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Oct 11 06:35:43 2007 Nobuyoshi Nakada + + * 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 * include/ruby/oniguruma.h (OnigEncodingTypeST): add OnigEncoding diff --git a/Makefile.in b/Makefile.in index 4c110cd902..2c5b4b23a9 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 915b16015e..e18702e360 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 86a6461987..73207ef5ed 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 similarity index 100% rename from ascii.c rename to enc/ascii.c diff --git a/euc_jp.c b/enc/euc_jp.c similarity index 100% rename from euc_jp.c rename to enc/euc_jp.c diff --git a/sjis.c b/enc/sjis.c similarity index 100% rename from sjis.c rename to enc/sjis.c diff --git a/unicode.c b/enc/unicode.c similarity index 100% rename from unicode.c rename to enc/unicode.c diff --git a/utf8.c b/enc/utf8.c similarity index 100% rename from utf8.c rename to enc/utf8.c diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 0f4d7172fa..63a22650f3 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 d8f1f8612e..63a3068d77 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 <