* make-opcodes-def.pl (OUTPUT): Use $ARGV[1].
(parsefile): Parse $ARGV[0].
svn path=/trunk/mono/; revision=31727
+2004-08-02 Raja R Harinath <rharinath@novell.com>
+
+ * Makefile.am (opcode.def): Make $(srcdir)!=$(builddir) safe.
+ * make-opcodes-def.pl (OUTPUT): Use $ARGV[1].
+ (parsefile): Parse $ARGV[0].
+
2004-07-30 Duncan Mak <duncan@ximian.com>
* cil-opcodes.xml: Added OpCodeType information to each of the
-
opcode.def: make-opcodes-def.pl cil-opcodes.xml
- perl make-opcodes-def.pl < $(srcdir)/cil-opcodes.xml > opcode.def
+ perl $(srcdir)/make-opcodes-def.pl $(srcdir)/cil-opcodes.xml $@.tmp
+ mv $@.tmp $@
defdir = $(includedir)/mono/cil
def_DATA = opcode.def
# the XML file also includes "throw"
@valid_flow{qw(next call return branch meta cond-branch)} = ();
-open OUTPUT, ">opcode.def" || die "Can not create opcode.def file: $!";
+open OUTPUT, ">$ARGV[1]" || die "Can not create $ARGV[1] file: $!";
my $parser = new XML::Parser (Handlers => {Start => \&handle_opcode});
-$parser->parsefile("cil-opcodes.xml");
+$parser->parsefile($ARGV[0]);
print_trailer();
close(OUTPUT) || die "Can not close file: $!";