[llvm-commits] [support] r39955 [1/3] - in /support/trunk: ./ autoconf/ autoconf/m4/ include/ include/llvm/ include/llvm/ADT/ include/llvm/Config/ include/llvm/Support/ include/llvm/System/ lib/ lib/Support/ lib/System/
Reid Spencer
rspencer at reidspencer.com
Mon Jul 16 21:29:52 PDT 2007
Author: reid
Date: Mon Jul 16 23:29:52 2007
New Revision: 39955
URL: http://llvm.org/viewvc/llvm-project?rev=39955&view=rev
Log:
First version of the support module that can configure and build. The makefile
system has been simplified as a result of not having to care about all the
things that the llvm module cares about.
Added:
support/trunk/Makefile
- copied, changed from r39951, llvm/trunk/Makefile
support/trunk/Makefile.common
- copied, changed from r39951, llvm/trunk/Makefile.common
support/trunk/Makefile.config.in
- copied, changed from r39925, llvm/trunk/Makefile.config.in
support/trunk/Makefile.rules
- copied, changed from r39951, llvm/trunk/Makefile.rules
support/trunk/build-for-llvm-top.sh (with props)
support/trunk/configure (with props)
support/trunk/include/
support/trunk/include/llvm/
support/trunk/include/llvm/ADT/
support/trunk/include/llvm/ADT/hash_map.in
- copied unchanged from r39925, llvm/trunk/include/llvm/ADT/hash_map.in
support/trunk/include/llvm/ADT/hash_set.in
- copied unchanged from r39925, llvm/trunk/include/llvm/ADT/hash_set.in
support/trunk/include/llvm/ADT/iterator.in
- copied unchanged from r39925, llvm/trunk/include/llvm/ADT/iterator.in
support/trunk/include/llvm/Config/
support/trunk/include/llvm/Config/config.h.in
- copied, changed from r39925, llvm/trunk/include/llvm/Config/config.h.in
support/trunk/include/llvm/Support/
support/trunk/include/llvm/Support/DataTypes.h.in
- copied unchanged from r39925, llvm/trunk/include/llvm/Support/DataTypes.h.in
support/trunk/include/llvm/System/
support/trunk/lib/
support/trunk/lib/Makefile
- copied, changed from r39925, llvm/trunk/lib/Makefile
support/trunk/lib/Support/ (with props)
support/trunk/lib/Support/Makefile
- copied unchanged from r39951, llvm/trunk/lib/Support/Makefile
support/trunk/lib/System/ (with props)
support/trunk/lib/System/Makefile
- copied unchanged from r39925, llvm/trunk/lib/System/Makefile
Modified:
support/trunk/autoconf/configure.ac
support/trunk/autoconf/m4/config_makefile.m4
Copied: support/trunk/Makefile (from r39951, llvm/trunk/Makefile)
URL: http://llvm.org/viewvc/llvm-project/support/trunk/Makefile?p2=support/trunk/Makefile&p1=llvm/trunk/Makefile&r1=39951&r2=39955&rev=39955&view=diff
==============================================================================
--- llvm/trunk/Makefile (original)
+++ support/trunk/Makefile Mon Jul 16 23:29:52 2007
@@ -7,133 +7,8 @@
#
#===------------------------------------------------------------------------===#
+# This is the top level Makefile for the LLVM support module.
LEVEL := .
+DIRS := lib
-# Top-Level LLVM Build Stages:
-# 1. Build lib/System and lib/Support, which are used by utils (tblgen).
-# 2. Build utils, which is used by VMCore.
-# 3. Build VMCore, which builds the Intrinsics.inc file used by libs.
-# 4. Build libs, which are needed by llvm-config.
-# 5. Build llvm-config, which determines inter-lib dependencies for tools.
-# 6. Build tools, runtime, docs.
-#
-DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \
- tools runtime docs
-
-OPTIONAL_DIRS := examples projects
-EXTRA_DIST := test llvm.spec include win32 Xcode
-
-include $(LEVEL)/Makefile.config
-
-# llvm-gcc4 doesn't need runtime libs. llvm-gcc4 is the only supported one.
-# FIXME: Remove runtime entirely once we have an understanding of where
-# libprofile etc should go.
-#ifeq ($(LLVMGCC_MAJVERS),4)
- DIRS := $(filter-out runtime, $(DIRS))
-#endif
-
-ifeq ($(MAKECMDGOALS),libs-only)
- DIRS := $(filter-out tools runtime docs, $(DIRS))
- OPTIONAL_DIRS :=
-endif
-
-ifeq ($(MAKECMDGOALS),tools-only)
- DIRS := $(filter-out runtime docs, $(DIRS))
- OPTIONAL_DIRS :=
-endif
-
-# Don't install utils, examples, or projects they are only used to
-# build LLVM.
-ifeq ($(MAKECMDGOALS),install)
- DIRS := $(filter-out utils, $(DIRS))
- OPTIONAL_DIRS :=
-endif
-
-# Include the main makefile machinery.
-include $(LLVM_SRC_ROOT)/Makefile.rules
-
-# Specify options to pass to configure script when we're
-# running the dist-check target
-DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
-
-.PHONY: debug-opt-prof
-debug-opt-prof:
- $(Echo) Building Debug Version
- $(Verb) $(MAKE)
- $(Echo)
- $(Echo) Building Optimized Version
- $(Echo)
- $(Verb) $(MAKE) ENABLE_OPTIMIZED=1
- $(Echo)
- $(Echo) Building Profiling Version
- $(Echo)
- $(Verb) $(MAKE) ENABLE_PROFILING=1
-
-dist-hook::
- $(Echo) Eliminating files constructed by configure
- $(Verb) $(RM) -f \
- $(TopDistDir)/include/llvm/ADT/hash_map \
- $(TopDistDir)/include/llvm/ADT/hash_set \
- $(TopDistDir)/include/llvm/ADT/iterator \
- $(TopDistDir)/include/llvm/Config/config.h \
- $(TopDistDir)/include/llvm/Support/DataTypes.h \
- $(TopDistDir)/include/llvm/Support/ThreadSupport.h
-
-tools-only: all
-libs-only: all
-
-#------------------------------------------------------------------------
-# Make sure the generated headers are up-to-date. This must be kept in
-# sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
-#------------------------------------------------------------------------
-FilesToConfig := \
- include/llvm/Config/config.h \
- include/llvm/Support/DataTypes.h \
- include/llvm/ADT/hash_map \
- include/llvm/ADT/hash_set \
- include/llvm/ADT/iterator
-FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
-
-all-local:: $(FilesToConfigPATH)
-$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
- $(Echo) Regenerating $*
- $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
-.PRECIOUS: $(FilesToConfigPATH)
-
-# NOTE: This needs to remain as the last target definition in this file so
-# that it gets executed last.
-all::
- $(Echo) '*****' Completed $(BuildMode)$(AssertMode) Build
-ifeq ($(BuildMode),Debug)
- $(Echo) '*****' Note: Debug build can be 10 times slower than an
- $(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to
- $(Echo) '*****' make an optimized build.
-endif
-
-check-llvm2cpp:
- $(Verb)$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1
-
-check-one:
- $(Verb)$(MAKE) -C test check-one TESTONE=$(TESTONE)
-
-srpm: $(LLVM_OBJ_ROOT)/llvm.spec
- rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec
-
-rpm: $(LLVM_OBJ_ROOT)/llvm.spec
- rpmbuild -bb --target $(TARGET_TRIPLE) $(LLVM_OBJ_ROOT)/llvm.spec
-
-show-footprint:
- $(Verb) du -sk $(LibDir)
- $(Verb) du -sk $(ToolDir)
- $(Verb) du -sk $(ExmplDir)
- $(Verb) du -sk $(ObjDir)
-
-build-for-llvm-top:
- $(Verb) if test ! -f ./config.status ; then \
- ./configure --prefix="$(LLVM_TOP)/install" \
- --with-llvm-gcc="$(LLVM_TOP)/llvm-gcc" ; \
- fi
- $(Verb) $(MAKE) tools-only
-
-.PHONY: srpm rpm
-
+include $(LEVEL)/Makefile.common
Copied: support/trunk/Makefile.common (from r39951, llvm/trunk/Makefile.common)
URL: http://llvm.org/viewvc/llvm-project/support/trunk/Makefile.common?p2=support/trunk/Makefile.common&p1=llvm/trunk/Makefile.common&r1=39951&r2=39955&rev=39955&view=diff
==============================================================================
--- llvm/trunk/Makefile.common (original)
+++ support/trunk/Makefile.common Mon Jul 16 23:29:52 2007
@@ -57,14 +57,9 @@
#
# Configuration file to set paths specific to local installation of LLVM
#
-ifndef LLVM_OBJ_ROOT
include $(LEVEL)/Makefile.config
-else
-include $(LLVM_OBJ_ROOT)/Makefile.config
-endif
#
# Include all of the build rules used for making LLVM
#
-include $(LLVM_SRC_ROOT)/Makefile.rules
-
+include $(LLVM_TOP)/support/Makefile.rules
Copied: support/trunk/Makefile.config.in (from r39925, llvm/trunk/Makefile.config.in)
URL: http://llvm.org/viewvc/llvm-project/support/trunk/Makefile.config.in?p2=support/trunk/Makefile.config.in&p1=llvm/trunk/Makefile.config.in&r1=39925&r2=39955&rev=39955&view=diff
==============================================================================
--- llvm/trunk/Makefile.config.in (original)
+++ support/trunk/Makefile.config.in Mon Jul 16 23:29:52 2007
@@ -17,64 +17,29 @@
LLVMVersion := @PACKAGE_VERSION@
LLVM_CONFIGTIME := @LLVM_CONFIGTIME@
-###########################################################################
-# Directory Configuration
-# This section of the Makefile determines what is where. To be
-# specific, there are several locations that need to be defined:
-#
-# o LLVM_SRC_ROOT : The root directory of the LLVM source code.
-# o LLVM_OBJ_ROOT : The root directory containing the built LLVM code.
-#
-# o PROJ_SRC_DIR : The directory containing the code to build.
-# o PROJ_SRC_ROOT : The root directory of the code to build.
-#
-# o PROJ_OBJ_DIR : The directory in which compiled code will be placed.
-# o PROJ_OBJ_ROOT : The root directory in which compiled code is placed.
-#
-###########################################################################
-
-PWD := @BINPWD@
-# Set the project name to LLVM if its not defined
+# Set the project name to the package name if it isn't already defined
ifndef PROJECT_NAME
PROJECT_NAME := $(LLVMPackageName)
endif
-PROJ_OBJ_DIR := $(shell $(PWD))
-PROJ_OBJ_ROOT := $(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); $(PWD))
-
-ifeq ($(PROJECT_NAME),llvm)
-LLVM_SRC_ROOT := $(shell cd @abs_top_srcdir@; $(PWD))
-LLVM_OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD))
-PROJ_SRC_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(PWD))
-PROJ_SRC_DIR := $(shell cd $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD))
-prefix := @prefix@
-PROJ_prefix := $(prefix)
-PROJ_VERSION := $(LLVMVersion)
-else
-ifndef PROJ_SRC_ROOT
-$(error Projects must define PROJ_SRC_ROOT)
-endif
-ifndef PROJ_OBJ_ROOT
-$(error Projects must define PROJ_OBJ_ROOT)
-endif
-ifndef PROJ_INSTALL_ROOT
-$(error Projects must define PROJ_INSTALL_ROOT)
-endif
-ifndef LLVM_SRC_ROOT
-$(error Projects must define LLVM_SRC_ROOT)
-endif
-ifndef LLVM_OBJ_ROOT
-$(error Projects must define LLVM_OBJ_ROOT)
-endif
-PROJ_SRC_DIR := $(shell cd $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD))
-prefix := $(PROJ_INSTALL_ROOT)
-PROJ_prefix := $(prefix)
+# If the version number wasn't set, set it now to a default
ifndef PROJ_VERSION
PROJ_VERSION := 1.0
endif
-endif
-LLVMMAKE := $(LLVM_SRC_ROOT)/make
+# Get the directory at the top of all the llvm software (llvm-top).
+LLVM_TOP := @LLVM_TOP@
+
+# Get the pwd command so we can use it
+PWD := @BINPWD@
+
+# Get the source and object root directories
+SRC_ROOT := $(shell cd @abs_top_srcdir@; $(PWD))
+OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD))
+
+# Get the current directory we're going to build, obj and root
+OBJ_DIR := $(shell $(PWD))
+SRC_DIR := $(shell cd $(SRC_ROOT)/$(patsubst $(OBJ_ROOT)%,%,$(OBJ_DIR));$(PWD))
PROJ_bindir := $(DESTDIR)$(PROJ_prefix)/bin
PROJ_libdir := $(DESTDIR)$(PROJ_prefix)/lib
@@ -139,7 +104,7 @@
FLEX := @LEX@
GREP := @GREP@
INSTALL := @INSTALL@
-MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
+MKDIR := $(LLVM_TOP)/support/autoconf/mkinstalldirs
MV := @MV@
RANLIB := @RANLIB@
RM := @RM@
@@ -167,34 +132,6 @@
LIBS := @LIBS@
-# Path to location for LLVM C/C++ front-end. You can modify this if you
-# want to override the value set by configure.
-LLVMGCCDIR := @LLVMGCCDIR@
-
-# Determine the target for which LLVM should generate code.
-ifeq (@LLVMGCC_MAJVERS@,3)
-LLVMGCCARCH := @target@/3.4-llvm
-else
-LLVMGCCARCH := @target@/@LLVMGCC_VERSION@
-endif
-
-# Determine the path where the library executables are
-LLVMGCCLIBEXEC := @LLVMGCCLIBEXEC@
-
-# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
-LLVMGCC := @LLVMGCC@
-LLVMGXX := @LLVMGXX@
-LLVMCC1 := @LLVMCC1@
-LLVMCC1PLUS := @LLVMCC1PLUS@
-LLVMGCC_VERSION := @LLVMGCC_VERSION@
-LLVMGCC_MAJVERS := @LLVMGCC_MAJVERS@
-LLVMGCC_LANGS := @LLVMGCC_LANGS@
-
-# Path to directory where object files should be stored during a build.
-# Set OBJ_ROOT to "." if you do not want to use a separate place for
-# object files.
-OBJ_ROOT := .
-
# These are options that can either be enabled here, or can be enabled on the
# make command line (ie, make ENABLE_PROFILING=1):
Copied: support/trunk/Makefile.rules (from r39951, llvm/trunk/Makefile.rules)
URL: http://llvm.org/viewvc/llvm-project/support/trunk/Makefile.rules?p2=support/trunk/Makefile.rules&p1=llvm/trunk/Makefile.rules&r1=39951&r2=39955&rev=39955&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ support/trunk/Makefile.rules Mon Jul 16 23:29:52 2007
@@ -61,14 +61,14 @@
################################################################################
SrcMakefiles := $(filter %Makefile %Makefile.tests,\
- $(wildcard $(PROJ_SRC_DIR)/Makefile*))
-ObjMakefiles := $(subst $(PROJ_SRC_DIR),$(PROJ_OBJ_DIR),$(SrcMakefiles))
-ConfigureScript := $(PROJ_SRC_ROOT)/configure
-ConfigStatusScript := $(PROJ_OBJ_ROOT)/config.status
-MakefileConfigIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.config.in))
-MakefileCommonIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.common.in))
-MakefileConfig := $(PROJ_OBJ_ROOT)/Makefile.config
-MakefileCommon := $(PROJ_OBJ_ROOT)/Makefile.common
+ $(wildcard $(SRC_DIR)/Makefile*))
+ObjMakefiles := $(subst $(SRC_DIR),$(OBJ_DIR),$(SrcMakefiles))
+ConfigureScript := $(SRC_ROOT)/configure
+ConfigStatusScript := $(OBJ_ROOT)/config.status
+MakefileConfigIn := $(strip $(wildcard $(SRC_ROOT)/Makefile.config.in))
+MakefileCommonIn := $(strip $(wildcard $(SRC_ROOT)/Makefile.common.in))
+MakefileConfig := $(OBJ_ROOT)/Makefile.config
+MakefileCommon := $(OBJ_ROOT)/Makefile.common
PreConditions := $(ConfigStatusScript) $(ObjMakefiles)
ifneq ($(MakefileCommonIn),)
PreConditions += $(MakefileCommon)
@@ -90,10 +90,10 @@
-$(Verb) $(RM) -f $(BUILT_SOURCES)
endif
-ifneq ($(PROJ_OBJ_ROOT),$(PROJ_SRC_ROOT))
+ifneq ($(OBJ_ROOT),$(SRC_ROOT))
spotless:
$(Verb) if test -x config.status ; then \
- $(EchoCmd) Wiping out $(PROJ_OBJ_ROOT) ; \
+ $(EchoCmd) Wiping out $(OBJ_ROOT) ; \
$(MKDIR) .spotless.save ; \
$(MV) config.status .spotless.save ; \
$(MV) mklib .spotless.save ; \
@@ -103,11 +103,11 @@
$(MV) .spotless.save/mklib . ; \
$(MV) .spotless.save/projects . ; \
$(RM) -rf .spotless.save ; \
- $(EchoCmd) Rebuilding configuration of $(PROJ_OBJ_ROOT) ; \
+ $(EchoCmd) Rebuilding configuration of $(OBJ_ROOT) ; \
$(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
$(ConfigStatusScript) ; \
else \
- $(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
+ $(EchoCmd) "make spotless" can only be run from $(OBJ_ROOT); \
fi
else
spotless:
@@ -120,10 +120,10 @@
# Make sure we're not using a stale configuration
#------------------------------------------------------------------------
reconfigure:
- $(Echo) Reconfiguring $(PROJ_OBJ_ROOT)
- $(Verb) cd $(PROJ_OBJ_ROOT) && \
- if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
- $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
+ $(Echo) Reconfiguring $(OBJ_ROOT)
+ $(Verb) cd $(OBJ_ROOT) && \
+ if test -w $(OBJ_ROOT)/config.cache ; then \
+ $(RM) $(OBJ_ROOT)/config.cache ; \
fi ; \
$(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
$(ConfigStatusScript)
@@ -131,35 +131,53 @@
.PRECIOUS: $(ConfigStatusScript)
$(ConfigStatusScript): $(ConfigureScript)
$(Echo) Reconfiguring with $<
- $(Verb) cd $(PROJ_OBJ_ROOT) && \
- if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
- $(RM) $(PROJ_OBJ_ROOT)/config.cache ; \
+ $(Verb) cd $(OBJ_ROOT) && \
+ if test -w $(OBJ_ROOT)/config.cache ; then \
+ $(RM) $(OBJ_ROOT)/config.cache ; \
fi ; \
$(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
$(ConfigStatusScript)
#------------------------------------------------------------------------
+# Make sure the generated headers are up-to-date. This must be kept in
+# sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
+#------------------------------------------------------------------------
+FilesToConfig := \
+ include/llvm/Config/config.h \
+ include/llvm/Support/DataTypes.h \
+ include/llvm/ADT/hash_map \
+ include/llvm/ADT/hash_set \
+ include/llvm/ADT/iterator
+FilesToConfigPATH := $(addprefix $(OBJ_ROOT)/,$(FilesToConfig))
+
+all-local:: $(FilesToConfigPATH)
+$(FilesToConfigPATH) : $(OBJ_ROOT)/% : $(SRC_ROOT)/%.in
+ $(Echo) Regenerating $*
+ $(Verb) cd $(OBJ_ROOT) && $(ConfigStatusScript) $*
+
+.PRECIOUS: $(FilesToConfigPATH)
+#------------------------------------------------------------------------
# Make sure the configuration makefile is up to date
#------------------------------------------------------------------------
ifneq ($(MakefileConfigIn),)
$(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript)
$(Echo) Regenerating $@
- $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config
+ $(Verb) cd $(OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config
endif
ifneq ($(MakefileCommonIn),)
$(MakefileCommon): $(MakefileCommonIn) $(ConfigStatusScript)
$(Echo) Regenerating $@
- $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.common
+ $(Verb) cd $(OBJ_ROOT) ; $(ConfigStatusScript) Makefile.common
endif
#------------------------------------------------------------------------
# If the Makefile in the source tree has been updated, copy it over into the
# build tree. But, only do this if the source and object makefiles differ
#------------------------------------------------------------------------
-ifneq ($(PROJ_OBJ_DIR),$(PROJ_SRC_DIR))
+ifneq ($(OBJ_DIR),$(SRC_DIR))
-Makefile: $(PROJ_SRC_DIR)/Makefile
+Makefile: $(SRC_DIR)/Makefile
$(Echo) "Updating Makefile"
$(Verb) $(MKDIR) $(@D)
$(Verb) $(CP) -f $< $@
@@ -167,7 +185,7 @@
# Copy the Makefile.* files unless we're in the root directory which avoids
# the copying of Makefile.config.in or other things that should be explicitly
# taken care of.
-$(PROJ_OBJ_DIR)/Makefile% : $(PROJ_SRC_DIR)/Makefile%
+$(OBJ_DIR)/Makefile% : $(SRC_DIR)/Makefile%
@case '$?' in \
*Makefile.rules) ;; \
*.in) ;; \
@@ -298,13 +316,13 @@
#--------------------------------------------------------------------
# Directory locations
#--------------------------------------------------------------------
-ObjDir := $(PROJ_OBJ_DIR)/$(BuildMode)
-LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
-ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
-ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
-LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
-LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
-LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
+ObjDir := $(OBJ_DIR)/$(BuildMode)
+LibDir := $(OBJ_ROOT)/$(BuildMode)/lib
+ToolDir := $(OBJ_ROOT)/$(BuildMode)/bin
+ExmplDir := $(OBJ_ROOT)/$(BuildMode)/examples
+LLVMLibDir := $(LLVM_TOP)/llvm/$(BuildMode)/lib
+LLVMToolDir := $(LLVM_TOP)/llvm/$(BuildMode)/bin
+LLVMExmplDir:= $(LLVM_TOP)/llvm/$(BuildMode)/examples
CFERuntimeLibDir := $(LLVMGCCDIR)/lib
#--------------------------------------------------------------------
@@ -313,7 +331,7 @@
EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]:
Echo = @$(EchoCmd)
ifndef LIBTOOL
-LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
+LIBTOOL := $(LLVM_TOP)/support/mklib
endif
ifndef LLVMAS
LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
@@ -392,7 +410,7 @@
Verb := @
LibTool.Flags += --silent
AR.Flags += >/dev/null 2>/dev/null
- ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1
+ ConfigureScriptFLAGS += >$(OBJ_DIR)/configure.out 2>&1
else
ConfigureScriptFLAGS :=
endif
@@ -454,11 +472,9 @@
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
# All -I flags should go here, so that they don't confuse llvm-config.
-CPP.Flags += -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
- -I$(PROJ_OBJ_ROOT)/include \
- -I$(PROJ_SRC_ROOT)/include \
- -I$(LLVM_OBJ_ROOT)/include \
- -I$(LLVM_SRC_ROOT)/include \
+CPP.Flags += -I$(OBJ_DIR) -I$(SRC_DIR) \
+ -I$(OBJ_ROOT)/include \
+ -I$(SRC_ROOT)/include \
$(CPP.BaseFlags)
Compile.C = $(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c
@@ -483,8 +499,8 @@
ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
ScriptInstall = $(INSTALL) -m 0755
DataInstall = $(INSTALL) -m 0644
-TableGen = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include \
- -I $(PROJ_SRC_ROOT)/lib/Target
+TableGen = $(TBLGEN) -I $(SRC_DIR) -I$(SRC_ROOT)/include \
+ -I $(SRC_ROOT)/lib/Target
Archive = $(AR) $(AR.Flags)
LArchive = $(LLVMToolDir)/llvm-ar rcsf
ifdef RANLIB
@@ -499,9 +515,9 @@
#----------------------------------------------------------
ifndef SOURCES
- Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \
- $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c $(PROJ_SRC_DIR)/*.y \
- $(PROJ_SRC_DIR)/*.l))
+ Sources := $(notdir $(wildcard $(SRC_DIR)/*.cpp \
+ $(SRC_DIR)/*.cc $(SRC_DIR)/*.c $(SRC_DIR)/*.y \
+ $(SRC_DIR)/*.l))
else
Sources := $(SOURCES)
endif
@@ -546,12 +562,12 @@
ifdef DIRS
SubDirs += $(DIRS)
-ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+ifneq ($(SRC_ROOT),$(OBJ_ROOT))
$(RecursiveTargets)::
$(Verb) for dir in $(DIRS); do \
if [ ! -f $$dir/Makefile ]; then \
$(MKDIR) $$dir; \
- $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
+ $(CP) $(SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
fi; \
($(MAKE) -C $$dir $@ ) || exit 1; \
done
@@ -573,7 +589,7 @@
$(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
if [ ! -f $$dir/Makefile ]; then \
$(MKDIR) $$dir; \
- $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
+ $(CP) $(SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
fi; \
($(MAKE) -C $$dir $@ ) || exit 0; \
done
@@ -599,7 +615,7 @@
$(ParallelTargets) :
$(Verb) if [ ! -f $(@D)/Makefile ]; then \
$(MKDIR) $(@D); \
- $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
+ $(CP) $(SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
fi; \
$(MAKE) -C $(@D) $(subst $(@D)/.make,,$@)
endif
@@ -612,13 +628,13 @@
SubDirs += $(OPTIONAL_DIRS)
-ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+ifneq ($(SRC_ROOT),$(OBJ_ROOT))
$(RecursiveTargets)::
$(Verb) for dir in $(OPTIONAL_DIRS); do \
- if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
+ if [ -d $(SRC_DIR)/$$dir ]; then\
if [ ! -f $$dir/Makefile ]; then \
$(MKDIR) $$dir; \
- $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
+ $(CP) $(SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
fi; \
($(MAKE) -C$$dir $@ ) || exit 1; \
fi \
@@ -645,10 +661,10 @@
install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
$(Echo) Installing Configuration Files To $(PROJ_etcdir)
$(Verb)for file in $(CONFIG_FILES); do \
- if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
- $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
- elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
- $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
+ if test -f $(OBJ_DIR)/$${file} ; then \
+ $(DataInstall) $(OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
+ elif test -f $(SRC_DIR)/$${file} ; then \
+ $(DataInstall) $(SRC_DIR)/$${file} $(PROJ_etcdir) ; \
else \
$(ECHO) Error: cannot find config file $${file}. ; \
fi \
@@ -1218,12 +1234,12 @@
ifdef TARGET
-TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \
- $(LLVM_SRC_ROOT)/lib/Target/Target.td \
- $(LLVM_SRC_ROOT)/lib/Target/TargetCallingConv.td \
- $(LLVM_SRC_ROOT)/lib/Target/TargetSelectionDAG.td \
- $(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td) \
- $(wildcard $(LLVM_SRC_ROOT)/include/llvm/Intrinsics*.td)
+TDFiles := $(strip $(wildcard $(SRC_DIR)/*.td) \
+ $(LLVM_TOP)/llvm/lib/Target/Target.td \
+ $(LLVM_TOP)/llvm/lib/Target/TargetCallingConv.td \
+ $(LLVM_TOP)/llvm/lib/Target/TargetSelectionDAG.td \
+ $(LLVM_TOP)/llvm/include/llvm/CodeGen/ValueTypes.td) \
+ $(wildcard $(LLVM_TOP)/llvm/include/llvm/Intrinsics*.td)
INCFiles := $(filter %.inc,$(BUILT_SOURCES))
INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
.PRECIOUS: $(INCTMPFiles) $(INCFiles)
@@ -1317,7 +1333,7 @@
%.c: %.l
%.cpp: %.l
-all:: $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs)
+all:: $(LexFiles:%.l=$(SRC_DIR)/%.cpp.cvs)
# Note the extra sed filtering here, used to cut down on the warnings emited
# by GCC. The last line is a gross hack to work around flex aparently not
@@ -1325,25 +1341,25 @@
# uninitialized string buffers in LLVM we can generate very long tokens, so
# this is a hack around it.
# FIXME. (f.e. char Buffer[10000] )
-$(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
+$(SRC_DIR)/%.cpp: $(SRC_DIR)/%.l
$(Echo) Flexing $*.l
- $(Verb) $(FLEX) -t $(PROJ_SRC_DIR)/$*.l | \
+ $(Verb) $(FLEX) -t $(SRC_DIR)/$*.l | \
$(SED) 's/void yyunput/inline void yyunput/' | \
$(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
$(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
- > $(PROJ_SRC_DIR)/$*.cpp
+ > $(SRC_DIR)/$*.cpp
# IFF the .l file has changed since it was last checked into CVS, copy the .l
# file to .l.cvs and the generated .cpp file to .cpp.cvs. We use this mechanism
# so that people without flex can build LLVM by copying the .cvs files to the
# source location and building them.
-$(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
-$(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
- $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
- ($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)
+$(LexFiles:%.l=$(SRC_DIR)/%.cpp.cvs): \
+$(SRC_DIR)/%.cpp.cvs: $(SRC_DIR)/%.cpp
+ $(Verb) $(CMP) -s $(SRC_DIR)/$*.l $(SRC_DIR)/$*.l.cvs || \
+ ($(CP) $< $@; $(CP) $(SRC_DIR)/$*.l $(SRC_DIR)/$*.l.cvs)
$(LexFiles:%.l=$(ObjDir)/%.o) : \
-$(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
+$(ObjDir)/%.o : $(SRC_DIR)/%.cpp
clean-local::
-$(Verb) $(RM) -f $(LexOutput)
@@ -1360,7 +1376,7 @@
.PRECIOUS: $(YaccOutput)
-all:: $(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs)
+all:: $(YaccFiles:%.y=$(SRC_DIR)/%.cpp.cvs)
# Cancel built-in rules for yacc
%.c: %.y
@@ -1369,35 +1385,35 @@
# Rule for building the bison based parsers...
ifneq ($(BISON),)
-$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
+$(SRC_DIR)/%.cpp $(SRC_DIR)/%.h : $(SRC_DIR)/%.y
$(Echo) "Bisoning $*.y"
$(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
- $(Verb) $(MV) -f $*.tab.c $(PROJ_SRC_DIR)/$*.cpp
- $(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
+ $(Verb) $(MV) -f $*.tab.c $(SRC_DIR)/$*.cpp
+ $(Verb) $(MV) -f $*.tab.h $(SRC_DIR)/$*.h
# IFF the .y file has changed since it was last checked into CVS, copy the .y
# file to .y.cvs and the generated .cpp/.h file to .cpp.cvs/.h.cvs. We use this
# mechanism so that people without flex can build LLVM by copying the .cvs files
# to the source location and building them.
-$(YaccFiles:%.y=$(PROJ_SRC_DIR)/%.cpp.cvs): \
-$(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
- $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs || \
+$(YaccFiles:%.y=$(SRC_DIR)/%.cpp.cvs): \
+$(SRC_DIR)/%.cpp.cvs: $(SRC_DIR)/%.cpp
+ $(Verb) $(CMP) -s $(SRC_DIR)/$*.y $(SRC_DIR)/$*.y.cvs || \
($(CP) $< $@; \
- $(CP) $(PROJ_SRC_DIR)/$*.y $(PROJ_SRC_DIR)/$*.y.cvs; \
- $(CP) $(PROJ_SRC_DIR)/$*.h $(PROJ_SRC_DIR)/$*.h.cvs)
+ $(CP) $(SRC_DIR)/$*.y $(SRC_DIR)/$*.y.cvs; \
+ $(CP) $(SRC_DIR)/$*.h $(SRC_DIR)/$*.h.cvs)
else
-$(PROJ_SRC_DIR)/%.cpp : $(PROJ_SRC_DIR)/%.cpp.cvs
+$(SRC_DIR)/%.cpp : $(SRC_DIR)/%.cpp.cvs
$(Echo) "Bison of $*.y SKIPPED, bison not found -- copying .cpp.cvs"
- $(Verb)$(CP) $(PROJ_SRC_DIR)/$*.cpp.cvs $(PROJ_SRC_DIR)/$*.cpp
+ $(Verb)$(CP) $(SRC_DIR)/$*.cpp.cvs $(SRC_DIR)/$*.cpp
-$(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.h.cvs
+$(SRC_DIR)/%.h : $(SRC_DIR)/%.h.cvs
$(Echo) "Bison of $*.y SKIPPED, bison not found -- copying .h.cvs"
- $(Verb)$(CP) $(PROJ_SRC_DIR)/$*.h.cvs $(PROJ_SRC_DIR)/$*.h
+ $(Verb)$(CP) $(SRC_DIR)/$*.h.cvs $(SRC_DIR)/$*.h
endif
-$(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
+$(YaccFiles:%.y=$(ObjDir)/%.o): $(ObjDir)/%.o : $(SRC_DIR)/%.cpp
YaccOutput := $(YaccFiles:%.y=%.output)
@@ -1511,11 +1527,11 @@
ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
Makefile.config.in configure autoconf
DistOther := $(notdir $(wildcard \
- $(PROJ_SRC_DIR)/*.h \
- $(PROJ_SRC_DIR)/*.td \
- $(PROJ_SRC_DIR)/*.def \
- $(PROJ_SRC_DIR)/*.ll \
- $(PROJ_SRC_DIR)/*.in))
+ $(SRC_DIR)/*.h \
+ $(SRC_DIR)/*.td \
+ $(SRC_DIR)/*.def \
+ $(SRC_DIR)/*.ll \
+ $(SRC_DIR)/*.in))
DistSubDirs := $(SubDirs)
DistSources = $(Sources) $(EXTRA_DIST)
DistFiles = $(DistAlways) $(DistSources) $(DistOther)
@@ -1523,7 +1539,7 @@
#------------------------------------------------------------------------
# We MUST build distribution with OBJ_DIR != SRC_DIR
#------------------------------------------------------------------------
-ifeq ($(PROJ_SRC_DIR),$(PROJ_OBJ_DIR))
+ifeq ($(SRC_DIR),$(PROJ_OBJ_DIR))
dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
$(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
@@ -1611,11 +1627,11 @@
fi
$(Echo) Building Distribution Directory $(DistDir)
$(Verb) $(MKDIR) $(DistDir)
- $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \
+ $(Verb) srcdirstrip=`echo "$(SRC_DIR)" | sed 's|.|.|g'`; \
srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \
for file in $(DistFiles) ; do \
case "$$file" in \
- $(PROJ_SRC_DIR)/*) \
+ $(SRC_DIR)/*) \
file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \
;; \
$(PROJ_SRC_ROOT)/*) \
@@ -1623,9 +1639,9 @@
sed "s#^$$srcrootstrip/##"` \
;; \
esac; \
- if test -f "$(PROJ_SRC_DIR)/$$file" || \
- test -d "$(PROJ_SRC_DIR)/$$file" ; then \
- from_dir="$(PROJ_SRC_DIR)" ; \
+ if test -f "$(SRC_DIR)/$$file" || \
+ test -d "$(SRC_DIR)/$$file" ; then \
+ from_dir="$(SRC_DIR)" ; \
elif test -f "$$file" || test -d "$$file" ; then \
from_dir=. ; \
fi ; \
@@ -1641,9 +1657,9 @@
$(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
fi ; \
if test -d "$$from_dir/$$file"; then \
- if test -d "$(PROJ_SRC_DIR)/$$file" && \
- test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \
- cd $(PROJ_SRC_DIR) ; \
+ if test -d "$(SRC_DIR)/$$file" && \
+ test "$$from_dir" != "$(SRC_DIR)" ; then \
+ cd $(SRC_DIR) ; \
$(TAR) cf - $$file --exclude .svn --exclude CVS | \
( cd $$to_dir ; $(TAR) xf - ) ; \
cd $(PROJ_OBJ_DIR) ; \
@@ -1765,12 +1781,10 @@
#------------------------------------------------------------------------
printvars::
$(Echo) "BuildMode : " '$(BuildMode)'
- $(Echo) "PROJ_SRC_ROOT: " '$(PROJ_SRC_ROOT)'
- $(Echo) "PROJ_SRC_DIR : " '$(PROJ_SRC_DIR)'
- $(Echo) "PROJ_OBJ_ROOT: " '$(PROJ_OBJ_ROOT)'
- $(Echo) "PROJ_OBJ_DIR : " '$(PROJ_OBJ_DIR)'
- $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
- $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
+ $(Echo) "SRC_ROOT : " '$(SRC_ROOT)'
+ $(Echo) "OBJ_ROOT : " '$(OBJ_ROOT)'
+ $(Echo) "SRC_DIR : " '$(SRC_DIR)'
+ $(Echo) "OBJ_DIR : " '$(OBJ_DIR)'
$(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
$(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
$(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
@@ -1798,3 +1812,5 @@
$(Echo) "SubDirs : " '$(SubDirs)'
$(Echo) "ProjLibsPaths: " '$(ProjLibsPaths)'
$(Echo) "ProjLibsOptions: " '$(ProjLibsOptions)'
+ $(Echo) "ConfigScript : " '$(ConfigureScript)'
+ $(Echo) "ConfigStatus : " '$(ConfigStatusScript)'
Modified: support/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/support/trunk/autoconf/configure.ac?rev=39955&r1=39954&r2=39955&view=diff
==============================================================================
--- support/trunk/autoconf/configure.ac (original)
+++ support/trunk/autoconf/configure.ac Mon Jul 16 23:29:52 2007
@@ -1,13 +1,15 @@
dnl === configure.ac --------------------------------------------------------===
-dnl The LLVM Compiler Infrastructure
+dnl LLVM Support Module Configuration
dnl
dnl This file was developed by the LLVM research group and is distributed under
dnl the University of Illinois Open Source License. See LICENSE.TXT for details.
dnl
dnl===-----------------------------------------------------------------------===
-dnl This is the LLVM configuration script. It is processed by the autoconf
-dnl program to produce a script named configure. This script contains the
-dnl configuration checks that LLVM needs in order to support multiple platforms.
+dnl This is the support module configuration script. It is processed by the
+dnl autoconf program to produce a script named configure. This script contains
+dnl the configuration checks that the support module needs in order to support
+dnl multiple platforms.
+dnl
dnl This file is composed of 10 sections per the recommended organization of
dnl autoconf input defined in the autoconf documentation. As this file evolves,
dnl please keep the various types of checks within their sections. The sections
@@ -31,7 +33,7 @@
dnl===-----------------------------------------------------------------------===
dnl Initialize autoconf and define the package name, version number and
dnl email address for reporting bugs.
-AC_INIT([[llvm]],[[2.1svn]],[llvmbugs at cs.uiuc.edu])
+AC_INIT([[support]],[[2.1svn]],[llvmbugs at cs.uiuc.edu])
dnl Provide a copyright substitution and ensure the copyright notice is included
dnl in the output of --version option of the generated configure script.
@@ -40,11 +42,11 @@
dnl Indicate that we require autoconf 2.59 or later. Ths is needed because we
dnl use some autoconf macros only available in 2.59.
-AC_PREREQ(2.59)
+AC_PREREQ(2.60)
dnl Verify that the source directory is valid. This makes sure that we are
dnl configuring LLVM and not some other package (it validates --srcdir argument)
-AC_CONFIG_SRCDIR([lib/VMCore/Module.cpp])
+AC_CONFIG_SRCDIR([lib/System/Path.cpp])
dnl Place all of the extra autoconf files into the config subdirectory. Tell
dnl various tools where the m4 autoconf macros are.
@@ -58,32 +60,6 @@
fi
fi
-dnl Configure all of the projects present in our source tree. While we could
-dnl just AC_CONFIG_SUBDIRS on the set of directories in projects that have a
-dnl configure script, that usage of the AC_CONFIG_SUBDIRS macro is deprecated.
-dnl Instead we match on the known projects.
-for i in `ls ${srcdir}/projects`
-do
- if test -d ${srcdir}/projects/${i} ; then
- case ${i} in
- CVS) ;;
- sample) AC_CONFIG_SUBDIRS([projects/sample]) ;;
- privbracket) AC_CONFIG_SUBDIRS([projects/privbracket]) ;;
- llvm-stacker) AC_CONFIG_SUBDIRS([projects/llvm-stacker]) ;;
- llvm-test) AC_CONFIG_SUBDIRS([projects/llvm-test]) ;;
- llvm-reopt) AC_CONFIG_SUBDIRS([projects/llvm-reopt]);;
- llvm-gcc) AC_CONFIG_SUBDIRS([projects/llvm-gcc]) ;;
- llvm-java) AC_CONFIG_SUBDIRS([projects/llvm-java]) ;;
- llvm-tv) AC_CONFIG_SUBDIRS([projects/llvm-tv]) ;;
- llvm-poolalloc) AC_CONFIG_SUBDIRS([projects/llvm-poolalloc]) ;;
- llvm-kernel) AC_CONFIG_SUBDIRS([projects/llvm-kernel]) ;;
- *)
- AC_MSG_WARN([Unknown project (${i}) won't be configured automatically])
- ;;
- esac
- fi
-done
-
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 2: Architecture, target, and host checks
@@ -256,6 +232,19 @@
dnl===
dnl===-----------------------------------------------------------------------===
+LLVM_TOP=`cd .. ; pwd`
+dnl Allow configuration of the llvm-top directory from which all llvm software
+dnl can be found. Usually this corresponds to .., but weird things can happen
+dnl in build environments
+AC_ARG_WITH(llvm-top,
+ AS_HELP_STRING([--with-llvm-top],
+ [Specify where the llvm-top directory is]),,withval=default)
+case "$withval" in
+ default) ;;
+ *) LLVM_TOP=$withval ;;
+esac
+AC_SUBST(LLVM_TOP,$LLVM_TOP)
+
dnl --enable-optimized : check whether they want to do an optimized build:
AC_ARG_ENABLE(optimized, AS_HELP_STRING(
[--enable-optimized,Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
@@ -294,27 +283,6 @@
AC_SUBST(DEBUG_RUNTIME,[[DEBUG_RUNTIME=1]])
fi
-dnl --enable-jit: check whether they want to enable the jit
-AC_ARG_ENABLE(jit,
- AS_HELP_STRING(--enable-jit,
- [Enable Just In Time Compiling (default is YES)]),,
- enableval=default)
-if test ${enableval} = "no"
-then
- AC_SUBST(JIT,[[]])
-else
- case "$llvm_cv_target_arch" in
- x86) AC_SUBST(TARGET_HAS_JIT,1) ;;
- Sparc) AC_SUBST(TARGET_HAS_JIT,0) ;;
- PowerPC) AC_SUBST(TARGET_HAS_JIT,1) ;;
- x86_64) AC_SUBST(TARGET_HAS_JIT,1) ;;
- Alpha) AC_SUBST(TARGET_HAS_JIT,1) ;;
- IA64) AC_SUBST(TARGET_HAS_JIT,0) ;;
- ARM) AC_SUBST(TARGET_HAS_JIT,0) ;;
- *) AC_SUBST(TARGET_HAS_JIT,0) ;;
- esac
-fi
-
dnl Allow enablement of doxygen generated documentation
AC_ARG_ENABLE(doxygen,
AS_HELP_STRING([--enable-doxygen],
@@ -370,6 +338,7 @@
Alpha) TARGETS_TO_BUILD="Alpha" ;;
IA64) TARGETS_TO_BUILD="IA64" ;;
ARM) TARGETS_TO_BUILD="ARM" ;;
+ MIPS) TARGETS_TO_BUILD="MIPS" ;;
*) AC_MSG_ERROR([Can not set target to build]) ;;
esac
;;
@@ -382,6 +351,7 @@
alpha) TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;;
ia64) TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD" ;;
arm) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;;
+ mips) TARGETS_TO_BUILD="MIPS $TARGETS_TO_BUILD" ;;
*) AC_MSG_ERROR([Unrecognized target $a_target]) ;;
esac
done
@@ -390,32 +360,6 @@
TARGETS_TO_BUILD="CBackend MSIL $TARGETS_TO_BUILD"
AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD)
-dnl Prevent the CBackend from using printf("%a") for floating point so older
-dnl C compilers that cannot deal with the 0x0p+0 hex floating point format
-dnl can still compile the CBE's output
-AC_ARG_ENABLE([cbe-printf-a],AS_HELP_STRING([--enable-cbe-printf-a],
- [Enable C Backend output with hex floating point via %a (default is YES)]),,
- enableval=default)
-case "$enableval" in
- yes) AC_SUBST(ENABLE_CBE_PRINTF_A,[1]) ;;
- no) AC_SUBST(ENABLE_CBE_PRINTF_A,[0]) ;;
- default) AC_SUBST(ENABLE_CBE_PRINTF_A,[1]) ;;
- *) AC_MSG_ERROR([Invalid setting for --enable-cbe-printf-a. Use "yes" or "no"]) ;;
-esac
-AC_DEFINE_UNQUOTED([ENABLE_CBE_PRINTF_A],$ENABLE_CBE_PRINTF_A,
- [Define if CBE is enabled for printf %a output])
-
-dnl Allow a specific llvm-gcc/llvm-g++ pair to be used with this LLVM config.
-AC_ARG_WITH(llvmgccdir,
- AS_HELP_STRING([--with-llvmgccdir],
- [Specify location of llvm-gcc install dir (default searches PATH)]),,
- withval=default)
-case "$withval" in
- default) WITH_LLVMGCCDIR=default ;;
- /* | [[A-Za-z]]:[[\\/]]*) WITH_LLVMGCCDIR=$withval ;;
- *) AC_MSG_ERROR([Invalid path for --with-llvmgccdir. Provide full path]) ;;
-esac
-
dnl Specify extra build options
AC_ARG_WITH(extra-options,
AS_HELP_STRING([--with-extra-options],
@@ -765,39 +709,6 @@
dnl===
dnl===-----------------------------------------------------------------------===
-dnl See if the llvm-gcc executable can compile to LLVM assembly
-AC_CACHE_CHECK([whether llvm-gcc is sane],[llvm_cv_llvmgcc_sanity],
-[llvm_cv_llvmgcc_sanity="no"
-if test -x "$LLVMGCC" ; then
- cp /dev/null conftest.c
- "$LLVMGCC" -emit-llvm -S -o - conftest.c | \
- grep 'target datalayout =' > /dev/null 2>&1
- if test $? -eq 0 ; then
- llvm_cv_llvmgcc_sanity="yes"
- fi
- rm conftest.c
-fi])
-
-dnl Since we have a sane llvm-gcc, identify it and its sub-tools
-if test "$llvm_cv_llvmgcc_sanity" = "yes" ; then
- AC_MSG_CHECKING([llvm-gcc component support])
- llvmcc1path=`"$LLVMGCC" --print-prog-name=cc1`
- AC_SUBST(LLVMCC1,$llvmcc1path)
- llvmcc1pluspath=`"$LLVMGCC" --print-prog-name=cc1plus`
- AC_SUBST(LLVMCC1PLUS,$llvmcc1pluspath)
- llvmgccdir=`echo "$llvmcc1path" | sed 's,/libexec/.*,,'`
- AC_SUBST(LLVMGCCDIR,$llvmgccdir)
- llvmgcclibexec=`echo "$llvmcc1path" | sed 's,/cc1,,'`
- AC_SUBST(LLVMGCCLIBEXEC,$llvmgcclibexec)
- llvmgccversion=[`"$LLVMGCC" -dumpversion 2>&1 | sed 's/^\([0-9.]*\).*/\1/'`]
- llvmgccmajvers=[`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'`]
- AC_SUBST(LLVMGCC_VERSION,$llvmgccversion)
- AC_SUBST(LLVMGCC_MAJVERS,$llvmgccmajvers)
- llvmgcclangs=[`"$LLVMGCC" -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ -]*\).*/\1/'`]
- AC_SUBST(LLVMGCC_LANGS,$llvmgcclangs)
- AC_MSG_RESULT([ok])
-fi
-
dnl Propagate the shared library extension that the libltdl checks did to
dnl the Makefiles so we can use it there too
AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext)
@@ -872,27 +783,10 @@
dnl Configure the makefile's configuration data
AC_CONFIG_FILES([Makefile.config])
-dnl Configure the RPM spec file for LLVM
-AC_CONFIG_FILES([llvm.spec])
-
-dnl Configure doxygen's configuration file
-AC_CONFIG_FILES([docs/doxygen.cfg])
-
-dnl Do the first stage of configuration for llvm-config.in.
-AC_CONFIG_FILES([tools/llvm-config/llvm-config.in])
-
dnl Do special configuration of Makefiles
-AC_CONFIG_COMMANDS([setup],,[llvm_src="${srcdir}"])
AC_CONFIG_MAKEFILE(Makefile)
AC_CONFIG_MAKEFILE(Makefile.common)
-AC_CONFIG_MAKEFILE(examples/Makefile)
AC_CONFIG_MAKEFILE(lib/Makefile)
-AC_CONFIG_MAKEFILE(runtime/Makefile)
-AC_CONFIG_MAKEFILE(test/Makefile)
-AC_CONFIG_MAKEFILE(test/Makefile.tests)
-AC_CONFIG_MAKEFILE(tools/Makefile)
-AC_CONFIG_MAKEFILE(utils/Makefile)
-AC_CONFIG_MAKEFILE(projects/Makefile)
dnl Finally, crank out the output
AC_OUTPUT
Modified: support/trunk/autoconf/m4/config_makefile.m4
URL: http://llvm.org/viewvc/llvm-project/support/trunk/autoconf/m4/config_makefile.m4?rev=39955&r1=39954&r2=39955&view=diff
==============================================================================
--- support/trunk/autoconf/m4/config_makefile.m4 (original)
+++ support/trunk/autoconf/m4/config_makefile.m4 Mon Jul 16 23:29:52 2007
@@ -4,6 +4,6 @@
#
AC_DEFUN([AC_CONFIG_MAKEFILE],
[AC_CONFIG_COMMANDS($1,
- [${llvm_src}/autoconf/mkinstalldirs `dirname $1`
- ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/$1 $1])
+ [${LLVM_TOP}/support/autoconf/mkinstalldirs `dirname $1`
+ ${SHELL} ${LLVM_TOP}/support/autoconf/install-sh -c ${srcdir}/$1 $1])
])
Added: support/trunk/build-for-llvm-top.sh
URL: http://llvm.org/viewvc/llvm-project/support/trunk/build-for-llvm-top.sh?rev=39955&view=auto
==============================================================================
--- support/trunk/build-for-llvm-top.sh (added)
+++ support/trunk/build-for-llvm-top.sh Mon Jul 16 23:29:52 2007
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# This includes the Bourne shell library from llvm-top. Since this file is
+# generally only used when building from llvm-top, it is safe to assume that
+# llvm is checked out into llvm-top in which case .. just works.
+. ../library.sh
+
+is_debug=1
+for arg in "$@" ; do
+ case "$arg" in
+ LLVM_TOP=*)
+ LLVM_TOP=`echo "$arg" | sed -e 's/LLVM_TOP=//'`
+ ;;
+ PREFIX=*)
+ PREFIX=`echo "$arg" | sed -e 's/PREFIX=//'`
+ ;;
+ *=*)
+ build_opts="$build_opts $arg"
+ ;;
+ --*)
+ config_opts="$config_opts $arg"
+ ;;
+ esac
+done
+
+# See if we have previously been configured by sensing the presense
+# of the config.status scripts
+if test ! -x "config.status" ; then
+ # We must configure so build a list of configure options
+ config_options="--prefix=$PREFIX --with-llvm-top=$LLVM_TOP "
+ config_options="$config_options $config_opts"
+ msg 0 Configuring $module with:
+ msg 0 " ./configure" $config_options
+ ./configure $config_options || (echo "Can't configure llvm" ; exit 1)
+fi
+
+msg 0 Building $module with:
+msg 0 " make" $build_opts tools-only
+make $build_opts tools-only
Propchange: support/trunk/build-for-llvm-top.sh
------------------------------------------------------------------------------
svn:executable = *
More information about the llvm-commits
mailing list