From 1d9234f3d5c7a843289425e1a2f5133852989f5a Mon Sep 17 00:00:00 2001
From: Mick Jordan <mick.jordan@oracle.com>
Date: Sun, 12 Apr 2015 13:44:35 -0700
Subject: [PATCH] test warning fix; remove GnuR on clean

---
 com.oracle.truffle.r.native/gnur/Makefile.gnur             | 7 +------
 com.oracle.truffle.r.native/library/stats/Makefile         | 2 ++
 .../truffle/r/test/library/base/TestSimpleBuiltins.java    | 2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/com.oracle.truffle.r.native/gnur/Makefile.gnur b/com.oracle.truffle.r.native/gnur/Makefile.gnur
index 713a88d81b..f432c5eb81 100644
--- a/com.oracle.truffle.r.native/gnur/Makefile.gnur
+++ b/com.oracle.truffle.r.native/gnur/Makefile.gnur
@@ -74,13 +74,8 @@ build: $(GNUR_HOME)/bin/R
 $(GNUR_HOME)/bin/R: $(GNUR_HOME)/Makeconf 
 	(cd $(GNUR_HOME); make >& gnur_make.log)
 
-HAVE_MAKEFILE := $(shell [ -f $(GNUR_HOME)/Makefile ] && echo "Makefile.exists")
 clean: cleangnur
 	rm -f Makeconf.done
 
-ifeq ($(HAVE_MAKEFILE),Makefile.exists)
 cleangnur:
-	(cd $(GNUR_HOME); make distclean)
-else
-cleangnur:
-endif
+	rm -rf R-$(R_VERSION)
diff --git a/com.oracle.truffle.r.native/library/stats/Makefile b/com.oracle.truffle.r.native/library/stats/Makefile
index c2f5b3642e..38f19a3912 100644
--- a/com.oracle.truffle.r.native/library/stats/Makefile
+++ b/com.oracle.truffle.r.native/library/stats/Makefile
@@ -40,6 +40,8 @@ C_SOURCES := $(C_SOURCES) $(SRC)/fft.c
 C_OBJECTS := $(C_OBJECTS) $(OBJ)/fft.o
 endif
 
+$(C_OBJECTS): | $(OBJ)
+
 $(SRC)/fft.c: $(GNUR_FFT) src/ed_fft
 	ed $(GNUR_FFT) < src/ed_fft
 
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleBuiltins.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleBuiltins.java
index dc283a7a43..f49d404c59 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleBuiltins.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleBuiltins.java
@@ -1677,7 +1677,7 @@ public class TestSimpleBuiltins extends TestBase {
         assertEval("{ gsub(\"a\",\"aa\", \"prague alley\", fixed=TRUE) }");
         assertEval("{ sub(\"a\",\"aa\", \"prague alley\", fixed=TRUE) }");
         assertEval("{ gsub(\"a\",\"aa\", \"prAgue alley\", fixed=TRUE) }");
-        assertEval("{ gsub(\"a\",\"aa\", \"prAgue alley\", fixed=TRUE, ignore.case=TRUE) }");
+        assertEval(Output.ContainsWarning, "{ gsub(\"a\",\"aa\", \"prAgue alley\", fixed=TRUE, ignore.case=TRUE) }");
         assertEval("{ gsub(\"([a-e])\",\"\\\\1\\\\1\", \"prague alley\") }");
         assertEval("{ gsub(\"h\",\"\", c(\"hello\", \"hi\", \"bye\")) }");
         assertEval("{ gsub(\"h\",\"\", c(\"hello\", \"hi\", \"bye\"), fixed=TRUE) }");
-- 
GitLab