[llvm-commits] [hlvm] r38149 - in /hlvm/trunk: Makefile Makefile.config.in Makefile.hlvm README.txt autoconf/ hlvm/AST/Makefile hlvm/Base/Makefile hlvm/Makefile hlvm/Pass/Makefile hlvm/Reader/Makefile hlvm/Writer/Makefile test/lib/return0.exp tools/Makefile tools/hlvm-xml2xml/Makefile

Reid Spencer reid at x10sys.com
Sat Jul 7 17:00:28 PDT 2007


Author: reid
Date: Sat Jul  7 19:00:28 2007
New Revision: 38149

URL: http://llvm.org/viewvc/llvm-project?rev=38149&view=rev
Log:
Erase the last vestiges of the "make" based build system.
It is now not possible to use "make" to build all of HLVM
so its utility has dropped to zero. All users must switch
to scons at this point. To ease the pain a little, there
is a compatibility makefile at the top level that just
converts a few make targets into equivalent scons 
commands.

Removed:
    hlvm/trunk/Makefile.config.in
    hlvm/trunk/Makefile.hlvm
    hlvm/trunk/autoconf/
    hlvm/trunk/hlvm/AST/Makefile
    hlvm/trunk/hlvm/Base/Makefile
    hlvm/trunk/hlvm/Makefile
    hlvm/trunk/hlvm/Pass/Makefile
    hlvm/trunk/hlvm/Reader/Makefile
    hlvm/trunk/hlvm/Writer/Makefile
    hlvm/trunk/tools/Makefile
    hlvm/trunk/tools/hlvm-xml2xml/Makefile
Modified:
    hlvm/trunk/Makefile
    hlvm/trunk/README.txt
    hlvm/trunk/test/lib/return0.exp

Modified: hlvm/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/Makefile?rev=38149&r1=38148&r2=38149&view=diff

==============================================================================
--- hlvm/trunk/Makefile (original)
+++ hlvm/trunk/Makefile Sat Jul  7 19:00:28 2007
@@ -1,19 +1,20 @@
-##===- Makefile --------------------------------------------*- Makefile -*-===##
+#------------------------------------------------------------------------------
+# Makefile.hlvm - Make -> scons conversion
 #
-# This is the top level Makefile for the HLVM project.
+# Copyright (C) 2006 Reid Spencer. All Rights Reserved
 #
-# Copyright (C) 2006 Reid Spencer. All Rights Reserved.
-#
-##===----------------------------------------------------------------------===##
+#------------------------------------------------------------------------------
+# This makefile simply converts standard make targets into the equivalent 
+# scons invocation in order to retain compatibility for those who wish to use
+# make.
+#------------------------------------------------------------------------------
 
-#
-# Indicates our relative path to the top of the project's root directory.
-#
-LEVEL = .
-DIRS = hlvm tools
-EXTRA_DIST = include
+all:
+	scons -Q
+
+check: 
+	scons -Q all
+
+install:
+	scons -Q install
 
-#
-# Include the Master Makefile that knows how to build all.
-#
-include $(LEVEL)/Makefile.hlvm

