460b9539 |
1 | # |
2 | # This file is part of DisOrder. |
3 | # Copyright (C) 2006 Richard Kettlewell |
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 |
27 | disorder_LDADD=$(LIBOBJS) ../lib/libdisorder.la |
28 | disorder_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.la |
29 | |
30 | disorderfm_SOURCES=disorderfm.c |
31 | disorderfm_LDADD=$(LIBOBJS) ../lib/libdisorder.la |
32 | disorderfm_DEPENDENCIES=$(LIBOBJS) ../lib/libdisorder.la |
33 | |
34 | filename_bytes_SOURCES=filename-bytes.c |
35 | |
36 | test_eclient_SOURCES=test-eclient.c |
37 | test_eclient_LDADD=../lib/libdisorder.la |
38 | test_eclient_DEPENDENCIES=../lib/libdisorder.la |
39 | |
40 | install-exec-hook: |
41 | $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir) |
42 | |
43 | check: check-help check-completions |
44 | |
45 | # check everything has working --help |
46 | check-help: all |
47 | ./disorder --version > /dev/null |
48 | ./disorder --help > /dev/null |
49 | ./disorder --help-commands > /dev/null |
50 | |
51 | # check that the command completions are up to date |
52 | check-completions: |
53 | ./disorder --help-commands \ |
54 | | awk '/^ [a-z]/ { print $$1 }' \ |
55 | | sort > ,commands |
56 | ( set -e;completions() { \ |
57 | for x; do \ |
58 | case $$x in\ |
59 | quack ) ;;\ |
60 | [a-z]* ) echo $$x; ;;\ |
61 | esac;\ |
62 | done;\ |
63 | }; \ |
64 | complete() { if [ "$$7" = disorder ]; then completions $$6; fi }; \ |
65 | . ${top_srcdir}/scripts/completion.bash )\ |
66 | | sort > ,completions |
67 | diff -u ,commands ,completions |
68 | |
69 | CLEANFILES=,commands ,completions |