summaryrefslogtreecommitdiff
path: root/libtoolize.in
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2004-09-17 14:13:04 +0000
committerGary V. Vaughan <gary@gnu.org>2004-09-17 14:13:04 +0000
commit4bf4433f70c911eb74f47f3f0af0b794b2e89ffb (patch)
tree32d323c2ac3d4605be1249a1a4b80e02bca5824f /libtoolize.in
parentc1fdd979bda5468c958116190a1ac1a8f5a2ad6e (diff)
downloadlibtool-4bf4433f70c911eb74f47f3f0af0b794b2e89ffb.tar.gz
Missed a couple of MKDIR_P references in ltmain.in in my last
patch; fix them carefully. Introduce an opt_dry_run to ltmain.in so that the implementations of func_mkdir_p can converge, and a func_mktempdir to do a better job of temporary directory creation: * libtoolize.in (func_mkdir_p): Don't fail if the directory wasn't created in dry run mode. * tests/defs (func_mkdir_p): Ditto. We don't actually have a dry run mode for the tests, but the function is written carefully to be kept in synch and work correctly here too. * config/ltmain.in (func_mkdir_p): Ditto. This copy of the function now only differs in its use of $echo over $ECHO. (func_extract_archive): Removed first redundant mkdir call. (func_mktempdir): New function that tries to avoid races when making temporary directories. (opt_dry_run): Set this if --dry-run is given at the CLI, or if tests/mdemo-dryrun.test has forced the value of $run. (func_mode_install): Call $MKDIR directly and error out if the directory cannot be created. (func_mode_link): Rather than copying func_mkdir_p into the wrapper script as a replacement for $MKDIR_P, we know that the script won't be called my `make -j', so write the current value of $MKDIR.
Diffstat (limited to 'libtoolize.in')
-rw-r--r--libtoolize.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/libtoolize.in b/libtoolize.in
index 9087bd3b..b1e467d7 100644
--- a/libtoolize.in
+++ b/libtoolize.in
@@ -315,7 +315,7 @@ func_mkdir_p ()
my_directory_path="$1"
my_dir_list=
- if test -n "$my_directory_path"; then
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
# Protect directory names starting with `-'
case $my_directory_path in
@@ -345,11 +345,11 @@ func_mkdir_p ()
$MKDIR "$my_dir" 2>/dev/null || :
done
IFS="$save_mkdir_p_IFS"
- fi
- # Bail out if we (or some other process) failed to create a directory.
- test -d "$my_directory_path" || \
- func_fatal_error "Failed to create \`$1'"
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
}