]> git.donarmstrong.com Git - debhelper.git/blob - dh_testdir
cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813 Thanks, Simon Ruderich for the patch...
[debhelper.git] / dh_testdir
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_testdir - test directory before building Debian package
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_testdir> [S<I<debhelper options>>] [S<I<file> ...>]
15
16 =head1 DESCRIPTION
17
18 B<dh_testdir> tries to make sure that you are in the correct directory when
19 building a Debian package. It makes sure that the file F<debian/control>
20 exists, as well as any other files you specify. If not,
21 it exits with an error.
22
23 =head1 OPTIONS
24
25 =over 4
26
27 =item I<file> ...
28
29 Test for the existence of these files too.
30
31 =back
32
33 =cut
34
35 init();
36 inhibit_log();
37
38 foreach my $file ('debian/control', @ARGV) {
39         if (! -e $file) {
40                 error("\"$file\" not found. Are you sure you are in the correct directory?");
41         }
42 }
43
44 =head1 SEE ALSO
45
46 L<debhelper(7)>
47
48 This program is a part of debhelper.
49
50 =head1 AUTHOR
51
52 Joey Hess <joeyh@debian.org>
53
54 =cut