]> git.donarmstrong.com Git - debhelper.git/blob - t/override_target
cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813 Thanks, Simon Ruderich for the patch...
[debhelper.git] / t / override_target
1 #!/usr/bin/perl
2 use Test;
3 plan(tests => 1);
4
5 # This test is here to detect breakage in
6 # dh's rules_explicit_target, which parses
7 # slightly internal make output.
8 system("mkdir -p t/tmp/debian");
9 system("cp debian/control t/tmp/debian");
10 open (OUT, ">", "t/tmp/debian/rules") || die "$!";
11 print OUT <<EOF;
12 #!/usr/bin/make -f
13 %:
14         PATH=../..:\$\$PATH PERL5LIB=../.. ../../dh \$@
15 override_dh_auto_build:
16         echo "override called"
17 EOF
18 close OUT;
19 system("chmod +x t/tmp/debian/rules");
20 my @output=`cd t/tmp && debian/rules build 2>&1`;
21 ok(grep { m/override called/ } @output);
22 system("rm -rf t/tmp");