]> git.donarmstrong.com Git - debhelper.git/blob - dh_auto_build
dh_auto_build: New program, automates building the package by either running make...
[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.
20 If there's a setup.py, it is run to build the package.
21
22 This is intended to work for about 90% of packages. If it doesn't work,
23 you're encoruaged to skip using dh_auto_build at all, and just run the
24 build process manually.
25
26 =head1 OPTIONS
27
28 =over 4
29
30 =item B<--> I<params>
31
32 Pass "params" to the program that is run. These can be used to suppliment
33 or override the standard parameters that dh_auto_build passes.
34
35 =back
36
37 =cut
38
39 init();
40
41 if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
42         doit($ENV{MAKE}, @{$dh{U_PARAMS}});
43 }
44 elsif (-e "setup.py") {
45         doit("python setup.py", "build", @{$dh{U_PARAMS}});
46 }
47
48 =head1 SEE ALSO
49
50 L<debhelper(7)>
51
52 This program is a part of debhelper.
53
54 =head1 AUTHOR
55
56 Joey Hess <joeyh@debian.org>
57
58 =cut