From 8cebe2a951a765c16213e5f84ac0db8101d8ea41 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 6 Sep 2010 17:28:52 +0200 Subject: make shadow builds not write into the source dir like mkspecs/features, mkspecs/modules needs special treatment. --- configure | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 07b7b97..f2b6455 100755 --- a/configure +++ b/configure @@ -2411,18 +2411,26 @@ if [ "$OPT_SHADOW" = "yes" ]; then ln -s "$relpath"/mkspecs/* "$outpath/mkspecs" rm -f "$outpath/mkspecs/default" + ShadowMkspecs() + { + rm -rf "$outpath/mkspecs/$1" + if [ "$UNAME_SYSTEM" = "Linux" ]; then + # This works with GNU coreutils, and is needed for ScratchBox + cp -rs "$relpath/mkspecs/$1" "$outpath/mkspecs/$1" + else + # A simple "cp -rs" doesn't work on Mac. :( + find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p + find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%" + fi + } + # Special case for mkspecs/features directory. # To be able to place .prf files into a shadow build directory, # we're creating links for files only. The directory structure is reproduced. - rm -rf "$outpath/mkspecs/features" - if [ "$UNAME_SYSTEM" = "Linux" ]; then - # This works with GNU coreutils, and is needed for ScratchBox - cp -rs "$relpath/mkspecs/features" "$outpath/mkspecs/features" - else - # A simple "cp -rs" doesn't work on Mac. :( - find "$relpath/mkspecs/features" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p - find "$relpath/mkspecs/features" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%" - fi + ShadowMkspecs features + + # The modules dir is special, too. + ShadowMkspecs modules # symlink the doc directory rm -rf "$outpath/doc" -- cgit v0.12