[PATCH] Discourage in-source autoconf builds (as we already do for the cmake build)

Jonathan Roelofs jonathan at codesourcery.com
Fri Feb 27 14:22:19 PST 2015


Hi joey,

http://reviews.llvm.org/D7961

Files:
  Makefile.config.in

Index: Makefile.config.in
===================================================================
--- Makefile.config.in
+++ Makefile.config.in
@@ -58,6 +58,10 @@
 PROJ_SRC_ROOT   := $(LLVM_SRC_ROOT)
 PROJ_SRC_DIR    := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))
 
+ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT))
+$(error In-source builds are discouraged. Configure from a separate build directory)
+endif
+
 ifneq ($(CLANG_SRC_ROOT),)
   CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT))
   PROJ_SRC_DIR  := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR))

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7961.20901.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150227/e622e3c0/attachment.bin>


More information about the llvm-commits mailing list