Placate all the compilers. Ugly.
[beanstalkd.git] / Makefile.am
blobc58c1c5e22e7cfbd1bfdbf8eae3dd7590a779186
1 AUTOMAKE_OPTIONS = foreign no-dependencies subdir-objects
2 ACLOCAL_AMFLAGS = -I m4
4 program = beanstalkd
6 bin_PROGRAMS = $(program)
7 aux_sources = \
8         binlog.c \
9         conn.c \
10         job.c \
11         ms.c \
12         net.c \
13         port.c \
14         pq.c \
15         primes.c \
16         prot.c \
17         tube.c \
18         util.c
19 beanstalkd_SOURCES = beanstalkd.c $(aux_sources)
21 EXTRA_PROGRAMS = cutgen
22 cutgen_SOURCES = cutgen.c
24 tests = \
25         tests/test_job.c \
26         tests/test_pq.c
28 scripts = \
29         scripts/beanstalkd.init \
30         scripts/beanstalkd.sysconfig
32 readme = \
33         README-DEVELOPERS \
34         README-TESTS
36 EXTRA_DIST = cut.c $(tests) $(scripts) $(readme) cut.h sh-tests check.sh check-one.sh \
37         beanstalkd.spec \
38         binlog.h \
39         conn.h \
40         job.h \
41         ms.h \
42         net.h \
43         port.h \
44         pq.h \
45         primes.h \
46         prot.h \
47         stat.h \
48         tube.h \
49         util.h
51 dist_doc_DATA = doc/protocol.txt
52 dist_man_MANS = doc/beanstalkd.1
54 check-cut: tests/cutcheck
55         tests/cutcheck
57 check-shell: $(program)
58         $(srcdir)/check.sh $(srcdir)/sh-tests/*.{commands,sh}
60 check: check-cut check-shell
62 tests/cutcheck.c: $(tests) cutgen
63         mkdir -p tests
64         ./cutgen -o tests/cutcheck.c $(tests:%=$(srcdir)/%)
66 tests/cutcheck: tests/cutcheck.o cut.o $(aux_sources:.c=.o) $(tests:.c=.o)
67         $(LINK) $^ $(beanstalkd_LDADD) $(LIBS)
69 CLEANFILES = cutgen tests/cutcheck* tests/*.o
71 DISTCLEANFILES = core core.* gmon.out $(program)-*.tar.gz
73 dist-hook:
74         echo -e '#!/bin/sh\n\n# This file was generated by "make dist".\necho $(VERSION)' > $(distdir)/version.sh
75         chmod +x $(distdir)/version.sh