mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 05:32:25 +00:00
Make Stacker into a complete project with its own configuration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c37a506d44
commit
820dab7a62
@ -7,13 +7,11 @@
|
||||
#
|
||||
# Indicates our relative path to the top of the project's root directory.
|
||||
#
|
||||
LEVEL = ../..
|
||||
LEVEL = .
|
||||
|
||||
#
|
||||
# Directories that needs to be built.
|
||||
#
|
||||
# Disable the 'test' and 'samples' subdirectories until they work correctly
|
||||
#DIRS = lib tools test samples
|
||||
DIRS = lib tools
|
||||
|
||||
#
|
||||
|
28
projects/Stacker/Makefile.common.in
Normal file
28
projects/Stacker/Makefile.common.in
Normal file
@ -0,0 +1,28 @@
|
||||
#
|
||||
# Set this variable to the top of the LLVM source tree.
|
||||
#
|
||||
LLVM_SRC_ROOT = @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 = @LLVM_OBJ@
|
||||
|
||||
#
|
||||
# Include LLVM's Master Makefile.
|
||||
#
|
||||
include $(LLVM_OBJ_ROOT)/Makefile.config
|
||||
|
||||
#
|
||||
# Set the source root and source directory pathnames
|
||||
#
|
||||
BUILD_SRC_DIR := $(subst //,/,@abs_top_srcdir@/$(patsubst $(BUILD_OBJ_ROOT)%,%,$(BUILD_OBJ_DIR)))
|
||||
|
||||
BUILD_SRC_ROOT := $(subst //,/,@abs_top_srcdir@)
|
||||
|
||||
#
|
||||
# Include LLVM's Master Makefile.
|
||||
#
|
||||
include $(LLVM_SRC_ROOT)/Makefile.rules
|
||||
|
18
projects/Stacker/autoconf/AutoRegen.sh
Executable file
18
projects/Stacker/autoconf/AutoRegen.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
die () {
|
||||
echo "$@" 1>&2
|
||||
exit 1
|
||||
}
|
||||
test -d autoconf && test -f autoconf/configure.ac && cd autoconf
|
||||
[ -f configure.ac ] || die "Can't find 'autoconf' dir; please cd into it first"
|
||||
echo "Regenerating aclocal.m4 with aclocal"
|
||||
aclocal || die "aclocal failed"
|
||||
autoconf --version | egrep '2\.5[0-9]' > /dev/null
|
||||
if test $? -ne 0
|
||||
then
|
||||
die "Your autoconf was not detected as being 2.5x"
|
||||
fi
|
||||
echo "Regenerating configure with autoconf 2.5x"
|
||||
autoconf -o ../configure configure.ac || die "autoconf failed"
|
||||
cd ..
|
||||
exit 0
|
24
projects/Stacker/autoconf/LICENSE.TXT
Normal file
24
projects/Stacker/autoconf/LICENSE.TXT
Normal file
@ -0,0 +1,24 @@
|
||||
------------------------------------------------------------------------------
|
||||
Autoconf Files
|
||||
------------------------------------------------------------------------------
|
||||
All autoconf files are licensed under the LLVM license with the following
|
||||
additions:
|
||||
|
||||
llvm/autoconf/install-sh:
|
||||
This script is licensed under the LLVM license, with the following
|
||||
additional copyrights and restrictions:
|
||||
|
||||
Copyright 1991 by the Massachusetts Institute of Technology
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation, and that the name of M.I.T. not be used in advertising or
|
||||
publicity pertaining to distribution of the software without specific,
|
||||
written prior permission. M.I.T. makes no representations about the
|
||||
suitability of this software for any purpose. It is provided "as is"
|
||||
without express or implied warranty.
|
||||
|
||||
Please see the source files for additional copyrights.
|
||||
|
6306
projects/Stacker/autoconf/acinclude.m4
Normal file
6306
projects/Stacker/autoconf/acinclude.m4
Normal file
File diff suppressed because it is too large
Load Diff
1388
projects/Stacker/autoconf/config.guess
vendored
Executable file
1388
projects/Stacker/autoconf/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1489
projects/Stacker/autoconf/config.sub
vendored
Executable file
1489
projects/Stacker/autoconf/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
65
projects/Stacker/autoconf/configure.ac
Normal file
65
projects/Stacker/autoconf/configure.ac
Normal file
@ -0,0 +1,65 @@
|
||||
dnl **************************************************************************
|
||||
dnl * Initialize
|
||||
dnl **************************************************************************
|
||||
AC_INIT([[[Stacker]]],[[[1.0]]],[rspencer@x10sys.com])
|
||||
|
||||
dnl Place all of the extra autoconf files into the config subdirectory
|
||||
AC_CONFIG_AUX_DIR([autoconf])
|
||||
|
||||
dnl Configure a header file
|
||||
|
||||
dnl Configure Makefiles
|
||||
dnl List every Makefile that ecists within your source tree
|
||||
|
||||
AC_CONFIG_MAKEFILE(Makefile)
|
||||
AC_CONFIG_MAKEFILE(lib/Makefile)
|
||||
AC_CONFIG_MAKEFILE(lib/compiler/Makefile)
|
||||
AC_CONFIG_MAKEFILE(lib/runtime/Makefile)
|
||||
AC_CONFIG_MAKEFILE(tools/Makefile)
|
||||
AC_CONFIG_MAKEFILE(tools/stkrc/Makefile)
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Determine which system we are building on
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Check for programs.
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl Verify that the source directory is valid
|
||||
AC_CONFIG_SRCDIR([Makefile.common.in])
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Check for libraries.
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Checks for header files.
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Checks for typedefs, structures, and compiler characteristics.
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Checks for library functions.
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Enable various compile-time options
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Set the location of various third-party software packages
|
||||
dnl **************************************************************************
|
||||
|
||||
dnl Location of LLVM source code
|
||||
AC_ARG_WITH(llvmsrc,AC_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]),AC_SUBST(LLVM_SRC,[$withval]),AC_SUBST(LLVM_SRC,[`cd ${srcdir}/../..; pwd`]))
|
||||
|
||||
dnl Location of LLVM object code
|
||||
AC_ARG_WITH(llvmobj,AC_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),AC_SUBST(LLVM_OBJ,[$withval]),AC_SUBST(LLVM_OBJ,[`cd ../..; pwd`]))
|
||||
|
||||
dnl **************************************************************************
|
||||
dnl * Create the output files
|
||||
dnl **************************************************************************
|
||||
AC_OUTPUT(Makefile.common)
|
251
projects/Stacker/autoconf/install-sh
Normal file
251
projects/Stacker/autoconf/install-sh
Normal file
@ -0,0 +1,251 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
6290
projects/Stacker/autoconf/ltmain.sh
Normal file
6290
projects/Stacker/autoconf/ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
101
projects/Stacker/autoconf/mkinstalldirs
Executable file
101
projects/Stacker/autoconf/mkinstalldirs
Executable file
@ -0,0 +1,101 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id$
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi ;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 3
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
2365
projects/Stacker/configure
vendored
Executable file
2365
projects/Stacker/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@
|
||||
#
|
||||
# Indicates our relative path to the top of the project's root directory.
|
||||
#
|
||||
LEVEL = ../../..
|
||||
LEVEL = ..
|
||||
|
||||
#
|
||||
# Directories that needs to be built.
|
||||
|
@ -1,9 +1,9 @@
|
||||
##===- projects/sample/lib/sample/Makefile -----------------*- Makefile -*-===##
|
||||
##===- projects/Stacker/lib/compiler/Makefile --------------*- Makefile -*-===##
|
||||
|
||||
#
|
||||
# Indicate where we are relative to the top of the source tree.
|
||||
#
|
||||
LEVEL=../../../..
|
||||
LEVEL=../..
|
||||
|
||||
#
|
||||
# Give the name of a library. This will build a dynamic version.
|
||||
|
@ -1,9 +1,9 @@
|
||||
##===- projects/sample/lib/sample/Makefile -----------------*- Makefile -*-===##
|
||||
##===- projects/Stacker/lib/runtime/Makefile ---------------*- Makefile -*-===##
|
||||
|
||||
#
|
||||
# Indicate where we are relative to the top of the source tree.
|
||||
#
|
||||
LEVEL=../../../..
|
||||
LEVEL=../../
|
||||
|
||||
#
|
||||
# Give the name of a library. This will build a dynamic version.
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
# Indicates our relative path to the top of the project's root directory.
|
||||
#
|
||||
LEVEL = ../../..
|
||||
LEVEL = ..
|
||||
|
||||
#
|
||||
# Directories that needs to be built.
|
||||
|
@ -1,17 +1,18 @@
|
||||
##===- projects/sample/lib/sample/Makefile -----------------*- Makefile -*-===##
|
||||
##===- projects/Stacker/lib/stkrc/Makefile -----------------*- Makefile -*-===##
|
||||
|
||||
#
|
||||
# Indicate where we are relative to the top of the source tree.
|
||||
#
|
||||
LEVEL=../../../..
|
||||
LEVEL=../..
|
||||
|
||||
#
|
||||
# Give the name of a library. This will build a dynamic version.
|
||||
#
|
||||
TOOLNAME=stkrc
|
||||
USEDLIBS=stkr_compiler asmparser bcwriter transforms ipo.a ipa.a \
|
||||
LLVMLIBS= asmparser bcwriter transforms ipo.a ipa.a \
|
||||
scalaropts analysis.a target.a transformutils \
|
||||
vmcore support.a LLVMsystem.a
|
||||
USEDLIBS=stkr_compiler
|
||||
|
||||
|
||||
ifdef PARSE_DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user