make distcheck happy
[rxpd] / Makefile.am
1 #  Copyright (C)
2 #    2007,               Christian Thaeter <ct@pipapo.org>
3 #
4 #  This program is free software; you can redistribute it and/or
5 #  modify it under the terms of the GNU General Public License as
6 #  published by the Free Software Foundation; either version 2 of the
7 #  License, or (at your option) any later version.
8 #
9 #  This program is distributed in the hope that it will be useful,
10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 #  GNU General Public License for more details.
13 #
14 #  You should have received a copy of the GNU General Public License
15 #  along with this program; if not, write to the Free Software
16 #  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 AUTOMAKE_OPTIONS=gnu
19
20 rxpd_srcdir = $(top_srcdir)/src
21
22 bin_PROGRAMS = rxpd
23 check_PROGRAMS =
24 EXTRA_DIST =
25 CLEANFILES =
26
27 rxpd_CFLAGS = $(CFLAGS) -std=gnu99 -Wall -Wextra -Werror
28 rxpd_LDADD = -lpth
29
30 rxpd_SOURCES =                                  \
31         $(rxpd_srcdir)/rxpd.h                   \
32         $(rxpd_srcdir)/main.c                   \
33         $(rxpd_srcdir)/psplay.c                 \
34         $(rxpd_srcdir)/llist.h                  \
35         $(rxpd_srcdir)/psplay.h                 \
36         $(rxpd_srcdir)/rxpd_base.c              \
37         $(rxpd_srcdir)/rxpd_buffer.c            \
38         $(rxpd_srcdir)/rxpd_connection.c        \
39         $(rxpd_srcdir)/rxpd_connection_cmd.c    \
40         $(rxpd_srcdir)/rxpd_file.c              \
41         $(rxpd_srcdir)/rxpd_rule.c              \
42         $(rxpd_srcdir)/rxpd_socket.c
43
44 #### test suite
45
46 tests_srcdir = $(top_srcdir)/tests
47 TESTS = $(tests_srcdir)/test.sh
48
49 EXTRA_DIST +=                                           \
50         $(tests_srcdir)/test.sh                         \
51         $(tests_srcdir)/files/example                   \
52         $(tests_srcdir)/files/policy                    \
53         $(tests_srcdir)/10basics.tests                  \
54         $(tests_srcdir)/20simplecommands.tests          \
55         $(tests_srcdir)/30listmanipulation.tests
56
57 CLEANFILES += ,* files/*
58
59 #### maintainer targets
60
61 meta.TODO:
62         w3m -no-cookie -dump 'http://www.pipapo.org/pipawiki/RegexPolicyDaemon/ToDo?action=print' |\
63         (read; read; cat) > $(top_srcdir)/TODO
64
65 meta.README:
66         w3m -no-cookie -dump 'http://www.pipapo.org/pipawiki/RegexPolicyDaemon/Documentation?action=print' |\
67         (read; read; cat) > $(top_srcdir)/README
68
69 meta.AUTHORS:
70         w3m -no-cookie -dump 'http://www.pipapo.org/pipawiki/RegexPolicyDaemon/Authors?action=print' |\
71         (read; read; cat) > $(top_srcdir)/AUTHORS
72
73 meta.NEWS:
74         w3m -no-cookie -dump 'http://www.pipapo.org/pipawiki/RegexPolicyDaemon/News?action=print' |\
75         (read; read; cat) > $(top_srcdir)/NEWS
76
77 meta.ChangeLog:
78         git log --pretty='format:HEADER:%ai %an <%ae>%n%n%s%n' |\
79         sed -e 's/\(.*\)/    \1/;s/    HEADER:\([-0-9]*\) [0-9:]* [0-9+]* \(.*\)/\1 \2/' > $(top_srcdir)/ChangeLog
80
81 meta: meta.TODO meta.README meta.AUTHORS meta.NEWS meta.ChangeLog
82
83 release: meta dist
84         list='$(DIST_ARCHIVES)'; for i in $$list; do \
85                 gpg -s $$i;\
86                 rm $$i;\
87         done