diff options
author | Kent Boortz <kent@mysql.se> | 2000-07-28 01:53:35 +0200 |
---|---|---|
committer | Kent Boortz <kent@mysql.se> | 2000-07-28 01:53:35 +0200 |
commit | 5073d8c97cc2787491961a0c1927416efe56c39e (patch) | |
tree | feef20adc75a5386273aa9c0afcbc298f3f756e1 | |
parent | 11aeccd5c557b1cc2f3a78c02155e1511de3d465 (diff) | |
download | gmp-5073d8c97cc2787491961a0c1927416efe56c39e.tar.gz |
Create target directories from configure script
-rwxr-xr-x | macos/configure | 91 |
1 files changed, 62 insertions, 29 deletions
diff --git a/macos/configure b/macos/configure index ef09d9f9e..b5c361259 100755 --- a/macos/configure +++ b/macos/configure @@ -23,8 +23,8 @@ # ***************************** NOTE ************************************** # This script try to figure out things about this release but has a hard -# time doing it. So it reads some lines in "configure", "Makefile.am" and -# "mp*/Makefile.am" and try to guess things. So with every new release +# time doing it. It reads some lines in "configure", "Makefile.am" and +# "mp*/Makefile.am" and try to guess things. With every new release # this script has to be tested. # ***************************** NOTE ************************************** @@ -39,39 +39,28 @@ use strict; $/ = "\012" # Input files use Unix end-of-line chars if $^O eq 'MacOS'; -sub mf { - my $path = shift; - - return $path unless $^O eq 'MacOS'; - - $path =~ /:/ and die "File name already converted to mac format: $path\n"; - - if ($path =~ s&^/&&) { - # Absolute path - unless ($path =~ s&/&:&g) { - # This is a drive name - $path .= ':'; - } - } else { - # Relative path - if ($path =~ s&/&:&g) { - # Contains slash - $path = ":$path"; - $path =~ s&\.\.:&:&g; - } else { - # Plain file name, no directory part - } - } - return $path; -} - - ########################################################################### # # Constants # ########################################################################### +# Directories to create + +my @dirs = + ( + 'MpfObj', + 'MpnObj', + 'MpqObj', + 'MpzObj', + 'CmnObj', + 'AsmObj', + 'Asm', + 'MpfBin', + 'MpqBin', + 'MpzBin', + ); + my $cfg; # Will point to %cfg_apple or %cfg_cw my %cfg_apple = @@ -191,6 +180,17 @@ close CONFIG_IN; ########################################################################### # +# Create directories +# +########################################################################### + +foreach (@dirs) { + -d $_ or mkdir $_, 0775 + or die "Can't create directory \"$_\"\n"; +} + +########################################################################### +# # Parse the *.asm files found and convert them to MPW format # ########################################################################### @@ -419,3 +419,36 @@ sub asm_prologue { HERE return $asm; } + + +########################################################################### +# +# Platform dependent filename conversion +# +########################################################################### + +sub mf { + my $path = shift; + + return $path unless $^O eq 'MacOS'; + + $path =~ /:/ and die "File name already converted to mac format: $path\n"; + + if ($path =~ s&^/&&) { + # Absolute path + unless ($path =~ s&/&:&g) { + # This is a drive name + $path .= ':'; + } + } else { + # Relative path + if ($path =~ s&/&:&g) { + # Contains slash + $path = ":$path"; + $path =~ s&\.\.:&:&g; + } else { + # Plain file name, no directory part + } + } + return $path; +} |