summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in1
-rw-r--r--common.mk2
-rw-r--r--win32/Makefile.sub5
3 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index e0de480..ccfb2de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -209,6 +209,7 @@ INSTALLED_LIST= .installed.list
NEWLINE_C = enc/trans/newline.c
MINIPRELUDE_C = miniprelude.c
PRELUDE_C = prelude.c
+GOLF_PRELUDE_C= golf_prelude.c
RBCONFIG = .rbconfig.time
MAINSRC = $(MAINOBJ:@OBJEXT@=c)
diff --git a/common.mk b/common.mk
index acb3d7f..eee2067 100644
--- a/common.mk
+++ b/common.mk
@@ -1012,7 +1012,7 @@ $(PRELUDE_C): $(COMPILE_PRELUDE) \
$(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
$(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS)
-{$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb
+$(GOLF_PRELUDE_C): $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb
$(ECHO) generating $@
$(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
$(srcdir)/template/prelude.c.tmpl golf_prelude.rb
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 61d492a..0a5bb14 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -505,6 +505,11 @@ PRELUDE_C = $(srcdir)/prelude.c
!else
PRELUDE_C = prelude.c
!endif
+!if !exist(golf_prelude.c) && exist($(srcdir)/golf_prelude.c)
+GOLF_PRELUDE_C = $(srcdir)/golf_prelude.c
+!else
+GOLF_PRELUDE_C = golf_prelude.c
+!endif
RBCONFIG = ./.rbconfig.time
!include $(srcdir)/common.mk