[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] autoheader: Write to stdout if an argument was given.
From: |
Andre Noll |
Subject: |
[PATCH] autoheader: Write to stdout if an argument was given. |
Date: |
Sat, 15 Jul 2017 23:18:11 +0200 |
The documentation says:
If you give `autoheader' an argument, it uses that file instead of
`configure.ac' and writes the header file to the standard output
instead of to `config.h.in'. If you give `autoheader' an argument of
`-', it reads the standard input instead of `configure.ac' and writes
the header file to the standard output.
However, currently autoheader writes its output to a file, regardless
of whether an argument is given. This patch makes it work as advertised.
Signed-off-by: Andre Noll <address@hidden>
---
bin/autoheader.in | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/bin/autoheader.in b/bin/autoheader.in
index 14b8f03..8f9dd51 100644
--- a/bin/autoheader.in
+++ b/bin/autoheader.in
@@ -55,7 +55,7 @@ local $config_h;
my $config_h_in;
my @prepend_include;
my @include;
-
+my $dst;
# $HELP
# -----
@@ -119,6 +119,10 @@ sub parse_args ()
my $configure_ac = require_configure_ac;
push @ARGV, $configure_ac;
}
+ else
+ {
+ $dst = "-";
+ }
}
@@ -298,7 +302,8 @@ $out->close;
if keys %symbol;
}
-update_file ("$tmp/config.hin", "$config_h_in", $force);
+$dst = "$config_h_in" unless defined $dst;
+update_file ("$tmp/config.hin", "$dst", $force);
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
--
2.7.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] autoheader: Write to stdout if an argument was given.,
Andre Noll <=