summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-06-28 18:45:13 +0100
committerMans Rullgard <mans@mansr.com>2011-06-29 09:14:56 +0100
commit5e27ec28f0aa263fc6af60ea88677e2c40631920 (patch)
treeb3a4e30d26dad20d77effee6f3ba962da50fbc69 /configure
parentda55ee6ccc05efdd9006bb8c31db9012a3326857 (diff)
build: create output directories as needed
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
1 files changed, 5 insertions, 26 deletions
diff --git a/configure b/configure
index f7112ea22c..a1cc59ae5b 100755
--- a/configure
+++ b/configure
@@ -875,9 +875,9 @@ apply(){
}
cp_if_changed(){
- cmp -s "$1" "$2" &&
- echo "$2 is unchanged" ||
- cp -f "$1" "$2"
+ cmp -s "$1" "$2" && echo "$2 is unchanged" && return
+ mkdir -p "$(dirname $2)"
+ cp -f "$1" "$2"
}
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
@@ -1675,10 +1675,8 @@ DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
# find source path
if test -f configure; then
source_path=.
- disable source_path_used
else
source_path=$(cd $(dirname "$0"); pwd)
- enable source_path_used
echo "$source_path" | grep -q '[[:blank:]]' &&
die "Out of tree builds are impossible with whitespace in source path."
test -e "$source_path/config.h" &&
@@ -3180,27 +3178,7 @@ echo "License: $license"
echo "Creating config.mak and config.h..."
-# build tree in object directory if source path is different from current one
-if enabled source_path_used; then
- DIRS="
- doc
- libavcodec
- libavcodec/$arch
- libavdevice
- libavfilter
- libavfilter/$arch
- libavformat
- libavutil
- libavutil/$arch
- libpostproc
- libswscale
- libswscale/$arch
- tests
- tools
- "
- map 'mkdir -p $v' $DIRS;
- $ln_s "$source_path/Makefile" .
-fi
+test -e Makefile || $ln_s "$source_path/Makefile" .
config_files="$TMPH config.mak"
@@ -3379,6 +3357,7 @@ version=$3
libs=$4
requires=$5
enabled ${name#lib} || return 0
+mkdir -p $name
cat <<EOF > $name/$name.pc
prefix=$prefix
exec_prefix=\${prefix}