From ec2d8b3092ca49a0e955b769bbcc8b43b49d026e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sun, 16 Mar 2008 21:13:56 +0100 Subject: [PATCH] fix some problems (not all) with lightningize 2008-03-14 Paolo Bonzini * lightningize.in: Fix some problems (not all). --- ChangeLog | 4 ++++ lightningize.in | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4e2001cc..868d0eb63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-03-14 Paolo Bonzini + + * lightningize.in: Fix some problems (not all). + 2008-03-14 Paolo Bonzini * lightning/i386/core-32.h: Avoid some "value computed is not used" diff --git a/lightningize.in b/lightningize.in index 830b1037e..8abff21bd 100644 --- a/lightningize.in +++ b/lightningize.in @@ -32,10 +32,11 @@ PACKAGE=@PACKAGE@ VERSION=@VERSION@ # Directory names. -prefix=@prefix@ -datarootdir=@datarootdir@ -datadir=@datadir@ -includedir=@includedir@ +prefix="@prefix@" +datarootdir="@datarootdir@" +datadir="@datadir@" +includedir="@includedir@" +pkgincludedir=$includedir/$PACKAGE aclocaldir=${datadir}/aclocal BACKENDS="@BACKENDS@" @@ -190,16 +191,17 @@ for i in $file_base_names; do files="$files lightning:$pkgincludedir/$i-common.h" done for j in $BACKENDS; do - dir=`expr $j : '\([^:]*\)' ` - suffix=`expr $j : '.*:\(.*\)' ` + dir=`echo $j | sed -e 's,:.*,,' ` + suffix=`echo $j | sed -ne 's,.*:,,p' ` dirs="$dirs lightning/$dir" for i in $file_base_names; do - files="$files lightning/$j:$pkgincludedir/$j/$i$suffix.h" + files="$files lightning/$dir:$pkgincludedir/$dir/$i$suffix.h" done done for dir in $dirs; do - if $mkdir $dir; then : + if test -d $dir; then : + elif $mkdir $dir; then : else echo "$progname: cannot create \`$dir'" 1>&2 status=1