diff options
author | Andrew Shadura <andrewsh@debian.org> | 2014-01-05 22:42:41 +0100 |
---|---|---|
committer | Andrew Shadura <andrew@shadura.me> | 2015-07-25 14:44:33 +0200 |
commit | c8659b636be5e763c5dc028a5db7294b1af2648c (patch) | |
tree | 7dacf7580ff8c7d8c64682eaa28350bc47fbd56e /debian/mkcmake.pm | |
parent | 004c4cd3db1d9ad252eccbc1e9e6c54ec61a2927 (diff) | |
parent | aba913436a8521abe405a04ed71388989e1d646f (diff) |
Imported Debian patch 0.25.0-1
Diffstat (limited to 'debian/mkcmake.pm')
-rw-r--r-- | debian/mkcmake.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/debian/mkcmake.pm b/debian/mkcmake.pm index 016685e..3c1e83c 100644 --- a/debian/mkcmake.pm +++ b/debian/mkcmake.pm @@ -17,19 +17,19 @@ sub DESCRIPTION { sub exists_make_target { my ($this, $target) = @_; - # Use make -n to check to see if the target would do - # anything. There's no good way to test if a target exists. - my @opts=("-s", "-n"); + # Use -V .ALLTARGETS to get the list of targets; -n is + # needed to avoid executing anything + my @opts=("-n", "-V", ".ALLTARGETS"); my $buildpath = $this->get_buildpath(); unshift @opts, "-C", $buildpath if $buildpath ne "."; open(SAVEDERR, ">&STDERR"); open(STDERR, ">/dev/null"); - open(MAKE, "-|", $this->{makecmd}, @opts, $target); + open(MAKE, "-|", $this->{makecmd}, @opts); my $output=<MAKE>; chomp $output; close MAKE; open(STDERR, ">&SAVEDERR"); - return defined $output && length $output; + return defined $output && grep(/^$target$/, split(" ",$output)); } # Currently, we don't want parallel build with bmake. |