summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2007-11-05 18:06:38 +0100
committerJim Meyering <meyering@redhat.com>2007-11-05 18:06:38 +0100
commit656c37d630880bb92d36fec44dca2114252d3550 (patch)
tree0e0f9a06cdd3484eab84085a4541251503f73a8a /bootstrap
parent17d3924e9ec38d98e82e004f5442619b3514ecbd (diff)
downloadcoreutils-656c37d630880bb92d36fec44dca2114252d3550.tar.xz
Fix bootstrap failure to handle files like lib/uniwidth/cjk.h.
* bootstrap (cp_mark_as_generated): Create any required parent destination directories before copying a file into place.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap5
1 files changed, 5 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index 0e2bd34fd..110c77a7c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -366,6 +366,11 @@ cp_mark_as_generated()
*) c1= ; c2= ;;
esac
+ # If the destination directory doesn't exist, create it.
+ # This is required at least for "lib/uniwidth/cjk.h".
+ dst_dir=`dirname "$cp_dst"`
+ test -d "$dst_dir" || mkdir -p "$dst_dir"
+
if test -z "$c1"; then
cmp -s "$cp_src" "$cp_dst" || {
echo "$0: cp -f $cp_src $cp_dst" &&