This patch ensures that the directory exists before trying to write to it.
(ops2c.pl already had this logic; this patch just replicates it in
ops2pm.pl.)
diff -r -u parrot-current/build_tools/ops2pm.pl parrot-andy/build_tools/ops2pm.pl
--- parrot-current/build_tools/ops2pm.pl Mon Nov 29 10:30:33 2004
+++ parrot-andy/build_tools/ops2pm.pl Mon Nov 29 16:03:00 2004
@@ -225,6 +225,10 @@
# finally create an include file with opcode number
my $inc_f = "include/parrot/oplib/ops.h";
+my $inc_dir = "include/parrot/oplib";
+if (! -d $inc_dir) {
+ mkdir($inc_dir, 0755) or die "ops2pm.pl: Could not mkdir $inc_dir: $!\n";
+}
open OUT, ">$inc_f" or die "Can't write $inc_f: $!";
print OUT <<END_C;
--
Andy Dougherty doug...@lafayette.edu
> This patch ensures that the directory exists before trying to write to it.
> (ops2c.pl already had this logic; this patch just replicates it in
> ops2pm.pl.)
Thanks, applied.
leo