chiark / gitweb /
87ad60f40d178da03ad826f4ccecc66cfb41ca04
[adns.git] / Makefile.in
1 # Makefile[.in] - top-level Makefile
2 #  
3 #  This file is part of adns, which is
4 #    Copyright (C) 1997-2000,2003,2006,2014  Ian Jackson
5 #    Copyright (C) 2014  Mark Wooding
6 #    Copyright (C) 1999-2000,2003,2006  Tony Finch
7 #    Copyright (C) 1991 Massachusetts Institute of Technology
8 #  (See the file INSTALL for full details.)
9
10 #  This program is free software; you can redistribute it and/or modify
11 #  it under the terms of the GNU General Public License as published by
12 #  the Free Software Foundation; either version 3, or (at your option)
13 #  any later version.
14 #  
15 #  This program is distributed in the hope that it will be useful,
16 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
17 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 #  GNU General Public License for more details.
19 #  
20 #  You should have received a copy of the GNU General Public License
21 #  along with this program; if not, write to the Free Software Foundation.
22
23 include         ./common.make
24
25 # Remember to change ADNS_VERSION_STRING in client/client.h too, and
26 # possibly library soname (MAJOR and MINOR in common.make.in).
27 DISTVERSION=    1.5.0~rc0
28
29 srcdir=         @srcdir@
30 VPATH=          @srcdir@
31
32 ENABLE_DYNAMIC= @ENABLE_DYNAMIC@
33 ifeq ($(ENABLE_DYNAMIC),elf)
34 SUBDIRS_DYNAMIC=dynamic
35 else
36 SUBDIRS_DYNAMIC=
37 endif
38
39 WEBDIR=web
40
41 SUBDIRS= src $(SUBDIRS_DYNAMIC) client regress
42
43 all install uninstall clean distclean mostlyclean maintainer-clean distprep:
44         set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
45         $(MAKE) $@-here
46
47 all-here install-here uninstall-here distprep-here:     README
48
49 clean-here mostlyclean-here:
50                 rm -f *~ ./#*# core *.orig *.rej adns-*.tar.gz
51                 rm -rf dist_tmp web adnshost.txt
52
53 distclean-here maintainer-clean-here:   clean-here
54         rm -f settings.make config.cache config.log config.status Makefile
55
56 install-strip:
57         $(MAKE) INSTALL_PROGRAM_FLAGS=-s
58
59 dist_tmp=dist_tmp/adns-$(DISTVERSION)
60 dist:                   distprep
61         rm -rf dist_tmp*
62         mkdir dist_tmp $(dist_tmp)
63         find \( -name .git -o -name dist_tmp* \) -prune -o -type d -print | \
64                 sed -e 's#.*#mkdir -p $(dist_tmp)/&#' | sh
65         find \( -name .git -o -name dist_tmp* \) -prune -o -type f -print | \
66                 sed -e 's#.*#ln & $(dist_tmp)/&#' | sh
67         $(MAKE) -C dist_tmp/adns-$(DISTVERSION) distclean
68         cd dist_tmp && tar cf ../$(dist_tmp).tar `basename $(dist_tmp)`
69         gzip -9 $(dist_tmp).tar
70         mv $(dist_tmp).tar.gz .
71
72 adnshost.txt: all
73         client/adnshost_s --help >$@.tmp && mv -f $@.tmp $@
74
75 web-install: adnshost.txt
76         test -e $(WEBDIR) || mkdir $(WEBDIR)
77         $(INSTALL_DATA) $(srcdir)/README.html $(WEBDIR)/index.html
78         $(INSTALL_DATA) $(srcdir)/src/adns.h $(WEBDIR)/adns.h.txt
79         $(INSTALL_DATA) COPYING $(WEBDIR)/COPYING.txt
80         $(INSTALL_DATA) adnshost.txt $(WEBDIR)/
81
82 check:                  all
83         $(MAKE) -C regress check
84
85 README:                 README.html
86         lynx -dump -number_links -cfg=/dev/null $(srcdir)/README.html >README.tmp
87         mv -f README.tmp $(srcdir)/README
88
89 TAGS info dvi:
90         # do nothing
91
92 .PHONY: install #people with case-insensitive filesystems lose otherwise!