diff --git a/common.mk b/common.mk index c017900f19..49d38149f5 100644 --- a/common.mk +++ b/common.mk @@ -1189,10 +1189,10 @@ $(REVISION_H): revision.tmp $(srcdir)/ext/ripper/ripper.c: $(srcdir)/ext/ripper/tools/preproc.rb $(srcdir)/parse.y id.h $(srcdir)/ext/ripper/depend $(ECHO) generating $@ - $(Q) VPATH=$${PWD-`pwd`} && $(CHDIR) $(@D) && \ + $(Q) $(CHDIR) $(@D) && \ sed -e 's/{\$$([^(){}]*)[^{}]*}//g' -e /AUTOGENERATED/q depend | \ $(exec) $(MAKE) -f - $(mflags) \ - Q=$(Q) ECHO=$(ECHO) RM="$(RM)" BISON=$(YACC) top_srcdir=../.. srcdir=. VPATH="$${VPATH}" \ + Q=$(Q) ECHO=$(ECHO) RM="$(RM1)" BISON=$(YACC) top_srcdir=../.. srcdir=. VPATH=../.. \ RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)" LANG=C $(srcdir)/ext/json/parser/parser.c: $(srcdir)/ext/json/parser/parser.rl $(srcdir)/ext/json/parser/prereq.mk diff --git a/template/Makefile.in b/template/Makefile.in index 666cbc3481..b0e987bba0 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -208,6 +208,7 @@ MAKEDIRS = @MKDIR_P@ CP = cp MV = mv RM = rm -f +RM1 = $(RM) RMDIR = @RMDIR@ RMDIRS = @RMDIRS@ RMALL = @RMALL@ diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 760f919b23..a610577603 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -89,6 +89,7 @@ RMALL = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat -f -r MAKEDIRS = $(COMSPEC) /E:ON /C $(srcdir:/=\)\win32\makedirs.bat CP = copy > nul MV = move > nul +RM1 = del /f /q !if !defined(BASERUBY) BASERUBY = ruby !endif