summaryrefslogtreecommitdiff
path: root/make/console.pm
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-09-16 10:54:15 +0200
committerGitHub <noreply@github.com>2016-09-16 10:54:15 +0200
commitbdfde49fb6d9a8787c072b759d4af27584308e1b (patch)
tree0d79854e65b0de68fd2f85f9a0f8f6f06e6b4aed /make/console.pm
parent926361d233f4e6ea6a3964a070097fe637bd6bed (diff)
parent806e57433a38193ae14942ee60f573fe47f4b643 (diff)
Merge pull request #1219 from SaberUK/master+directive
Rewrite the build system directive parser.
Diffstat (limited to 'make/console.pm')
-rw-r--r--make/console.pm18
1 files changed, 11 insertions, 7 deletions
diff --git a/make/console.pm b/make/console.pm
index 621de0274..84fbaae4a 100644
--- a/make/console.pm
+++ b/make/console.pm
@@ -57,22 +57,26 @@ sub __console_format($$) {
sub print_format($;$) {
my $message = shift;
my $stream = shift // *STDOUT;
- while ($message =~ /(<\|(\S+)\s(.+?)\|>)/) {
+ while ($message =~ /(<\|(\S+)\s(.*?)\|>)/) {
my $formatted = __console_format $2, $3;
$message =~ s/\Q$1\E/$formatted/;
}
print { $stream } $message;
}
-sub print_error($) {
- my $message = shift;
- print_format "<|RED Error:|> $message\n", *STDERR;
+sub print_error {
+ print_format "<|RED Error:|> ", *STDERR;
+ for my $line (@_) {
+ print_format "$line\n", *STDERR;
+ }
exit 1;
}
-sub print_warning($) {
- my $message = shift;
- print_format "<|YELLOW Warning:|> $message\n", *STDERR;
+sub print_warning {
+ print_format "<|YELLOW Warning:|> ", *STDERR;
+ for my $line (@_) {
+ print_format "$line\n", *STDERR;
+ }
}
sub prompt_bool($$$) {