Skip to content

Commit

Permalink
configure: fall back to using full path if src is a directory
Browse files Browse the repository at this point in the history
Or when building in-tree.
Also don't try to remove src on distclean in these cases.

Signed-off-by: Andreas Cadhalpun <[email protected]>
  • Loading branch information
Andreas Cadhalpun authored and Andreas Cadhalpun committed Feb 6, 2016
1 parent 956fed3 commit e740c3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ clean::

distclean::
$(RM) $(DISTCLEANSUFFIXES)
$(RM) config.* .config libavutil/avconfig.h .version avversion.h version.h libavutil/ffversion.h libavcodec/codec_names.h src
$(RM) config.* .config libavutil/avconfig.h .version avversion.h version.h libavutil/ffversion.h libavcodec/codec_names.h
ifeq ($(SRC_LINK),src)
$(RM) src
endif
$(RM) -rf doc/examples/pc-uninstalled

config:
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -4710,7 +4710,7 @@ link_name=$(mktemp -u $TMPDIR/name_XXXXXXXX)
mkdir "$link_dest"
$ln_s "$link_dest" "$link_name"
touch "$link_dest/test_file"
if [ -e "$link_name/test_file" ]; then
if [ "$source_path" != "." ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then
# create link to source path
[ -e src ] && rm src
$ln_s "$source_path" src
Expand Down

0 comments on commit e740c3f

Please sign in to comment.