Browse Source

Build cleanups. Don't require sed in configure.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
38f191eb41
1 changed files with 23 additions and 10 deletions
  1. +23
    -10
      scripts/config-funcs

+ 23
- 10
scripts/config-funcs View File

@@ -33,7 +33,7 @@ ask ()
esac esac
fi fi


echo "${2}=${A:-$D}" >> make.conf
append "${2}=${A:-$D}"
} }


ok () ok ()
@@ -56,14 +56,26 @@ using ()


extract_options () extract_options ()
{ {
local OIFS
local line;


if [ -f make.conf ] if [ -f make.conf ]
then then
OIFS="$IFS"
IFS=''
eval "`sed -n '/^## options/{ : i; /^## libs/{ q }; p; n; b i }' make.conf`"
IFS="$OIFS"
{
while read line
do
[ "$line" = "## options" ] && break
done

while read line
do
if [ "$line" = "## libs" ]
then
break
else
eval "$line"
fi
done
} < make.conf
fi fi
} }


@@ -71,7 +83,6 @@ begin ()
{ {
echo -n "Checking sanity..." echo -n "Checking sanity..."
require_command pkg-config pkg-config > /dev/null require_command pkg-config pkg-config > /dev/null
require_command sed sed > /dev/null
ok ok
} }


@@ -80,15 +91,16 @@ begin_options ()
# get the old values # get the old values
extract_options extract_options


echo "# This file was automatically generated on `date`. Any changes may be lost!" > make.conf
echo "## options" >> make.conf
echo > make.conf
append "# This file was automatically generated on `date`. Any changes may be lost!"
append "## options"


echo "--- Configuration required ---" echo "--- Configuration required ---"
} }


begin_tests () begin_tests ()
{ {
echo "## libs" >> make.conf
append "## libs"
extract_options extract_options
} }


@@ -100,6 +112,7 @@ append ()
end () end ()
{ {
echo "--- Configuration complete ---" echo "--- Configuration complete ---"
touch make.conf
} }


require_command () require_command ()


Loading…
Cancel
Save