Removed: hlvm/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/Makefile.config.in?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/Makefile.config.in (original)
+++ hlvm/trunk/Makefile.config.in (removed)
@@ -1,64 +0,0 @@
-##===- Makefile.config.in ----------------------------------*- Makefile -*-===##
-#
-# This is the top level configured makefile for the HLVM project.
-#
-# Copyright (C) 2006 Reid Spencer. All Rights Reserved.
-#
-##===----------------------------------------------------------------------===##
-
-# Set HLVM Specific variables
-HLVM_name        := @PACKAGE_TARNAME@
-HLVM_version	:= @PACKAGE_VERSION@
-HLVM_so_version	:= @HLVM_SO_VERSION@
-HLVM_so_current  := @HLVM_SO_CURRENT@
-HLVM_so_revision := @HLVM_SO_REVISION@
-HLVM_so_age      := @HLVM_SO_AGE@
-HLVM_prefix      := @HLVM_PREFIX@
-HLVM_bindir	:= @HLVM_PREFIX@/bin
-HLVM_libdir	:= @HLVM_PREFIX@/lib 
-HLVM_includedir  := @HLVM_PREFIX@/include
-HLVM_datadir	:= @HLVM_PREFIX@/data
-HLVM_configdir	:= @HLVM_PREFIX@/etc
-HLVM_etcdir      := @HLVM_PREFIX@/etc
-HLVM_infodir	:= @HLVM_PREFIX@/info
-HLVM_mandir	:= @HLVM_PREFIX@/man
-HLVM_wrkspcdir	:= @HLVM_WITH_WORKSPACE@
-HLVM_llvmsrcdir := @HLVM_WITH_LLVM_SRC@
-HLVM_llvmobjdir := @HLVM_WITH_LLVM_OBJ@
-HLVM_top_srcdir  := @abs_top_srcdir@
-HLVM_top_objdir  := @abs_top_builddir@
-HLVM_DEBUG       := @HLVM_DEBUG@
-HLVM_ASSERT      := @HLVM_ASSERT@
-HLVM_INLINE      := @HLVM_INLINE@
-HLVM_OPTIMIZE    := @HLVM_OPTIMIZE@
-HLVM_SHAREDPREFIX:= @HLVM_SHAREDPREFIX@
-HLVM_TRACE       := @HLVM_TRACE@
-HLVM_SMALL       := @HLVM_SMALL@
-HLVM_EFENCE      := @HLVM_EFENCE@
-HLVM_PROFILING   := @HLVM_PROFILING@
-
-# Set the name of the project here
-PROJECT_NAME := $(HLVM_name)
-PROJ_VERSION := $(HLVM_VERSION)
- 
-# Set this variable to the top of the LLVM source tree.
-LLVM_SRC_ROOT = @HLVM_WITH_LLVM_SRC@
-
-# Set this variable to the top level directory where LLVM was built
-# (this is *not* the same as OBJ_ROOT as defined in LLVM's Makefile.config).
-LLVM_OBJ_ROOT = @HLVM_WITH_LLVM_OBJ@
-
-# Set the directory root of this project's source files
-PROJ_SRC_ROOT := $(subst //,/, at abs_top_srcdir@)
-
-# Set the root directory of this project's object files
-PROJ_OBJ_ROOT := $(subst //,/, at abs_top_objdir@)
-
-# Set the root directory of this project's install prefix
-PROJ_INSTALL_ROOT := @prefix@
-
-CXXFLAGS := @CXXFLAGS@
-CPPFLAGS := @CPPFLAGS@
-CFLAGS   := @CFLAGS@
-LIBS     := @LIBS@
-LDFLAGS  := @LDFLAGS@

Removed: hlvm/trunk/Makefile.hlvm
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/Makefile.hlvm?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/Makefile.hlvm (original)
+++ hlvm/trunk/Makefile.hlvm (removed)
@@ -1,124 +0,0 @@
-#------------------------------------------------------------------------------
-# Makefile.hlvm - Main HLVM Makefile: included by all
-#
-# Copyright (C) 2006 HLVM Group. All Rights Reserved
-#
-#------------------------------------------------------------------------------
-# This makefile is included in every Makefile in the HLVM project. It provides
-# definitions needed by all makefiles in HLVM. It also includes LLVM Makefile 
-# system upon which it is based.
-#------------------------------------------------------------------------------
-
-# Include our configured variables
-include $(LEVEL)/Makefile.config
-
-#
-# Set up compilation variables
-# 
-
-CPPFLAGS += -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS \
-            -I$(HLVM_top_srcdir) -I$(HLVM_top_objdir)
-
-ifeq ($(HLVM_ASSERT),true)
-CPPFLAGS += -DHLVM_ASSERT=1
-endif
-
-HLVM_COMMONFLAGS := -pipe -Wcast-align -Wpointer-arith
-CXXFLAGS += $(HLVM_COMMONFLAGS) -Wno-deprecated -Wold-style-cast \
-            -Woverloaded-virtual -ffor-scope -fno-operator-names
-CFLAGS += $(HLVM_COMMONFLAGS)
-
-ifeq ($(HLVM_DEBUG),true)
-#CXXFLAGS += -ggdb
-#CFLAGS   += -ggdb
-endif
-
-ifeq ($(HLVM_OPTIMIZE),true)
-ifeq ($(HLVM_SMALL),true)
-CXXFLAGS += -Os
-CFLAGS   += -Os
-endif 
-ENABLE_OPTIMIZED := 1
-endif
-
-ifeq ($(HLVM_INLINE),true)
-CXXFLAGS += -DHLVM_INLINE -DHLVM_inline=inline
-CFLAGS   += -DHLVM_INLINE -DHLVM_inline=inline
-else
-CXXFLAGS += -fno-inline -DHLVM_inline=
-CFLAGS   += -fno-inline -DHLVM_inline=
-endif
-
-ifeq ($(HLVM_PROFILING),true)
-CXXFLAGS += -pg
-CFLAGS	 += -pg
-endif
-
-# LLVM Requirements for makefile system
-PROJECT_NAME    := $(HLVM_name)
-PROJECT_VERSION := $(HLVM_version)
-LLVM_SRC_ROOT   := $(HLVM_llvmsrcdir)
-LLVM_OBJ_ROOT   := $(HLVM_llvmobjdir)
-PROJ_SRC_ROOT   := $(HLVM_top_srcdir)
-PROJ_OBJ_ROOT   := $(HLVM_top_objdir)
-PROJ_INSTALL_ROOT := $(HLVM_prefix)
-
-SUFFIXES := .rng .i .hlvm .xml .java .class
-
-TOOLLINKOPTSB := $(LIBS)
-
-# Get configuration data and make rules from LLVM
-include $(HLVM_llvmobjdir)/Makefile.common
-
-EchoCmd  := $(ECHO) hlvm [$(MAKELEVEL)]:
-Echo     := @$(EchoCmd)
-
-$(PROJ_OBJ_ROOT)/Makefile.hlvm: $(PROJ_SRC_ROOT)/Makefile.hlvm
-	$(Echo) "Updating Makefile.hlvm"
-	$(Verb) $(MKDIR) $(@D)
-	$(Verb) $(CP) -f $< $@
-
-preconditions: $(PROJ_OBJ_DIR)/Makefile.hlvm
-
-$(PROJ_OBJ_DIR)/%Tokenizer.cpp $(PROJ_OBJ_DIR)/%Tokenizer.h \
-  $(PROJ_OBJ_DIR)/%TokenHash.i : $(PROJ_SRC_DIR)/%.rng \
-  $(HLVM_top_srcdir)/utils/tmplt/Tokenizer_Template.cpp \
-  $(HLVM_top_srcdir)/utils/tmplt/Tokenizer_Template.h \
-  $(HLVM_top_srcdir)/utils/bin/mkTokenizer
-	$(Echo) Building Tokenizer For $*
-	$(Verb) $(HLVM_top_srcdir)/utils/bin/mkTokenizer -f \
-	  $(PROJ_SRC_DIR)/$*.rng
-
-ifdef INSTALL_INCLUDES
-PartialPath := $(patsubst $(PROJ_SRC_ROOT)/%,%,$(PROJ_SRC_DIR))
-IncludesWithPath := $(patsubst %,$(PartialPath)/%,$(INSTALL_INCLUDES))
-InstalledIncludes := $(patsubst %,$(PROJ_includedir)/%,$(IncludesWithPath))
-
-install-local:: $(PROJ_includedir)/$(PartialPath)/.dir $(InstalledIncludes)
-	
-$(InstalledIncludes): $(PROJ_includedir)/$(PartialPath)/% : $(PROJ_SRC_DIR)/%
-	$(Echo) Installing $(*)
-	$(Verb) $(DataInstall) $< $@
-
-endif
-
-printvars::
-	$(Echo) "BuildMode        : " '$(BuildMode)'
-	$(Echo) "HLVM_VERSION	  : " '$(HLVM_VERSION)'
-	$(Echo) "HLVM_SO_VERSION  : " '$(HLVM_SO_VERSION)'
-	$(Echo) "HLVM_bindir	  : " '$(HLVM_bindir)'
-	$(Echo) "HLVM_libdir	  : " '$(HLVM_libdir)'
-	$(Echo) "HLVM_sbindir	  : " '$(HLVM_sbindir)'
-	$(Echo) "HLVM_libexecdir  : " '$(HLVM_libexecdir)'
-	$(Echo) "HLVM_datadir	  : " '$(HLVM_datadir)'
-	$(Echo) "HLVM_configdir	  : " '$(HLVM_configdir)'
-	$(Echo) "HLVM_infodir	  : " '$(HLVM_infodir)'
-	$(Echo) "HLVM_mandir	  : " '$(HLVM_mandir)'
-	$(Echo) "HLVM_schemasdir  : " '$(HLVM_schemasdir)'
-	$(Echo) "HLVM_wrkspcdir	  : " '$(HLVM_wrkspcdir)'
-	$(Echo) "HLVM_llvmsrcdir  : " '$(HLVM_llvmsrcdir)'
-	$(Echo) "HLVM_llvmobjdir  : " '$(HLVM_llvmobjdir)'
-	$(Echo) "HLVM_top_srcdir  : " '$(HLVM_top_srcdir)'
-	$(Echo) "HLVM_top_builddir: " '$(HLVM_top_builddir)'
-	$(Echo) "CXXFLAGS         : " '$(CXXFLAGS)'
-	$(Echo) "CFLAGS           : " '$(CFLAGS)'

Modified: hlvm/trunk/README.txt
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/README.txt?rev=38149&r1=38148&r2=38149&view=diff

==============================================================================
--- hlvm/trunk/README.txt (original)
+++ hlvm/trunk/README.txt Sat Jul  7 19:00:28 2007
@@ -23,3 +23,16 @@
 docs directory. Please open <hlvm>/docs/index.html to get an index of the
 documentation that is available. You will find conceptual guides as well as
 build and installation instructions there.
+
+Quick Build
+===========
+HLVM uses the SCons tool for software construction. However a compatible
+Makefile is also provided. One slight difference, there is no "configure" step
+for SCons. Your first build will configure HLVM for your platform, mostly
+automatically unless you have dependent packages installed in non-standard
+locations. 
+
+The usual will work:
+    make
+    make check
+    make install

Removed: hlvm/trunk/hlvm/AST/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Makefile?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/hlvm/AST/Makefile (original)
+++ hlvm/trunk/hlvm/AST/Makefile (removed)
@@ -1,14 +0,0 @@
-#-------------------------------------------------------------------------------
-# 
-# Copyright (C) 2006 HLVM Group. All Rights Reserved
-#
-#-------------------------------------------------------------------------------
-
-LEVEL 	            := ../..
-LIBRARYNAME         := HLVMAST
-DONT_BUILD_RELINKED := 1
-BUILD_ARCHIVE       := 1
-INSTALL_INCLUDES    := Bundle.h Conditionable.h ContainerType.h Function.h \
-                       LinkageItem.h Node.h SymbolTable.h Type.h Variable.h
-
-include $(LEVEL)/Makefile.hlvm

Removed: hlvm/trunk/hlvm/Base/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Base/Makefile?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/hlvm/Base/Makefile (original)
+++ hlvm/trunk/hlvm/Base/Makefile (removed)
@@ -1,11 +0,0 @@
-##===- hlvm/Base/Makefile ----------------------------------*- Makefile -*-===##
-#
-LEVEL=../..
-DIRS=
-LIBRARYNAME = HLVMBase
-DONT_BUILD_RELINKED := 1
-BUILD_ARCHIVE := 1
-INSTALL_INCLUDES := Config.h URI.h URI.i
-
-
-include $(LEVEL)/Makefile.hlvm

Removed: hlvm/trunk/hlvm/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Makefile?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/hlvm/Makefile (original)
+++ hlvm/trunk/hlvm/Makefile (removed)
@@ -1,12 +0,0 @@
-##===- hlvm/Makefile ---------------------------------------*- Makefile -*-===##
-#
-# Relative path to the top of the source tree.
-#
-LEVEL=..
-
-#
-# List all of the subdirectories that we will compile.
-#
-DIRS=Base AST Pass Reader Writer
-
-include $(LEVEL)/Makefile.hlvm

Removed: hlvm/trunk/hlvm/Pass/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Pass/Makefile?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/hlvm/Pass/Makefile (original)
+++ hlvm/trunk/hlvm/Pass/Makefile (removed)
@@ -1,13 +0,0 @@
-#-------------------------------------------------------------------------------
-# 
-# Copyright (C) 2006 HLVM Group. All Rights Reserved
-#
-#-------------------------------------------------------------------------------
-
-LEVEL 	            := ../..
-LIBRARYNAME         := HLVMPass
-DONT_BUILD_RELINKED := 1
-BUILD_ARCHIVE       := 1
-INSTALL_INCLUDES    := Validate.h
-
-include $(LEVEL)/Makefile.hlvm

Removed: hlvm/trunk/hlvm/Reader/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Reader/Makefile?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/hlvm/Reader/Makefile (original)
+++ hlvm/trunk/hlvm/Reader/Makefile (removed)
@@ -1,12 +0,0 @@
-##===- hlvm/Reader/Makefile --------------------------------*- Makefile -*-===##
-#
-# Relative path to the top of the source tree.
-#
-LEVEL=../..
-
-#
-# List all of the subdirectories that we will compile.
-#
-DIRS=XML
-
-include $(LEVEL)/Makefile.hlvm

Removed: hlvm/trunk/hlvm/Writer/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Writer/Makefile?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/hlvm/Writer/Makefile (original)
+++ hlvm/trunk/hlvm/Writer/Makefile (removed)
@@ -1,5 +0,0 @@
-##===- hlvm/Writer/Makefile --------------------------------*- Makefile -*-===##
-LEVEL=../..
-DIRS=XML
-
-include $(LEVEL)/Makefile.hlvm

Modified: hlvm/trunk/test/lib/return0.exp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/lib/return0.exp?rev=38149&r1=38148&r2=38149&view=diff

==============================================================================
--- hlvm/trunk/test/lib/return0.exp (original)
+++ hlvm/trunk/test/lib/return0.exp Sat Jul  7 19:00:28 2007
@@ -28,6 +28,7 @@
   set rtlib [file join $objrootdir hlvm Runtime HLVMRuntime.bca ]
   set vmlib [file join $objrootdir tools hlvm hlvm.bca ]
   set vmmain [file join $objrootdir tools hlvm hlvm.bc ]
+  set cfelib [file join / proj llvm cfrontend install lib ]
   set files [lsort [
     glob -nocomplain -tails -types {f r} -directory $source $pat]]
   set dirs [lsort [
@@ -46,24 +47,40 @@
   
   foreach test $files {
     set output [file join $outdir ${test}.out]
-    set testsrc [file join $source $test]
-    set testexe [file join $outdir [file rootname $test] ]
-    set testbc  [file join $outdir ${test}.bc ]
+    set testsrc       [file join $source $test]
+    set testexe       [file join $outdir [file rootname $test] ]
+    set testbc        [file join $outdir ${test}.bc ]
+    set testlinked    [file join $outdir ${test}.linked ]
+    set testlinkedbc  [file join $outdir ${test}.linked.bc ]
+    set tests         [file join $outdir ${test}.s ]
+    set cfestdcpp     [file join $cfelib libstdc++.a ]
+    set cfegcc        [file join $cfelib libgcc.a ]
+    set cfec          [file join $cfelib libc.a ]
+    set crtend        [file join $cfelib libcrtend.a ]
     set execout ""
-    set retval [ catch { exec -keepnewline $compiler $testsrc -llvmbc -o $testbc } msg ] 
+    set retval [ catch { exec $compiler $testsrc -llvmbc -o $testbc } msg ] 
     if { $retval != 0 } {
       fail "$test: hlvm-compiler returned $retval:\n$msg"
     } else {
-      set retval [ catch { exec -keepnewline gccld -native -o $testexe $vmmain $vmlib $rtlib $testbc -L/proj/llvm/cfrontend/install/lib -L/proj/install/lib -L/proj/hlvm/hlvm/build.spADio/hlvm/Base -lHLVMBase -lLLVMSupport -lLLVMbzip2 -LLLVMSystem -lapr-1 -laprutil-1 -lstdc++ -lgcc -lc } msg ]
-      # Run the program compiled and see if it returns 0
+      set retval [ catch { exec gccld -o $testlinked $testbc $vmmain $vmlib $rtlib -L/proj/llvm/cfrontend/install/lib -L/proj/install/lib } msg ]
       if { $retval != 0 } {
         fail "$test: gccld returned $retval:\n$msg"
       } else {
-        set retval [ catch {exec $testexe } msg ]
-        if {$retval == 1} {
-          fail "$test: $testexe returned $retval:\n$msg"
+        set retval [ catch { exec llc -f -o $tests $testlinkedbc } msg ]
+        if { $retval != 0 } {
+          fail "$test: llc returned $retval:\n$msg"
         } else {
-          pass "$test"
+          set retval [ catch { exec gcc -f -o $testexe $tests -L/proj/hlvm/hlvm/build.spADio/hlvm/Base -L/proj/install/llvm/lib -lHLVMBase -lLLVMSupport -lLLVMbzip2 -LLLVMSystem -lapr-1 -laprutil-1 -lstdc++ } msg ]
+          if { $retval != 0 } {
+            fail "$test: gcc returned $retval:\n$msg"
+          } else {
+            set retval [ catch {exec $testexe } msg ]
+            if {$retval == 1} {
+              fail "$test: $testexe returned $retval:\n$msg"
+            } else {
+              pass "$test"
+            }
+          }
         }
       }
     }

Removed: hlvm/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/tools/Makefile?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/tools/Makefile (original)
+++ hlvm/trunk/tools/Makefile (removed)
@@ -1,6 +0,0 @@
-##===- tools/Makefile --------------------------------------*- Makefile -*-===##
-
-LEVEL=..
-DIRS=hlvm-xml2xml
-
-include $(LEVEL)/Makefile.hlvm

Removed: hlvm/trunk/tools/hlvm-xml2xml/Makefile
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/tools/hlvm-xml2xml/Makefile?rev=38148&view=auto

==============================================================================
--- hlvm/trunk/tools/hlvm-xml2xml/Makefile (original)
+++ hlvm/trunk/tools/hlvm-xml2xml/Makefile (removed)
@@ -1,9 +0,0 @@
-##===- tools/hlvm-xml2xml/Makefile -------------------------*- Makefile -*-===##
-
-LEVEL = ../..
-TOOLNAME = hlvm-xml2xml
-USEDLIBS = HLVMXMLWriter.a HLVMXMLReader.a HLVMAST.a HLVMBase.a
-LLVMLIBS = LLVMSupport.a LLVMSystem.a
-
-include $(LEVEL)/Makefile.hlvm
-





More information about the llvm-commits mailing list