Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 1 | # vim:ft=automake |
| 2 | |
Brian Aker | 870a314 | 2012-10-17 02:10:49 -0400 | [diff] [blame] | 3 | BUILT_SOURCES= |
Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 4 | EXTRA_DIST= |
| 5 | TESTS= |
| 6 | bin_PROGRAMS= |
| 7 | check_PROGRAMS= |
| 8 | lib_LTLIBRARIES= |
| 9 | man_MANS= |
| 10 | noinst_HEADERS= |
| 11 | noinst_LTLIBRARIES= |
| 12 | noinst_PROGRAMS= |
| 13 | |
| 14 | # GNU style is "make check", this will make check and test work |
| 15 | TESTS+= $(check_PROGRAMS) |
| 16 | test: check |
| 17 | |
Brian Aker | 6fa3a08 | 2012-10-17 00:16:32 -0400 | [diff] [blame] | 18 | ACLOCAL_AMFLAGS= -I m4 |
Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 19 | |
Jacob Appelbaum | 66064ff | 2012-07-11 09:44:34 +0200 | [diff] [blame] | 20 | # Our Debian version |
Jacob Appelbaum | 2c3a39f | 2012-07-11 09:54:34 +0200 | [diff] [blame] | 21 | DEBIAN_VERSION := $(shell if [ -e debian/changelog ]; then cat debian/changelog|head -n1|cut -d\- -f2| head -c 1; else echo "unknown"; fi) |
Jacob Appelbaum | 5de8b0a | 2012-02-02 01:43:22 +0100 | [diff] [blame] | 22 | |
Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 23 | EXTRA_DIST+= AUTHORS |
| 24 | EXTRA_DIST+= README |
| 25 | EXTRA_DIST+= LICENSE |
| 26 | EXTRA_DIST+= TODO |
| 27 | EXTRA_DIST+= apparmor-profile |
| 28 | EXTRA_DIST+= CHANGELOG |
| 29 | EXTRA_DIST+= autogen.sh |
| 30 | |
| 31 | include src/include.am |
Jacob Appelbaum | e9b8042 | 2012-07-09 23:01:43 +0200 | [diff] [blame] | 32 | |
Brian Aker | b12abad | 2012-10-16 01:25:00 -0400 | [diff] [blame] | 33 | # Cleanup individual files in order to preserve uninstall/etc order |
| 34 | maintainer-clean-local: |
| 35 | @rm -r -f autom4te.cache |
| 36 | @rm Makefile.in |
| 37 | @rm aclocal.m4 |
| 38 | @rm config.in |
| 39 | @rm config/config.guess |
| 40 | @rm config/config.sub |
| 41 | @rm config/depcomp |
| 42 | @rm config/install-sh |
| 43 | @rm config/ltmain.sh |
| 44 | @rm config/missing |
| 45 | @rm configure |
| 46 | @rmdir config |
| 47 | @rm m4/libtool.m4 |
| 48 | @rm m4/ltoptions.m4 |
| 49 | @rm m4/ltsugar.m4 |
| 50 | @rm m4/ltversion.m4 |
| 51 | @rm m4/lt~obsolete.m4 |
Brian Aker | 6fa3a08 | 2012-10-17 00:16:32 -0400 | [diff] [blame] | 52 | @rm -f tlsdate-*.tar.gz |
Jacob Appelbaum | d16abc3 | 2012-10-30 16:22:36 +0100 | [diff] [blame] | 53 | @rm src/configmake.h |
Brian Aker | d4ad519 | 2012-10-16 03:55:56 -0400 | [diff] [blame] | 54 | @find ./ | $(GREP) \~$$ | xargs rm -f |
Christian Grothoff | 16fe93e | 2012-02-14 00:11:23 +0100 | [diff] [blame] | 55 | |
Brian Aker | 870a314 | 2012-10-17 02:10:49 -0400 | [diff] [blame] | 56 | certdir = @TLSDATE_CA_ROOTS@ |
| 57 | cert_DATA = ca-roots/tlsdate-ca-roots.conf |
| 58 | EXTRA_DIST+= $(cert_DATA) |
| 59 | |
| 60 | |
Jacob Appelbaum | 5de8b0a | 2012-02-02 01:43:22 +0100 | [diff] [blame] | 61 | # Our documentation |
Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 62 | man_MANS+= man/tlsdate.1 |
Jacob Appelbaum | 6a86a24 | 2012-10-29 21:45:26 +0100 | [diff] [blame] | 63 | man_MANS+= man/tlsdated.1 |
Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 64 | man_MANS+= man/tlsdate-helper.1 |
Jacob Appelbaum | 7727ec9 | 2012-10-30 22:39:20 +0100 | [diff] [blame^] | 65 | man_MANS+= man/tlsdate-routeup.1 |
Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 66 | EXTRA_DIST+= $(man_MANS) |
Jacob Appelbaum | 5de8b0a | 2012-02-02 01:43:22 +0100 | [diff] [blame] | 67 | |
Brian Aker | b12abad | 2012-10-16 01:25:00 -0400 | [diff] [blame] | 68 | .PHONY: debian_orig git-tag git-push git-tag-debian deb really-clean valgrind_test |
Jacob Appelbaum | c61b0d0 | 2012-07-09 20:53:49 +0200 | [diff] [blame] | 69 | debian_orig: |
Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 70 | $(MAKE) distcheck |
Jacob Appelbaum | c61b0d0 | 2012-07-09 20:53:49 +0200 | [diff] [blame] | 71 | mv tlsdate-$(VERSION).tar.gz ../tlsdate_$(VERSION).orig.tar.gz |
Jacob Appelbaum | cd24b1c | 2012-07-09 21:54:34 +0200 | [diff] [blame] | 72 | |
| 73 | git-tag: |
| 74 | git tag -u 0xD81D840E -s tlsdate-$(VERSION) |
| 75 | |
Jacob Appelbaum | 66064ff | 2012-07-11 09:44:34 +0200 | [diff] [blame] | 76 | git-tag-debian: |
| 77 | git tag -u 0xD81D840E -s tlsdate-$(VERSION)-debian-${DEBIAN_VERSION} |
| 78 | |
Jacob Appelbaum | cd24b1c | 2012-07-09 21:54:34 +0200 | [diff] [blame] | 79 | git-push: |
| 80 | git push --tags |
| 81 | git push |
Jacob Appelbaum | 66064ff | 2012-07-11 09:44:34 +0200 | [diff] [blame] | 82 | |
| 83 | deb: debian_orig |
Jacob Appelbaum | aecba05 | 2012-10-30 16:00:42 +0100 | [diff] [blame] | 84 | debuild -i'.*' -rfakeroot -uc -us -d |
Jacob Appelbaum | 76630ba | 2012-08-03 00:43:43 -0700 | [diff] [blame] | 85 | |
| 86 | valgrind_test: |
Brian Aker | 95d9fd5 | 2012-10-15 22:44:03 -0400 | [diff] [blame] | 87 | TESTS_ENVIRONMENT="./libtool --mode=execute valgrind --trace-children=yes --leak-check=full" ./src/tlsdate -v -V -n -H encrypted.google.com |
Jacob Appelbaum | 2860442 | 2012-10-12 18:25:31 -0700 | [diff] [blame] | 88 | |
| 89 | # This allows us to parse the Mozilla NSS CA trusted root list and ensures we |
| 90 | # respect the trust bits as they are set - using them directly without the |
| 91 | # context is dangerous. This gives us a basic set of CA roots to trust for use |
| 92 | # with tlsdate without relying on any system CA list. |
| 93 | # You'll need agl's extract-nss-root-certs to recreate this file: |
| 94 | # https://github.com/agl/extract-nss-root-certs |
| 95 | update_ca_root_data: |
| 96 | curl https://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt\?raw\=1 -o ca-roots/certdata.txt |
Jacob Appelbaum | 0f52017 | 2012-10-15 19:18:44 -0700 | [diff] [blame] | 97 | go run ~/Documents/code/git/extract-nss-root-certs/convert_mozilla_certdata.go ca-roots/certdata.txt > ca-roots/tlsdate-ca-roots.conf |
| 98 | rm ca-roots/certdata.txt |
| 99 | |
Jacob Appelbaum | d16abc3 | 2012-10-30 16:22:36 +0100 | [diff] [blame] | 100 | BUILT_SOURCES+= src/configmake.h |
| 101 | noinst_HEADERS+= src/configmake.h |
| 102 | src/configmake.h: ${top_srcdir}/Makefile.in |
Brian Aker | 870a314 | 2012-10-17 02:10:49 -0400 | [diff] [blame] | 103 | @echo "Making $@" |
| 104 | @rm -f $@-t $@ |
| 105 | @{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ |
| 106 | echo '#define TLSDATE_CONFIG "$(sysconfdir)/ca-roots/"'; \ |
| 107 | } | sed '/""/d' > $@-t |
| 108 | @if diff $@-t $@ >/dev/null 2>&1 ; then \ |
| 109 | rm @-t ; \ |
| 110 | else \ |
| 111 | mv $@-t $@ ; \ |
| 112 | fi |
| 113 | |