Disallow in-source builds (as we already do for the cmake build).

http://reviews.llvm.org/D10614


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jonathan Roelofs 2015-07-01 18:09:21 +00:00
parent b99e0eb947
commit 4b64e72fdd
3 changed files with 5 additions and 39 deletions

View File

@ -58,20 +58,9 @@ LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@)
PROJ_SRC_ROOT := $(LLVM_SRC_ROOT) PROJ_SRC_ROOT := $(LLVM_SRC_ROOT)
PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)) PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))
# FIXME: This is temporary during the grace period where in-source builds are
# deprecated. Convert to a hard error when that period is up.
#
# See: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html # See: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html
ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT)) ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT))
$(warning ######################################################################################) $(error In-source builds are not allowed. Please configure from a separate build directory!)
$(warning # #)
$(warning # WARNING #)
$(warning # #)
$(warning # In-source builds are deprecated. #)
$(warning # #)
$(warning # Please configure from a separate build directory! #)
$(warning # #)
$(warning ######################################################################################)
endif endif
ifneq ($(CLANG_SRC_ROOT),) ifneq ($(CLANG_SRC_ROOT),)

View File

@ -75,15 +75,7 @@ fi
dnl Quit if it is an in-source build dnl Quit if it is an in-source build
if test ${srcdir} == "." ; then if test ${srcdir} == "." ; then
AC_MSG_WARN([**************************************************************************************]) AC_MSG_ERROR([In-source builds are not allowed. Please configure from a separate build directory!])
AC_MSG_WARN([* *])
AC_MSG_WARN([* WARNING *])
AC_MSG_WARN([* *])
AC_MSG_WARN([* In-source builds are deprecated. *])
AC_MSG_WARN([* *])
AC_MSG_WARN([* Please configure from a separate build directory! *])
AC_MSG_WARN([* *])
AC_MSG_WARN([**************************************************************************************])
fi fi
dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS, dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,

21
configure vendored
View File

@ -2033,24 +2033,9 @@ echo "$as_me: error: Already configured in ${srcdir}" >&2;}
fi fi
if test ${srcdir} == "." ; then if test ${srcdir} == "." ; then
{ echo "$as_me:$LINENO: WARNING: **************************************************************************************" >&5 { { echo "$as_me:$LINENO: error: In-source builds are not allowed. Please configure from a separate build directory!" >&5
echo "$as_me: WARNING: **************************************************************************************" >&2;} echo "$as_me: error: In-source builds are not allowed. Please configure from a separate build directory!" >&2;}
{ echo "$as_me:$LINENO: WARNING: * *" >&5 { (exit 1); exit 1; }; }
echo "$as_me: WARNING: * *" >&2;}
{ echo "$as_me:$LINENO: WARNING: * WARNING *" >&5
echo "$as_me: WARNING: * WARNING *" >&2;}
{ echo "$as_me:$LINENO: WARNING: * *" >&5
echo "$as_me: WARNING: * *" >&2;}
{ echo "$as_me:$LINENO: WARNING: * In-source builds are deprecated. *" >&5
echo "$as_me: WARNING: * In-source builds are deprecated. *" >&2;}
{ echo "$as_me:$LINENO: WARNING: * *" >&5
echo "$as_me: WARNING: * *" >&2;}
{ echo "$as_me:$LINENO: WARNING: * Please configure from a separate build directory! *" >&5
echo "$as_me: WARNING: * Please configure from a separate build directory! *" >&2;}
{ echo "$as_me:$LINENO: WARNING: * *" >&5
echo "$as_me: WARNING: * *" >&2;}
{ echo "$as_me:$LINENO: WARNING: **************************************************************************************" >&5
echo "$as_me: WARNING: **************************************************************************************" >&2;}
fi fi
: ${CFLAGS=} : ${CFLAGS=}