Comment fixes.
[silc.git] / Makefile.ad
1 #
2 #  Makefile.ad
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2005 Pekka 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 SUBDIRS =               \
21 #ifdef SILC_DIST_LIB
22         lib             \
23 #endif SILC_DIST_LIB
24 #ifdef SILC_DIST_APPS
25         apps            \
26 #endif SILC_DIST_APPS
27 #ifdef SILC_DIST_TOOLKIT
28         win32           \
29 #endif SILC_DIST_TOOLKIT
30 #ifdef SILC_DIST_INCLUDES
31         includes        \
32 #endif SILC_DIST_INCLUDES
33 #ifdef SILC_DIST_DOC
34         doc
35 #endif SILC_DIST_DOC
36
37 EXTRA_DIST =            \
38         silcdefs.h.in   \
39 #ifdef SILC_DIST_SILC
40         libtoolfix      \
41         CHANGES CREDITS
42 #endif SILC_DIST_SILC
43
44 #ifdef SILC_DIST_SILC
45 #
46 # Installing of SILC into the system
47 #
48
49 install-dirs:
50         -mkdir -p $(etcdir)
51         -mkdir -p $(modulesdir)
52         -mkdir -p $(docdir)
53
54 doc-install:
55         -$(INSTALL_DATA) $(srcdir)/doc/CodingStyle $(docdir)/
56         -$(INSTALL_DATA) $(srcdir)/doc/FAQ $(docdir)/
57         -$(INSTALL_DATA) $(srcdir)/doc/*.txt $(docdir)/
58         -$(INSTALL_DATA) $(srcdir)/COPYING $(docdir)/
59         -$(INSTALL_DATA) $(srcdir)/CHANGES $(docdir)/
60         -$(INSTALL_DATA) $(srcdir)/CREDITS $(docdir)/
61         -$(INSTALL_DATA) $(srcdir)/README* $(docdir)/
62         -$(INSTALL_DATA) $(srcdir)/INSTALL $(docdir)/
63         -$(INSTALL_DATA) $(srcdir)/TODO $(docdir)/
64
65 #ifdef SILC_DIST_SIM
66 sim-install:
67         -$(INSTALL_DATA) $(srcdir)/lib/silcsim/*.so $(modulesdir)/
68 #endif SILC_DIST_SIM
69
70 #ifdef SILC_DIST_CLIENT
71 install-dirs-client: install-dirs
72         -mkdir -p $(helpdir)
73         -mkdir -p $(mandir)/man1
74
75 doc-install-client: doc-install
76         $(INSTALL_DATA) $(srcdir)/apps/irssi/silc.conf $(docdir)/example_silc.conf
77         -@if test -f $(srcdir)/doc/silc.1 ; then \
78          $(INSTALL_DATA) $(srcdir)/doc/silc.1 $(mandir)/man1; \
79         fi
80
81 etc-install-client:
82         -@if test '!' -d $(srcdir)/apps/irssi ; then \
83           if test '!' -f $(etcdir)/silc.conf ; then \
84             $(INSTALL_DATA) $(srcdir)/apps/irssi/silc.conf \
85                 $(etcdir)/silc.conf; \
86           fi; \
87         fi
88 #endif SILC_DIST_CLIENT
89
90 #ifdef SILC_DIST_SERVER
91 install-dirs-server: install-dirs
92         -mkdir -p $(logsdir)
93         -mkdir -p $(mandir)/man5
94         -mkdir -p $(mandir)/man8
95
96 doc-install-server: doc-install
97         -$(INSTALL_DATA) $(srcdir)/doc/example_silcd.conf $(docdir)/
98         -@if test -f $(srcdir)/doc/silcd.8 ; then \
99          $(INSTALL_DATA) $(srcdir)/doc/silcd.8 $(mandir)/man8; \
100         fi
101         -@if test -f $(srcdir)/doc/silcd.conf.5 ; then \
102          $(INSTALL_DATA) $(srcdir)/doc/silcd.conf.5 $(mandir)/man5; \
103         fi
104
105 etc-install-server:
106         -@if test '!' -f $(etcdir)/silcd.conf ; then \
107           $(INSTALL_DATA) $(srcdir)/doc/example_silcd.conf \
108                 $(etcdir)/silcd.conf; \
109           $(INSTALL_DATA) $(srcdir)/doc/silcalgs.conf \
110                 $(etcdir)/silcalgs.conf; \
111           chmod go= $(etcdir)/silcd.conf; \
112         fi
113
114 examples-install:
115         -mkdir -p $(docdir)/examples/
116         -$(INSTALL_DATA) $(srcdir)/doc/examples/README $(docdir)/examples/
117         -$(INSTALL_DATA) $(srcdir)/doc/examples/silc* $(docdir)/examples/
118
119 generate-server-key:
120         -@if test '!' -f $(etcdir)/silcd.pub ; then \
121           $(sbindir)/silcd -C $(etcdir); \
122         fi
123 #endif SILC_DIST_SERVER
124
125 #ifdef SILC_DIST_TOOLKIT
126 toolkit-install:
127         -mkdir -p $(docdir)/toolkit/
128         -$(INSTALL_DATA) $(srcdir)/doc/toolkit/* $(docdir)/toolkit
129         -$(INSTALL_DATA) $(srcdir)/lib/doc/*.gif $(docdir)/toolkit
130         -cp -R $(srcdir)/tutorial $(docdir)
131 #endif SILC_DIST_TOOLKIT
132
133 install-data-hook:              \
134 #ifdef SILC_DIST_CLIENT
135         install-dirs-client     \
136         doc-install-client      \
137         etc-install-client      \
138 #endif SILC_DIST_CLIENT
139 #ifdef SILC_DIST_SERVER
140         install-dirs-server     \
141         doc-install-server      \
142         etc-install-server      \
143         examples-install        \
144         generate-server-key     \
145 #endif SILC_DIST_SERVER
146 #ifdef SILC_DIST_TOOLKIT
147         toolkit-install         \
148 #endif SILC_DIST_TOOLKIT
149 #ifdef SILC_DIST_SIM
150         sim-install
151 #endif SILC_DIST_SIM
152
153 include $(top_srcdir)/Makefile.defines.in
154
155 #endif SILC_DIST_SILC