Skip to content

Commit 949d55d

Browse files
committed
Deprecate in-source autotools builds
This is a followup from: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html Upgrade instructions: $ mv llvm/include/llvm/Config/config.h ./config.h.BACKUP # copy the configure line from line 7 of llvm/config.log # (for example: `$ ./configure --no-create --no-recursion`) $ mkdir build $ cd build # run the configure line, but this time with '../llvm' at the beginning: $ ../llvm/configure --no-create --no-recursion These warnings will soon be turned into hard errors after a week. Speak up now if this is going to be a problem for you. llvm-svn: 236399
1 parent 23fdafe commit 949d55d

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

llvm/Makefile.config.in

+16
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,22 @@ LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@)
5858
PROJ_SRC_ROOT := $(LLVM_SRC_ROOT)
5959
PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))
6060

61+
# FIXME: This is temporary during the grace period where in-source builds are
62+
# deprecated. Convert to a hard error when that period is up.
63+
#
64+
# See: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html
65+
ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT))
66+
$(warning ######################################################################################)
67+
$(warning # #)
68+
$(warning # WARNING #)
69+
$(warning # #)
70+
$(warning # In-source builds are deprecated. #)
71+
$(warning # #)
72+
$(warning # Please configure from a separate build directory! #)
73+
$(warning # #)
74+
$(warning ######################################################################################)
75+
endif
76+
6177
ifneq ($(CLANG_SRC_ROOT),)
6278
CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT))
6379
PROJ_SRC_DIR := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR))

llvm/autoconf/configure.ac

+13
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ if test ${srcdir} != "." ; then
7373
fi
7474
fi
7575

76+
dnl Quit if it is an in-source build
77+
if test ${srcdir} == "." ; then
78+
AC_MSG_WARN([**************************************************************************************])
79+
AC_MSG_WARN([* *])
80+
AC_MSG_WARN([* WARNING *])
81+
AC_MSG_WARN([* *])
82+
AC_MSG_WARN([* In-source builds are deprecated. *])
83+
AC_MSG_WARN([* *])
84+
AC_MSG_WARN([* Please configure from a separate build directory! *])
85+
AC_MSG_WARN([* *])
86+
AC_MSG_WARN([**************************************************************************************])
87+
fi
88+
7689
dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,
7790
dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc).
7891
: ${CFLAGS=}

llvm/configure

+21
Original file line numberDiff line numberDiff line change
@@ -2030,6 +2030,27 @@ echo "$as_me: error: Already configured in ${srcdir}" >&2;}
20302030
fi
20312031
fi
20322032

2033+
if test ${srcdir} == "." ; then
2034+
{ echo "$as_me:$LINENO: WARNING: **************************************************************************************" >&5
2035+
echo "$as_me: WARNING: **************************************************************************************" >&2;}
2036+
{ echo "$as_me:$LINENO: WARNING: * *" >&5
2037+
echo "$as_me: WARNING: * *" >&2;}
2038+
{ echo "$as_me:$LINENO: WARNING: * WARNING *" >&5
2039+
echo "$as_me: WARNING: * WARNING *" >&2;}
2040+
{ echo "$as_me:$LINENO: WARNING: * *" >&5
2041+
echo "$as_me: WARNING: * *" >&2;}
2042+
{ echo "$as_me:$LINENO: WARNING: * In-source builds are deprecated. *" >&5
2043+
echo "$as_me: WARNING: * In-source builds are deprecated. *" >&2;}
2044+
{ echo "$as_me:$LINENO: WARNING: * *" >&5
2045+
echo "$as_me: WARNING: * *" >&2;}
2046+
{ echo "$as_me:$LINENO: WARNING: * Please configure from a separate build directory! *" >&5
2047+
echo "$as_me: WARNING: * Please configure from a separate build directory! *" >&2;}
2048+
{ echo "$as_me:$LINENO: WARNING: * *" >&5
2049+
echo "$as_me: WARNING: * *" >&2;}
2050+
{ echo "$as_me:$LINENO: WARNING: **************************************************************************************" >&5
2051+
echo "$as_me: WARNING: **************************************************************************************" >&2;}
2052+
fi
2053+
20332054
: ${CFLAGS=}
20342055
: ${CXXFLAGS=}
20352056

0 commit comments

Comments
 (0)