File: Gmake.pm

package info (click to toggle)
libmakefile-dom-perl 0.004-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 616 kB
  • ctags: 535
  • sloc: perl: 6,552; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package t::Gmake;

use lib 't/lib';
use Test::Make::Base -Base;
use FindBin;
#use Smart::Comments;

my $UTIL_PATH = File::Spec->catdir($FindBin::Bin, '../../../script');
my $MAIN_PATH = File::Spec->catdir($FindBin::Bin, '../../../script');
my $sh_vm  = $PERL . ' ' . File::Spec->catfile($UTIL_PATH, 'sh');
$sh_vm = $^O eq 'MSWin32' ? 'sh' : '/bin/sh';
my $pgmake = $PERL . ' ' . File::Spec->catfile($MAIN_PATH, 'pgmake');
$pgmake = 'make';

$ENV{MAKELEVEL} = 0;

set_make('GNU_MAKE_PATH', $pgmake);
set_shell('GNU_SHELL_PATH', $sh_vm);
set_filters(
    stdout => sub {
        my ($s) = @_;
        return $s if ! $s;
        return $s;
    },
    stderr => sub {
        my ($s) = @_;
        return $s if ! $s;
        $s =~ s/^$MAKE(?:\[\d+\])?:\s+Warning:\s+File `\S+' has modification time \S+ s in the future\n//gsmi;
        $s =~ s/^$MAKE(?:\[\d+\])?:\s+warning:  Clock skew detected\.  Your build may be incomplete\.\n//gsmi;
        $s =~ s{\.\\Makefile_}{./Makefile_}g;
        return $s;
    },
);

# to ease debugging (the output is normally small)
#no_diff();

1;