]> git.donarmstrong.com Git - debhelper.git/blob - dh_auto_build
dh_auto_test: New program, automates running make test or make check if the Makefile...
[debhelper.git] / dh_auto_build
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_auto_build - automatically builds a package
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_auto_build> [S<I<debhelper options>>] [S<B<--> I<params>>]
15
16 =head1 DESCRIPTION
17
18 dh_auto_build is a debhelper program that tries to automatically
19 build a package. If a Makefile is found, this is done by running make (or
20 MAKE, if the environment variable is set).
21 If there's a setup.py, it is run to build the package.
22
23 This is intended to work for about 90% of packages. If it doesn't work,
24 you're encoruaged to skip using dh_auto_build at all, and just run the
25 build process manually.
26
27 =head1 OPTIONS
28
29 =over 4
30
31 =item B<--> I<params>
32
33 Pass "params" to the program that is run. These can be used to suppliment
34 or override any standard parameters that dh_auto_build passes.
35
36 =back
37
38 =cut
39
40 init();
41
42 if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
43         doit(exists $ENV{MAKE} ? $ENV{MAKE} : "make", @{$dh{U_PARAMS}});
44 }
45 elsif (-e "setup.py") {
46         doit("python setup.py", "build", @{$dh{U_PARAMS}});
47 }
48
49 =head1 SEE ALSO
50
51 L<debhelper(7)>
52
53 This program is a part of debhelper.
54
55 =head1 AUTHOR
56
57 Joey Hess <joeyh@debian.org>
58
59 =cut