* Makefile.am (opcode.def): Make $(srcdir)!=$(builddir) safe.
authorRaja R Harinath <harinath@hurrynot.org>
Mon, 2 Aug 2004 04:16:47 +0000 (04:16 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Mon, 2 Aug 2004 04:16:47 +0000 (04:16 -0000)
* make-opcodes-def.pl (OUTPUT): Use $ARGV[1].
(parsefile): Parse $ARGV[0].

svn path=/trunk/mono/; revision=31727

mono/cil/ChangeLog
mono/cil/Makefile.am
mono/cil/make-opcodes-def.pl

index 50171ae904f88f310c30fc752318b8a56fe79849..f7caed914ff55db4d09468a2721945621b57eaaf 100644 (file)
@@ -1,3 +1,9 @@
+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
index 12141fc56fb2cb72f438d40601116f86b585c4dd..5e3f1554c2c28ee43b9aff414ebf63f928a1c68d 100644 (file)
@@ -1,6 +1,6 @@
-
 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
index 3114918bb6512267b93896dba71100d0be68413a..a94c15778cac608d1f83d9d1e23421d0de139da9 100644 (file)
@@ -19,10 +19,10 @@ my %valid_flow;
 # 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: $!";