fixed typo
[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 lib_LIBRARIES = librxpd_client.a
24 check_PROGRAMS =
25 EXTRA_DIST =
26 CLEANFILES =
27
28 rxpd_CFLAGS = $(CFLAGS) -std=gnu99 -Wall -Wextra -Werror
29 rxpd_LDADD = -lpth
30
31 rxpd_SOURCES =                                  \
32         $(rxpd_srcdir)/rxpd.h                   \
33         $(rxpd_srcdir)/main.c                   \
34         $(rxpd_srcdir)/psplay.c                 \
35         $(rxpd_srcdir)/llist.h                  \
36         $(rxpd_srcdir)/psplay.h                 \
37         $(rxpd_srcdir)/rxpd_base.c              \
38         $(rxpd_srcdir)/rxpd_buffer.c            \
39         $(rxpd_srcdir)/rxpd_connection.c        \
40         $(rxpd_srcdir)/rxpd_connection_cmd.c    \
41         $(rxpd_srcdir)/rxpd_file.c              \
42         $(rxpd_srcdir)/rxpd_rule.c              \
43         $(rxpd_srcdir)/rxpd_socket.c
44
45
46
47 #### client library
48
49 librxpd_client_a_CFLAGS = $(CFLAGS) -std=gnu99 -Wall -Wextra -Werror
50
51 librxpd_client_a_SOURCES =              \
52         $(rxpd_srcdir)/rxpd_client.c
53
54 include_HEADERS =                       \
55         $(rxpd_srcdir)/rxpd_client.h
56
57
58 #### test suite
59
60 tests_srcdir = $(top_srcdir)/tests
61 TESTS = $(tests_srcdir)/test.sh
62
63 EXTRA_DIST +=                                           \
64         $(tests_srcdir)/test.sh                         \
65         $(tests_srcdir)/files/example                   \
66         $(tests_srcdir)/files/policy                    \
67         $(tests_srcdir)/*.tests
68
69 CLEANFILES += ,* files/*/* files/*
70
71 #### maintainer targets
72
73 EXTRA_DIST += VERSION
74
75 $(top_srcdir)/VERSION:
76         git describe >$(top_srcdir)/VERSION
77
78 meta.TODO:
79         LC_ALL=C w3m -no-cookie -dump 'http://www.pipapo.org/pipawiki/RegexPolicyDaemon/ToDo?action=print' |\
80         (read; read; cat) > $(top_srcdir)/TODO
81
82 meta.README:
83         LC_ALL=C w3m -no-cookie -dump 'http://www.pipapo.org/pipawiki/RegexPolicyDaemon/Documentation?action=print' |\
84         (read; read; cat) > $(top_srcdir)/README
85
86 meta.AUTHORS:
87         LC_ALL=C w3m -no-cookie -dump 'http://www.pipapo.org/pipawiki/RegexPolicyDaemon/Authors?action=print' |\
88         (read; read; cat) > $(top_srcdir)/AUTHORS
89
90 meta.NEWS:
91         LC_ALL=C w3m -no-cookie -dump 'http://www.pipapo.org/pipawiki/RegexPolicyDaemon/News?action=print' |\
92         (read; read; cat) > $(top_srcdir)/NEWS
93
94 meta.ChangeLog:
95         git log --pretty='format:HEADER:%ai %an <%ae>%n%n%s%n' |\
96         sed -e 's/\(.*\)/    \1/;s/    HEADER:\([-0-9]*\) [0-9:]* [0-9+]* \(.*\)/\1 \2/' > $(top_srcdir)/ChangeLog
97
98 meta: $(top_srcdir)/VERSION meta.TODO meta.README meta.AUTHORS meta.NEWS meta.ChangeLog
99
100 release: clean meta dist
101         list='$(DIST_ARCHIVES)'; for i in $$list; do \
102                 gpg -s $$i;\
103                 rm $$i;\
104         done