This is an archive of the discontinued LLVM Phabricator instance.

Deprecate in-source autoconf builds
ClosedPublic

Authored by jroelofs on Apr 29 2015, 2:28 PM.

Details

Summary

(CC-ing cfe-commits even though this is an LLVM patch... it affects both projects)

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

Diff Detail

Event Timeline

jroelofs updated this revision to Diff 24657.Apr 29 2015, 2:28 PM
jroelofs retitled this revision from to Deprecate in-source autoconf builds.
jroelofs updated this object.
jroelofs edited the test plan for this revision. (Show Details)
jroelofs added reviewers: echristo, nlewycky.
jroelofs added subscribers: Unknown Object (MLST), Unknown Object (MLST).

Jonathan Roelofs wrote:

Hi echristo, nlewycky,

(CC-ing cfe-commits even though this is an LLVM patch... it affects both projects)

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

Thanks for doing this! The patch LGTM. Eric?

http://reviews.llvm.org/D9351

Files:

Makefile.config.in
autoconf/configure.ac
configure

Index: Makefile.config.in

  • Makefile.config.in

+++ Makefile.config.in
@@ -58,6 +58,22 @@

PROJ_SRC_ROOT   := $(LLVM_SRC_ROOT)
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
+ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT))
+ $(warning ##################)
+ $(warning # #)
+ $(warning # WARNING #)
+ $(warning # #)
+ $(warning # In-source builds are deprecated. #)
+ $(warning # #)
+ $(warning # Please configure from a separate build directory! #)
+ $(warning # #)
+ $(warning ##################)
+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))

Index: autoconf/configure.ac

  • autoconf/configure.ac

+++ autoconf/configure.ac
@@ -73,6 +73,19 @@

  fi
fi

+dnl Quit if it is an in-source build
+if test ${srcdir} == "." ; then
+ AC_MSG_WARN([******************])
+ 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
+

dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,
dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc).
: ${CFLAGS=}

Index: configure

  • configure

+++ configure
@@ -2030,6 +2030,27 @@

  fi
fi

+if test ${srcdir} == "." ; then
+ { echo "$as_me:$LINENO: WARNING: ******************">&5
+echo "$as_me: WARNING: ******************">&2;}
+ { echo "$as_me:$LINENO: WARNING: * *">&5
+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
+

: ${CFLAGS=}
: ${CXXFLAGS=}

EMAIL PREFERENCES

http://reviews.llvm.org/settings/panel/emailpreferences/

llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

echristo edited edge metadata.May 2 2015, 10:35 PM

LGTM. Was just waiting on Nick's ok.

jroelofs accepted this revision.May 3 2015, 7:13 PM
jroelofs added a reviewer: jroelofs.

Cool. r236399.

This revision is now accepted and ready to land.May 3 2015, 7:13 PM
jroelofs closed this revision.May 3 2015, 7:14 PM