common/tools/split_sysdef.pl
changeset 1078 551e851f4b49
parent 1077 f16ac94c147c
child 1241 776ca456c221
--- a/common/tools/split_sysdef.pl	Mon Jun 07 15:17:50 2010 +0100
+++ b/common/tools/split_sysdef.pl	Mon Jun 07 15:39:44 2010 +0100
@@ -13,8 +13,10 @@
 # Split a system model file into many package model files (one per package)
 
 use strict;
+
 use Getopt::Long;
 use XML::DOM;
+use File::Path;
 
 my $DEFAULT_OUTDIR = "models";
 
@@ -40,7 +42,7 @@
 	exit(0);
 }
 
-mkdir("$outdir") if (!-d$outdir);
+mkpath("$outdir") if (!-d $outdir);
 
 my $parser = new XML::DOM::Parser;
 my $doc = $parser->parsefile ($sysdef);