Remove *~ files on make clean.
[autobuildrequires.git] / Makefile.am
1 # Automatic generation of BuildRequires dependencies for rpmbuild.
2 # Copyright (C) 2008 Red Hat Inc.
3 # Written by Richard W.M. Jones <rjones@redhat.com>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 AM_CFLAGS = -Wall
20
21 libexec_PROGRAMS = auto-buildrequires-preload.so
22
23 auto_buildrequires_preload_so_SOURCES = auto-buildrequires-preload.c
24 auto_buildrequires_preload_so_CFLAGS = -fPIC -shared
25 # We need this in LDFLAGS, otherwise automake won't pass it
26 # on the command line when linking the .so file.
27 auto_buildrequires_preload_so_LDFLAGS = -ldl
28
29 bin_SCRIPTS = auto-br auto-br-rpmbuild
30
31 auto-br: auto-br.sh
32         cp $< $@
33         chmod +x $@
34 auto-br-rpmbuild: auto-br-rpmbuild.sh
35         cp $< $@
36         chmod +x $@
37
38 man_MANS = autobuildrequires.1 auto-br.1 auto-br-rpmbuild.1
39
40 autobuildrequires.1: autobuildrequires.pod
41         rm -f $@-t
42         pod2man --section 1 $< > $@-t
43         mv $@-t $@
44
45 CLEANFILES = $(bin_SCRIPTS) *~
46
47 libexec_SCRIPTS = auto-br-analyze.pl
48
49 EXTRA_DIST = \
50         autobuildrequires.pod \
51         auto-br-analyze.pl.in \
52         auto-br.1 \
53         auto-br.sh.in \
54         auto-br-rpmbuild.sh \
55         auto-br-rpmbuild.1 \
56         auto-buildrequires.spec \
57         auto-buildrequires.spec.in