On Mon, 15 Oct 2001, Andy Dougherty wrote:

> ops2c and ops2pm need to make sure the directory for the output file
> exists before trying to create any files in that directory.

This is still true.  Patch reproduced below.

> diff -r -u parrot/ops2c.pl parrot-andy/ops2c.pl
> --- parrot/ops2c.pl   Sat Oct 13 20:43:49 2001
> +++ parrot-andy/ops2c.pl      Mon Oct 15 08:57:15 2001
> @@ -23,6 +23,7 @@
>  my $base = $file;
>  $base =~ s/\.ops$//;
>  
> +my $incdir  = "include/parrot/oplib";
>  my $include = "parrot/oplib/${base}_ops.h";
>  my $header  = "include/$include";
>  my $source  = "${base}_ops.c";
> @@ -43,6 +44,10 @@
>  #
>  # Open the output files:
>  #
> +
> +if (! -d $incdir) {
> +    mkdir $incdir or die "ops2cpl: Could not mkdir $incdir $!!\n";
> +}
>  
>  open HEADER, ">$header"
>    or die "ops2c.pl: Could not open header file '$header' for writing: $!!\n";
> diff -r -u parrot/ops2pm.pl parrot-andy/ops2pm.pl
> --- parrot/ops2pm.pl  Sat Oct 13 20:43:49 2001
> +++ parrot-andy/ops2pm.pl     Mon Oct 15 09:10:35 2001
> @@ -28,6 +28,7 @@
>  $base =~ s/\.ops$//;
>  
>  my $package = "${base}";
> +my $moddir  = "Parrot/OpLib";
>  my $module  = "Parrot/OpLib/${package}.pm";
>  
>  
> @@ -47,6 +48,9 @@
>  # Open the output file:
>  #
>  
> +if (! -d $moddir) {
> +    mkdir $moddir or die "ops2pm.pl: Could not mkdir $moddir: $!!\n";
> +}
>  open MODULE, ">$module"
>    or die "ops2pm.pl: Could not open module file '$module' for writing: $!!\n";
>  

-- 
    Andy Dougherty              [EMAIL PROTECTED]
    Dept. of Physics
    Lafayette College, Easton PA 18042

Reply via email to