460b9539 |
1 | # |
2 | # This file is part of DisOrder. |
622cdeda |
3 | # Copyright (C) 2006, 2007 Richard Kettlewell |
460b9539 |
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, but |
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | # 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
18 | # USA |
19 | # |
20 | |
21 | bin_PROGRAMS=disorder disorderfm |
22 | noinst_PROGRAMS=test-eclient filename-bytes |
23 | |
24 | AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib |
25 | |
26 | disorder_SOURCES=disorder.c authorize.c authorize.h |
0b861e97 |
27 | disorder_LDADD=$(LIBOBJS) ../lib/libdisorder.a \ |
28 | $(LIBDL) $(LIBGC) $(LIBGCRYPT) $(LIBPCRE) |
29 | disorder_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a |
460b9539 |
30 | |
31 | disorderfm_SOURCES=disorderfm.c |
0b861e97 |
32 | disorderfm_LDADD=$(LIBOBJS) ../lib/libdisorder.a $(LIBGC) |
33 | disorderfm_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.a |
460b9539 |
34 | |
35 | filename_bytes_SOURCES=filename-bytes.c |
36 | |
37 | test_eclient_SOURCES=test-eclient.c |
0b861e97 |
38 | test_eclient_LDADD=../lib/libdisorder.a \ |
39 | $(LIBDL) $(LIBGC) $(LIBGCRYPT) $(LIBPCRE) |
40 | test_eclient_DEPENDENCIES=../lib/libdisorder.a |
460b9539 |
41 | |
42 | install-exec-hook: |
43 | $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir) |
44 | |
45 | check: check-help check-completions |
46 | |
47 | # check everything has working --help |
48 | check-help: all |
49 | ./disorder --version > /dev/null |
50 | ./disorder --help > /dev/null |
51 | ./disorder --help-commands > /dev/null |
52 | |
53 | # check that the command completions are up to date |
54 | check-completions: |
55 | ./disorder --help-commands \ |
56 | | awk '/^ [a-z]/ { print $$1 }' \ |
57 | | sort > ,commands |
58 | ( set -e;completions() { \ |
59 | for x; do \ |
60 | case $$x in\ |
61 | quack ) ;;\ |
62 | [a-z]* ) echo $$x; ;;\ |
63 | esac;\ |
64 | done;\ |
65 | }; \ |
66 | complete() { if [ "$$7" = disorder ]; then completions $$6; fi }; \ |
67 | . ${top_srcdir}/scripts/completion.bash )\ |
68 | | sort > ,completions |
69 | diff -u ,commands ,completions |
70 | |
71 | CLEANFILES=,commands ,completions |