diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2009-07-13 16:07:25 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:11 -0600 |
commit | 1a65ae278e81946ec3a8af43b1f6f18c26e1161a (patch) | |
tree | b08ab355f44ca036ff4e9743966454d5df1a1e09 /configure | |
parent | 1f75a1dff61a33dea973ebeea64a3bd8bccb715a (diff) |
rvs-0.6.1 -- make it possible to compile from another directory
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -9,6 +9,8 @@ # # Originally written by Luke Shumaker <lukeshu@sbcglobal.net>. +sourcedir=`dirname "$0"` + while [ $# -gt 0 ]; do case "$1" in --*) var0=`echo "$1" | sed -e 's/^--//' -e 's/=.*$//'` @@ -49,11 +51,12 @@ while read line; do echo 's/$$'"${var}"'$\$/'"${val}"'/' >> tmp/var.sed #sed -i.bak 's/$$'"${var}"'$\$/'"${val}"'/' "$files" unset var val -done < Variables +done < "$sourcedir/Variables" chmod +x tmp/var.sed -tmp/var.sed < Makefile.orig > Makefile +tmp/var.sed < "$sourcedir/Makefile.orig" > Makefile n0='# DO NOT edit this file, it has been generated by configure, and will be' n1='# overwritten. Instead, edit the file `Makefile.orig'\' -sed -i -e "10 a$n0" -e "10 a$n1" Makefile +sourcedir=`echo "$sourcedir" | sed 's:/:\\\\/:g'` +sed -i -e "10 a$n0" -e "10 a$n1" -e "s/@@sourcedir@@/$sourcedir/" Makefile |