From ddc7bcd60eaa0e470bf2837af31992f1599ef41f Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 26 Mar 2012 05:08:55 +0000 Subject: [PATCH] * win32/Makefile.sub (newline.c, miniprelude.c): search from source directory, not depending on VPATH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- Makefile.in | 3 +++ common.mk | 8 ++++---- win32/Makefile.sub | 11 +++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index f68302e8df..ff6ad9e54e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -148,6 +148,9 @@ INSTALLED_LIST= .installed.list MKMAIN_CMD = mkmain.sh +NEWLINE_C = newline.c +MINIPRELUDE_C = miniprelude.c + SRC_FILE = $< MESSAGE_BEGIN = @for line in diff --git a/common.mk b/common.mk index 72791d9be1..a5a490054c 100644 --- a/common.mk +++ b/common.mk @@ -773,9 +773,9 @@ unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regint.h \ utf_8.$(OBJEXT): {$(VPATH)}utf_8.c {$(VPATH)}regenc.h {$(VPATH)}config.h \ {$(VPATH)}oniguruma.h {$(VPATH)}missing.h -newline.c: $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb - $(Q) $(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo newline.c $(srcdir)/enc/trans/newline.trans -newline.$(OBJEXT): {$(VPATH)}newline.c {$(VPATH)}defines.h \ +$(NEWLINE_C): $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb + $(Q) $(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo $@ $(srcdir)/enc/trans/newline.trans +newline.$(OBJEXT): $(NEWLINE_C) {$(VPATH)}defines.h \ {$(VPATH)}intern.h {$(VPATH)}missing.h {$(VPATH)}st.h \ {$(VPATH)}transcode_data.h {$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}subst.h @@ -835,7 +835,7 @@ known_errors.inc: $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_ $(ECHO) generating $@ $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -c -o $@ $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def -miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb +$(MINIPRELUDE_C): $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $(ECHO) generating $@ $(Q) $(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@ diff --git a/win32/Makefile.sub b/win32/Makefile.sub index eba330b361..a796b32356 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -370,6 +370,17 @@ ruby: $(PROGRAM) rubyw: $(WPROGRAM) stub: $(STUBPROGRAM) +!if !exist(newline.c) && exist($(srcdir)/newline.c) +NEWLINE_C = $(srcdir)/newline.c +!else +NEWLINE_C = newline.c +!endif +!if !exist(miniprelude.c) && exist($(srcdir)/miniprelude.c) +MINIPRELUDE_C = $(srcdir)/miniprelude.c +!else +MINIPRELUDE_C = miniprelude.c +!endif + !include $(srcdir)/common.mk !ifdef SCRIPTPROGRAMS