diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2009-07-30 12:02:04 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:13 -0600 |
commit | 56d4ab21576bcc3049f62374597b7a5f47a560ab (patch) | |
tree | cb9fd258c607ee0105ab057e6f05720d938b5e75 /configure | |
parent | 7f78b595ce3baf3ade82e546a3ed7cfba41c8ef9 (diff) |
tweak makefiles
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash name='configure' # rvs configureation script # version 0.7.0 # Copyright (C) 2009 Luke Shumaker @@ -9,13 +9,15 @@ name='configure' # rvs configureation script # # Originally written by Luke Shumaker <lukeshu@sbcglobal.net>. - _srcdir=$(readlink -f `dirname "$0"`) + _name='rvs' + _RVS='$(bindir)/$(rvs)' _SHELL='/bin/sh' _prefix='/usr/local' _exec_prefix='$(prefix)' _bindir='$(exec_prefix)/bin' _sbindir='$(exec_prefix)/sbin' - _rvsdir='/etc' + _libexecdir='$(exec_prefix)/libexec' + _srcdir=$(readlink -f `dirname "$0"`) vars='srcdir SHELL prefix exec_prefix bindir sbindir rvsdir' @@ -58,8 +60,12 @@ for var in $vars; do var1="_$var" val=${!var1} - var=${var//':'/'\:'} - val=${val//':'/'\:'} + # GNU bash optimized version + var=${var//':'/'\:'} + val=${val//':'/'\:'} + # POSIX version + #var=`echo "$var" | sed 's@:@\\:@g'` + #val=`echo "$val" | sed 's@:@\\:@g'` echo "s:@$var@:$val:g" >> var.sed done @@ -71,11 +77,10 @@ Makefiles=`find "${_srcdir}/" -regextype posix-extended \ -regex '(.*/)?Makefile\.in' -type f` for orig in $Makefiles; do - new=${orig/%.orig/} + new=${orig/%.in/} new=${new/#$_srcdir\//} mkdir -p `dirname "$new"` sed -f var.sed < "${orig}" > "${new}" done -#rm var.sed - +rm var.sed |