diff --git a/com.oracle.truffle.r.native/builtinlibs/Makefile b/com.oracle.truffle.r.native/builtinlibs/Makefile index cb12f95b38c02b4bbdcf1a2161a126837999a6db..723a87ff996a88ab959e4e90d4fde44c2d1cc328 100644 --- a/com.oracle.truffle.r.native/builtinlibs/Makefile +++ b/com.oracle.truffle.r.native/builtinlibs/Makefile @@ -28,7 +28,9 @@ # that refers to GnuR-internal symbols. # +ifneq ($(MAKECMDGOALS),clean) include $(TOPDIR)/platform.mk +endif .PHONY: all clean cleanlib cleanobj force libr diff --git a/com.oracle.truffle.r.native/fficall/jni/Makefile b/com.oracle.truffle.r.native/fficall/jni/Makefile index 273f98512c54180795a018befdeb8cc0ce1e629d..3f14954c3d05028a97f150177b016fb825426240 100644 --- a/com.oracle.truffle.r.native/fficall/jni/Makefile +++ b/com.oracle.truffle.r.native/fficall/jni/Makefile @@ -25,7 +25,9 @@ ifeq ($(TOPDIR),) TOPDIR = $(abspath ../..) endif +ifneq ($(MAKECMDGOALS),clean) include $(TOPDIR)/platform.mk +endif .PHONY: all clean diff --git a/com.oracle.truffle.r.native/gnur/Makefile.gnur b/com.oracle.truffle.r.native/gnur/Makefile.gnur index c5c581f7edf8e4437233f6d190d50ef10939a795..108538b086c6ca8e1a27d811fef703e16a1de343 100644 --- a/com.oracle.truffle.r.native/gnur/Makefile.gnur +++ b/com.oracle.truffle.r.native/gnur/Makefile.gnur @@ -77,6 +77,11 @@ build: $(GNUR_DIR)/bin/R $(GNUR_DIR)/bin/R: $(GNUR_DIR)/Makeconf (cd $(GNUR_DIR); make >& gnur_make.log) +HAVE_MAKEFILE := $(shell [ -f $(GNUR_DIR)/Makefile ] && echo "Makefile.exists") +ifeq ($(HAVE_MAKEFILE),Makefile.exists) clean: rm -f Makeconf.done (cd $(GNUR_DIR); make distclean) +else +clean: +endif diff --git a/com.oracle.truffle.r.native/gnur/Makefile.libs b/com.oracle.truffle.r.native/gnur/Makefile.libs index ca45fa3b5ac046e2ea5e6c6074bc72f62f645600..43739766d25a33931b64a66ecc3cf120b5b94f43 100644 --- a/com.oracle.truffle.r.native/gnur/Makefile.libs +++ b/com.oracle.truffle.r.native/gnur/Makefile.libs @@ -23,7 +23,9 @@ # Copies the Blas and lapack libraries and builds the pcre library +ifneq ($(MAKECMDGOALS),clean) include $(TOPDIR)/platform.mk +endif TARGET_DIR := $(TOPDIR)/builtinlibs/lib BLAS_TARGET := $(TARGET_DIR)/libRblas$(DYLIB_EXT) diff --git a/com.oracle.truffle.r.native/library/lib.mk b/com.oracle.truffle.r.native/library/lib.mk index 4e129f6588410f8e9a9408c8d75b6d11c0927112..c9322d1ca0ae2f2ae5bc9f6dafe05c5399e7a0f7 100644 --- a/com.oracle.truffle.r.native/library/lib.mk +++ b/com.oracle.truffle.r.native/library/lib.mk @@ -30,7 +30,9 @@ # A package that requires special processing before the library is built should # define LIB_PKG_PRE and for post processing define LIB_PKG_POST +ifneq ($(MAKECMDGOALS),clean) include $(TOPDIR)/platform.mk +endif .PHONY: all clean cleanlib cleanobj force libr libcommon diff --git a/com.oracle.truffle.r.test.native/packages/testrffi/src/src/Makefile b/com.oracle.truffle.r.test.native/packages/testrffi/src/src/Makefile index ca69da5ac04840c5c2c7f814fb20b0d48b5905f3..4419b3fcf6ca589a9fce7750a9e473ddb0d5cfe8 100644 --- a/com.oracle.truffle.r.test.native/packages/testrffi/src/src/Makefile +++ b/com.oracle.truffle.r.test.native/packages/testrffi/src/src/Makefile @@ -29,7 +29,9 @@ C_OBJECTS := $(C_SOURCES:.c=.o) C_LIB := testrffi.so NATIVE_PROJECT=$(FASTR_HOME)/com.oracle.truffle.r.native +ifneq ($(MAKECMDGOALS),clean) include $(NATIVE_PROJECT)/platform.mk +endif ifeq ($(FASTR_INSTALL), GNUR) INCLUDES := -I $(R_HOME)/include diff --git a/com.oracle.truffle.r.test.native/urand/Makefile b/com.oracle.truffle.r.test.native/urand/Makefile index 65bb933d03492b3a15894ce6d684d6a19fa1c441..4fe68d6161ab4deca02ae284c9f326733b4ee0cc 100644 --- a/com.oracle.truffle.r.test.native/urand/Makefile +++ b/com.oracle.truffle.r.test.native/urand/Makefile @@ -27,7 +27,9 @@ endif NATIVE_PROJECT = $(subst test.native,native,$(TOPDIR)) +ifneq ($(MAKECMDGOALS),clean) include $(NATIVE_PROJECT)/platform.mk +endif .PHONY: all clean diff --git a/com.oracle.truffle.r.test/rpackages/rffi/testrffi/src/Makefile b/com.oracle.truffle.r.test/rpackages/rffi/testrffi/src/Makefile index 73ab7c69aa06a6946d2b577df850a4b6a1b7cb3f..abd870b1148f9c7826a34e9d4da7bb2df52f9273 100644 --- a/com.oracle.truffle.r.test/rpackages/rffi/testrffi/src/Makefile +++ b/com.oracle.truffle.r.test/rpackages/rffi/testrffi/src/Makefile @@ -29,7 +29,9 @@ C_OBJECTS := $(C_SOURCES:.c=.o) C_LIB := testrffi.so NATIVE_PROJECT=$(FASTR_HOME)/com.oracle.truffle.r.native +ifneq ($(MAKECMDGOALS),clean) include $(NATIVE_PROJECT)/platform.mk +endif ifeq ($(FASTR_INSTALL), GNUR) INCLUDES := -I $(R_HOME)/include