Allow some skew in checking when a router said it was hibernating
[tor.git] / Makefile.am
blobcb85d2559ee75f4654b3775eeeaa7752c8351008
1 # Copyright (c) 2001-2004, Roger Dingledine
2 # Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
3 # Copyright (c) 2007-2010, The Tor Project, Inc.
4 # See LICENSE for licensing information
6 AUTOMAKE_OPTIONS = foreign
7  # else it keeps trying to put COPYING back in
9 SUBDIRS = src doc contrib
11 DIST_SUBDIRS = src doc contrib
13 EXTRA_DIST = INSTALL README LICENSE ChangeLog          \
14              ReleaseNotes tor.spec tor.spec.in
16 #install-data-local:
17 #       $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
19 # Assume a tarball is in .. for now.
20 dist-rpm:
21         RPM_BUILD_DIR="/tmp/tor-rpm-build-$$$$";                \
22         rm -rf $$RPM_BUILD_DIR;                                 \
23         mkdir $$RPM_BUILD_DIR || exit 1;                        \
24         for subdir in BUILD RPMS SOURCES SPECS SRPMS; do        \
25             mkdir $$RPM_BUILD_DIR/$$subdir;                     \
26         done;                                                   \
27         mkdir $$RPM_BUILD_DIR/SOURCES/tor-$(VERSION);           \
28         cp -R ./ $$RPM_BUILD_DIR/SOURCES/tor-$(VERSION)/;       \
29         pushd $$RPM_BUILD_DIR/SOURCES/;                         \
30         tar zcf tor-$(VERSION).tar.gz ./;                       \
31         popd;                                                   \
32         LIBS=-lrt rpmbuild -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
33         mv $$RPM_BUILD_DIR/SRPMS/* .;                           \
34         mv $$RPM_BUILD_DIR/RPMS/* .;                            \
35         rm -rf $$RPM_BUILD_DIR
37 dist-osx:
38         @if [ "x$(prefix)" != 'x/Library/Tor' ]; then \
39           echo "Configure with --prefix=/Library/Tor, please"; \
40           exit 1; \
41         fi; \
42         if [ "x$(bindir)" != 'x/Library/Tor' ]; then \
43           echo "Configure with --bindir=/Library/Tor, please"; \
44           exit 1; \
45         fi; \
46         if [ "x$(sysconfdir)" != 'x/Library' ]; then \
47           echo "Configure with --sysconfdir=/Library, please"; \
48           exit 1; \
49         fi; \
50         if [ "x$(CONFDIR)" != 'x/Library/Tor' ]; then \
51           echo "Configure with CONFDIR=/Library/Tor, please"; \
52         fi
53         $(MAKE) all
54         VERSION=$(VERSION) sh ./contrib/osx/package.sh
56 dist: check
58 doxygen:
59         doxygen && cd doc/doxygen/latex && make
61 test: all
62         ./src/test/test
64 # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
65 # eventdns.[hc], tinytest*.[ch]
66 check-spaces:
67         ./contrib/checkSpace.pl -C                    \
68                 src/common/*.h                        \
69                 src/common/[^asO]*.c src/common/address.c \
70                 src/or/[^e]*.[ch] src/or/eventdns_tor.h \
71                 src/test/test*.[ch] src/tools/*.[ch]
73 check-docs:
74         ./contrib/checkOptionDocs.pl
76 check-logs:
77         ./contrib/checkLogs.pl                        \
78                 src/*/*.[ch] | sort -n