summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorLuke Shumaker <luke@HP-dv6246us-u910.(none)>2010-03-28 12:25:08 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:19 -0600
commit98f2efbe20e2d9d03e5296293cc8f52c95af72f5 (patch)
treedf5ab79539c7a4b5bc5a056dc14a4f7a4c5be665 /configure
parentd4a42ee34928970141b8299c104d47c0f3faecd0 (diff)
Rework rvs a lot (no longer needs complex C dependency tracker!)
Rework ./configure, and how it uses `srcdir'. Probably broke all the other packages. Oh well, everything only half-works right now.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 11 insertions, 12 deletions
diff --git a/configure b/configure
index 764690a..861b37f 100755
--- a/configure
+++ b/configure
@@ -17,20 +17,17 @@ name='configure' # Luke's configureation script
# along with this program; see the file COPYING.
# If not, see <http://www.gnu.org/licenses>.
+srcdir=$(readlink -f `dirname "$0"`)
+
_DESTDIR=''
_prefix='/usr/local'
_exec_prefix='$(prefix)'
_bindir='$(exec_prefix)/bin'
_sbindir='$(exec_prefix)/sbin'
_libexecdir='$(exec_prefix)/libexec'
- _srcdir=$(readlink -f `dirname "$0"`)
_CONFIG="$@"
-vars='DESTDIR prefix exec_prefix bindir sbindir libexecdir srcdir CONFIG'
-case "$1" in
- --srcdir) _srcdir="$2"; shift 2;;
- --srcdir=*) _srcdir=${1/--srcdir=/}; shift;;
-esac
-if [ -f "$_srcdir/config" ]; then . "$_srcdir/config"; fi
+vars='DESTDIR prefix exec_prefix bindir sbindir libexecdir CONFIG'
+if [ -f "$srcdir/config" ]; then . "$srcdir/config"; fi
error() {
echo "$name: $1" >> /dev/stderr
@@ -41,9 +38,9 @@ varargs=`echo "$vars " | sed -e 's/ */:,/g' -e 's/,$//'`
args=`getopt -n "$name" -o "${sopt}" -l "${lopt}${varargs}" -- "$@"`
if [ $? == 0 ]; then
set -- $args
- echo "$@"
while [ $# -gt 0 ]; do case "$1" in
--) break;;
+ --srcdir) srcdir="$2"; shift;;
--*)
var0="${1/--/}"
match='false'
@@ -84,13 +81,15 @@ for var in $vars; do
echo "s:@$var@:$val:g" >> var.sed
done
-Makefiles="`find "${_srcdir}/" -type f -name Makefile.in`"
-Makefiles="$Makefiles `find "${_srcdir}/" -type f -name *.mk.in`"
+Makefiles="`find "$srcdir/" -type f -name 'Makefile.in'`"
+Makefiles="`find "$srcdir/" -type f -name '*.mk.in'` $Makefiles"
for orig in $Makefiles; do
- new=${orig/%.in/} #bashism
- new=${new/#$_srcdir\//} #bashism
+ new=${orig/%.in/} #bashism
+ new=${new/#$srcdir\//} #bashism
+ path=`dirname "$orig"`
mkdir -p `dirname "$new"`
sed -f var.sed "${orig}" | sed \
+-e "s:@srcdir@:${path//':'/'\:'}/:g" \
-e '19 a# DO NOT edit this file, it has been generated by configure, and will' \
-e "19 a# be overwritten. Instead, edit the file \``basename ${orig}`'" \
-e "19 a