autoconf update.
[silc.git] / Makefile.am.pre
1 #
2 #  Makefile.am
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2002Pekka Riikonen
7 #
8 #  This program is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; version 2 of the License.
11 #
12 #  This program is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #  GNU General Public License for more details.
16 #
17
18 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
19
20 COMMONDIRS = lib irssi silc silcd doc includes
21
22 # Sub directories defined by "distributions" file, and can be overridden
23 # with ./configure, which substitutes these variables.
24 SUBDIRS = @SILC_DIST_SUBDIRS@
25 DIST_SUBDIRS = @SILC_DIST_SUBDIRS@
26
27 include $(top_srcdir)/Makefile.defines.in
28
29 dist-bzip: distdir
30         -chmod -R a+r $(distdir)
31         -tar chof $(distdir).tar $(distdir)
32         -bzip2 $(distdir).tar
33         -rm -rf $(distdir)
34
35 SILC_EXTRA_DIST = SILC_DISTRIBUTION_EXTRA
36 EXTRA_DIST = CHANGES CREDITS $(SILC_EXTRA_DIST)
37
38 #
39 # Installing of SILC into the system
40 #
41
42 etcdir = $(DESTDIR)$(silc_etcdir)
43 modulesdir = $(DESTDIR)$(silc_modulesdir)
44 helpdir = $(DESTDIR)$(silc_helpdir)
45 docdir = $(DESTDIR)$(silc_docdir)
46 logsdir = $(DESTDIR)$(silc_logsdir)
47
48 install-dirs:
49         -mkdir -p $(etcdir)
50         -mkdir -p $(modulesdir)
51         -mkdir -p $(helpdir)
52         -mkdir -p $(docdir)
53         -mkdir -p $(logsdir)
54
55 generate-server-key:
56         -@if test '!' -f $(etcdir)/silcd.pub ; then \
57           $(sbindir)/silcd -C $(etcdir); \
58         fi
59
60 sim-install:
61         -$(INSTALL_DATA) $(srcdir)/lib/silcsim/*.so $(modulesdir)/
62
63 doc-install:
64         $(INSTALL_DATA) $(srcdir)/doc/CodingStyle $(docdir)/
65         $(INSTALL_DATA) $(srcdir)/doc/FAQ $(docdir)/
66         $(INSTALL_DATA) $(srcdir)/doc/example_* $(docdir)/
67         $(INSTALL_DATA) $(srcdir)/doc/*.txt $(docdir)/
68         $(INSTALL_DATA) $(srcdir)/COPYING $(docdir)/
69         $(INSTALL_DATA) $(srcdir)/CHANGES $(docdir)/
70         $(INSTALL_DATA) $(srcdir)/CREDITS $(docdir)/
71         $(INSTALL_DATA) $(srcdir)/README* $(docdir)/
72         $(INSTALL_DATA) $(srcdir)/INSTALL $(docdir)/
73         $(INSTALL_DATA) $(srcdir)/TODO $(docdir)/
74
75 toolkit-install:
76         -mkdir -p $(docdir)/toolkit/
77         -$(INSTALL_DATA) $(srcdir)/doc/toolkit/* $(docdir)/toolkit
78         -$(INSTALL_DATA) $(srcdir)/lib/doc/*.gif $(docdir)/toolkit
79
80 examples-install:
81         -mkdir -p $(docdir)/examples/
82         $(INSTALL_DATA) $(srcdir)/doc/examples/README $(docdir)/examples/
83         $(INSTALL_DATA) $(srcdir)/doc/examples/silc* $(docdir)/examples/
84         $(INSTALL_DATA) $(srcdir)/doc/examples/cell* $(docdir)/examples/
85
86 etc-install:
87         -@if test '!' -f $(etcdir)/silcd.conf ; then \
88           $(INSTALL_DATA) $(srcdir)/doc/example_silcd.conf \
89                 $(etcdir)/silcd.conf; \
90           $(INSTALL_DATA) $(srcdir)/doc/silcalgs.conf \
91                 $(etcdir)/silcalgs.conf; \
92           chmod go= $(etcdir)/silcd.conf; \
93         fi
94         -@if test '!' -f $(etcdir)/silc.conf ; then \
95           $(INSTALL_DATA) $(srcdir)/irssi/silc.conf \
96           $(etcdir)/silc.conf; \
97         fi
98
99 if SILC_DIST_CLIENT
100 install-data-hook: install-dirs sim-install doc-install etc-install
101 else
102 if SILC_DIST_TOOLKIT
103 install-data-hook: install-dirs generate-server-key sim-install doc-install toolkit-install examples-install etc-install
104 else
105 install-data-hook: install-dirs generate-server-key sim-install doc-install examples-install etc-install
106 endif
107 endif