Rename this for consistency.
[beanstalkd.git] / Makefile.am
blobd821bbd9da5f9a10ee189f92651dc43972d5f6a5
1 AUTOMAKE_OPTIONS = foreign no-dependencies subdir-objects
3 program = beanstalkd
5 bin_PROGRAMS = $(program)
6 aux_sources = \
7         binlog.c \
8         conn.c \
9         job.c \
10         ms.c \
11         net.c \
12         pq.c \
13         primes.c \
14         prot.c \
15         tube.c \
16         util.c
17 beanstalkd_SOURCES = beanstalkd.c $(aux_sources)
19 tests = \
20         $(srcdir)/tests/test_conn.c \
21         $(srcdir)/tests/test_job.c \
22         $(srcdir)/tests/test_ms.c \
23         $(srcdir)/tests/test_net.c \
24         $(srcdir)/tests/test_pq.c \
25         $(srcdir)/tests/test_prot.c \
26         $(srcdir)/tests/test_reserve.c \
27         $(srcdir)/tests/test_tube.c \
28         $(srcdir)/tests/test_util.c
30 EXTRA_DIST = cutgen.c $(tests) cut.h sh-tests check.sh check-one.sh \
31         binlog.h \
32         conn.h \
33         job.h \
34         ms.h \
35         net.h \
36         pq.h \
37         primes.h \
38         prot.h \
39         stat.h \
40         tube.h \
41         util.h
43 dist_doc_DATA = doc/protocol.txt
44 dist_man_MANS = doc/beanstalkd.1
46 check-cut: tests/cutcheck 
47         tests/cutcheck
49 check-shell: $(program)
50         $(srcdir)/check.sh $(srcdir)/sh-tests/*.commands
52 check: check-cut check-shell
54 cutgen: cutgen.c
56 tests/cutcheck.c: $(tests) cutgen
57         mkdir -p tests
58         ./cutgen -o tests/cutcheck.c $(tests)
60 tests/cutcheck: tests/cutcheck.o $(aux_sources:.c=.o) $(tests:.c=.o)
61         $(LINK) $^ $(beanstalkd_LDADD) $(LIBS)
63 CLEANFILES = cutgen tests/cutcheck* tests/*.o
65 DISTCLEANFILES = core core.* gmon.out $(program)-*.tar.gz
67 dist-hook:
68         echo -e '#!/bin/sh\n\n# This file was generated by "make dist".\necho $(VERSION)' > $(distdir)/version.sh
69         chmod +x $(distdir)/version.sh