]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/mkcommandlist.pl
CHANSERV: add missing error statements.
[irc/quakenet/newserv.git] / chanserv / mkcommandlist.pl
index 8ccd6d73be65bae5c626363ca66aea877ac6c248..00f6bde6133d87559c83bc612f747cecaffb97d0 100755 (executable)
@@ -25,6 +25,13 @@ unless (@ARGV) {
   $modname=$ARGV[0];
 }
 
+my $rootpath;
+if($#ARGV >= 1) {
+  $rootpath=$ARGV[1];
+} else {
+  $rootpath="..";
+}
+
 my $smallname;
 $smallname=$modname;
 $smallname=~s/\.so$//;
@@ -109,7 +116,7 @@ if (@files < 1) {
 open CL, ">commandlist.c";
 
 print CL "/* Automatically generated by mkcommandlist.pl, do not edit. */\n\n";
-print CL "#include \"../chanserv.h\"\n\n";
+print CL "#include \"".$rootpath."/chanserv.h\"\n\n";
 
 # Print prototypes
 print CL "/* Prototypes */\n";