X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fconfigure.pm;h=82d14f5649d7f0f847de376bf8c3cbcc3bed68b5;hb=c5d9b2d6c14414b8933c2e7f60995ca7b01a2d05;hp=48bd8db3842a445d352f79a7236f240261a11c74;hpb=01527a4652b71fc8af7d047ad6fdb8dfc37636a7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/configure.pm b/make/configure.pm index 48bd8db38..82d14f564 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -139,6 +139,9 @@ PATH OPTIONS --module-dir=[dir] The location where the loadable modules are stored. [$PWD/run/modules] + --script-dir=[dir] The location where the scripts, such as the + init scripts, are stored. + [$PWD/run] EXTRA MODULE OPTIONS @@ -208,9 +211,9 @@ sub test_file($$;$) { sub test_header($$;$) { my ($compiler, $header, $args) = @_; $args //= ''; - open(COMPILER, "| $compiler -E - $args ${\CONFIGURE_ERROR_PIPE}") or return 0; - print COMPILER "#include <$header>"; - close(COMPILER); + open(my $fh, "| $compiler -E - $args ${\CONFIGURE_ERROR_PIPE}") or return 0; + print $fh "#include <$header>"; + close $fh; return !$?; } @@ -257,11 +260,11 @@ sub parse_templates($$$) { # Iterate through files in make/template. foreach () { print_format "Parsing <|GREEN $_|> ...\n"; - open(TEMPLATE, $_) or print_error "unable to read $_: $!"; - my (@lines, $mode, @platforms, %targets); + open(my $fh, $_) or print_error "unable to read $_: $!"; + my (@lines, $mode, @platforms, @targets); # First pass: parse template variables and directives. - while (my $line =