diff mbox

[FFmpeg-devel] configure: Do not overwrite src symlink if it exists

Message ID CAB0OVGpTHOUPpQXiJRAaNgcojdLW-w5BM1M5_sosz935N5eupg@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos April 24, 2019, 10:45 p.m. UTC
Hi!

Attached patch allows to run fate from wsl for out-of-tree builds.

Please comment, Carl Eugen

Comments

Carl Eugen Hoyos April 27, 2019, 11:12 a.m. UTC | #1
2019-04-25 0:45 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:

> Attached patch allows to run fate from wsl for out-of-tree builds.

I will push this patch if there are no objections.

Carl Eugen
Carl Eugen Hoyos May 5, 2019, 12:54 a.m. UTC | #2
Am Sa., 27. Apr. 2019 um 13:12 Uhr schrieb Carl Eugen Hoyos
<ceffmpeg@gmail.com>:
>
> 2019-04-25 0:45 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
>
> > Attached patch allows to run fate from wsl for out-of-tree builds.
>
> I will push this patch if there are no objections.

Patch applied.

Carl Eugen
diff mbox

Patch

From 8e8742a42a8e945c7d6c90810e6409cbb4210967 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Thu, 25 Apr 2019 00:42:48 +0200
Subject: [PATCH] configure: Do not overwrite src symlink if it already
 exists.

Allows running fate from out-of-tree builds on wsl.
---
 configure |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 3b11ffe..d2c5100 100755
--- a/configure
+++ b/configure
@@ -3742,6 +3742,8 @@  mkdir -p ffbuild
 # find source path
 if test -f configure; then
     source_path=.
+elif test -f src/configure; then
+    source_path=src
 else
     source_path=$(cd $(dirname "$0"); pwd)
     case "$source_path" in
@@ -5416,7 +5418,7 @@  link_name=$(mktemp -u $TMPDIR/name_XXXXXXXX)
 mkdir "$link_dest"
 $ln_s "$link_dest" "$link_name"
 touch "$link_dest/test_file"
-if [ "$source_path" != "." ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then
+if [ "$source_path" != "." ] && [ "$source_path" != "src" ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then
     # create link to source path
     [ -e src ] && rm src
     $ln_s "$source_path" src
-- 
1.7.10.4