chiark / gitweb /
print sensible failure message
[innduct.git] / Makefile.global.in
1 ##  $Id: Makefile.global.in 7830 2008-05-14 18:57:39Z iulius $
2 ##
3 ##  This file is meant to be the central Makefile that configure works with
4 ##  and that all other Makefiles include.  No Makefile other than this one
5 ##  should have to be a configure substitution target.
6 ##
7 ##  For installation paths, see the bottom of this file.
8
9 ##  This version information is used to generate lib/version.c and is used
10 ##  by INN for banner and local version identification.  The version
11 ##  identification string will be "$VERSION ($VERSION_EXTRA)", with the
12 ##  parentheses omitted if $VERSION_EXTRA is empty (as it is for major
13 ##  releases).  If you make extensive local modifications to INN, you can
14 ##  put your own version information in $VERSION_EXTRA.  If it's set to
15 ##  "CVS prerelease", the build time will be automatically included.
16
17 VERSION         = 2.4.5
18 VERSION_EXTRA   =
19
20 ##  If you want to install INN relative to a root directory other than /,
21 ##  set DESTDIR to the path to the root directory of the file system.  This
22 ##  won't affect any of the paths compiled into INN; it's used primarily
23 ##  when building a software distribution, where software has to be
24 ##  installed into some file system that will later be mounted as / on the
25 ##  final system.  DESTDIR should have a trailing slash, as the trailing
26 ##  slash is not added automatically (in case someone wants to add a prefix
27 ##  that isn't just a parent directory).
28
29 DESTDIR         =
30 D               = $(DESTDIR)
31
32 ##  The absolute path to the top of the build directory, used to find the
33 ##  libraries built as part of INN.  Using relative paths confuses libtool
34 ##  when linking the test suite.
35
36 builddir        = @builddir@
37
38 ##  Basic compiler settings.  COPT is the variable to override on the make
39 ##  command line to change the optimization or add warning flags (such as
40 ##  -Wall).  LFS_* is for large file support.  All of INN is built with the
41 ##  large file support flags if provided.
42
43 CC              = @CC@
44 COPT            = @CFLAGS@
45 GCFLAGS         = $(COPT) -I$(top)/include @CPPFLAGS@ $(LFS_CFLAGS)
46
47 BERKELEY_DB_CFLAGS = @BERKELEY_DB_CFLAGS@
48
49 LDFLAGS         = @LDFLAGS@ $(LFS_LDFLAGS) @BERKELEY_DB_LDFLAGS@
50 LIBS            = @LIBS@ $(LFS_LIBS)
51
52 LFS_CFLAGS      = @LFS_CFLAGS@
53 LFS_LDFLAGS     = @LFS_LDFLAGS@
54 LFS_LIBS        = @LFS_LIBS@
55
56 PROF            = -pg
57 PROFSUFFIX      = _p
58 MAKEPROFILING   = $(MAKE) COPT="$(COPT) $(PROF)" \
59                           LDFLAGS="$(LDFLAGS) $(PROF)" \
60                           LIBSUFFIX=$(PROFSUFFIX)
61
62 ##  Used to support non-recursive make.  This variable is set to the necessary
63 ##  options to the compiler to create an object file in a subdirectory.  It
64 ##  should be used instead of -c -o $@ $< and may be replaced with code that
65 ##  calls mv, if the compiler doesn't support -c with -o.
66
67 CCOUTPUT        = @CCOUTPUT@
68
69 ##  Warnings to use with gcc.  Default to including all of the generally
70 ##  useful warnings unless there's something that makes them unsuitable.  In
71 ##  particular, the following warnings are *not* included:
72 ##
73 ##    -ansi             Requires messing with feature test macros.
74 ##    -pedantic         Too much noise from embedded Perl.
75 ##    -Wtraditional     We assume ANSI C, so these aren't interesting.
76 ##    -Wshadow          Names like log or index are too convenient.
77 ##    -Wcast-qual       Used for a while, but some casts are unavoidable.
78 ##    -Wconversion      Too much unsigned to signed noise.
79 ##    -Wredundant-decls Too much noise from system headers.
80 ##
81 ##  Some may be worth looking at again once a released version of gcc doesn't
82 ##  warn on system headers.  The warnings below are in the same order as
83 ##  they're listed in the gcc manual.
84 ##
85 ##  Add -g because when building with warnings one generally also wants the
86 ##  debugging information, and add -O because gcc won't find some warnings
87 ##  without optimization turned on.  Add -DDEBUG=1 so that we'll also
88 ##  compile all debugging code and check it as well.
89
90 WARNINGS        = -g -O -DDEBUG=1 -Wall -W -Wendif-labels -Wpointer-arith \
91                   -Wbad-function-cast -Wcast-align -Wwrite-strings \
92                   -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
93
94 ##  libtool support.  Note that INN does not use Automake (and that
95 ##  retrofitting Automake is likely more work than it's worth), so
96 ##  libtool-aware rules have to be written by hand.
97
98 LIBTOOL         = @LIBTOOL@
99 LIBTOOLCC       = @LIBTOOLCC@
100 LIBTOOLLD       = @LIBTOOLLD@
101 EXTOBJ          = @EXTOBJ@
102 EXTLIB          = @EXTLIB@
103
104 LIBCC           = $(LIBTOOLCC) $(CC)
105 LIBLD           = $(LIBTOOLLD) $(CC)
106
107 ##  INN libraries.  Nearly all INN programs are linked with libinn, and any
108 ##  INN program that reads from or writes to article storage or overview is
109 ##  linked against libstorage.  EXTSTORAGELIBS is for external libraries
110 ##  needed by libstorage.
111
112 LIBINN          = $(builddir)/lib/libinn$(LIBSUFFIX).$(EXTLIB)
113 LIBHIST         = $(builddir)/history/libinnhist$(LIBSUFFIX).$(EXTLIB)
114 LIBSTORAGE      = $(builddir)/storage/libstorage$(LIBSUFFIX).$(EXTLIB)
115 EXTSTORAGELIBS  = @BERKELEY_DB_LIB@
116
117 DBMINC          = @DBM_INC@
118 DBMLIB          = @DBM_LIB@
119
120 CRYPTLIB        = @CRYPT_LIB@
121 PAMLIB          = @PAM_LIB@
122 REGEXLIB        = @REGEX_LIB@
123 SHADOWLIB       = @SHADOW_LIB@
124
125 ##  Embedding support.  Additional flags and libraries used when compiling
126 ##  or linking portions of INN that support embedded interpretors, set by
127 ##  configure based on what interpretor embeddings are selected.
128
129 PERLLIB         = $(builddir)/lib/perl$(LIBSUFFIX).o @PERL_LIB@
130 PERLINC         = @PERL_INC@
131
132 PYTHONLIB       = @PYTHON_LIB@
133 PYTHONINC       = @PYTHON_INC@
134
135 ##  OpenSSL support.  Additional flags and libraries used when compiling or
136 ##  linking code that contains OpenSSL support, and the path to the OpenSSL
137 ##  binaries.
138
139 SSLLIB          = @SSL_LIB@
140 SSLINC          = @SSL_INC@
141 SSLBIN          = @SSL_BIN@
142
143 ##  SASL support.  Additional flags and libraries used when compiling or
144 ##  linking code that contains SASL support.
145
146 SASLLIB         = @SASL_LIB@
147 SASLINC         = @SASL_INC@
148
149 ##  Kerberos support.  Additional flags and libraries used when compiling or
150 ##  linking code that contains Kerberos support.  If Kerberos libraries were
151 ##  compiled, KRB5_AUTH is also set to the name of the Kerberos v5
152 ##  authenticator that should be compiled and installed.
153 KRB5LIB         = @KRB5_LIB@
154 KRB5INC         = @KRB5_INC@
155 KRB5_AUTH       = @KRB5_AUTH@
156
157 ##  Missing functions.  If non-empty, configure detected that your system
158 ##  was missing some standard functions, and INN will be providing its own
159 ##  replacements from the lib directory.
160
161 LIBOBJS         = @LIBOBJS@
162
163 ##  Paths to various standard programs used during the build process.
164 ##  Changes to this file will *not* be reflected in the paths compiled into
165 ##  programs; these paths are only used during the build process and for
166 ##  some autogenerated scripts.  To change the compiled paths, see
167 ##  include/paths.h.  You may also need to modify scripts/innshellvars*.
168
169 AWK             = @_PATH_AWK@
170 COMPRESS        = @COMPRESS@
171 CTAGS           = @CTAGS@
172 GZIP            = @GZIP@
173 LEX             = @LEX@
174 PERL            = @_PATH_PERL@
175 RANLIB          = @RANLIB@
176 YACC            = @YACC@
177 UNCOMPRESS      = @UNCOMPRESS@
178
179 FIXSCRIPT       = $(top)/support/fixscript
180
181 PERLWHOAMI      = $(PERL) -e 'print scalar getpwuid($$>), "\n"'
182 WHOAMI          = (whoami || /usr/ucb/whoami || $(PERLWHOAMI)) 2> /dev/null
183
184 ##  Paths and command lines for programs used only by the maintainers to
185 ##  regenerate dependencies, documentation, and the like.
186
187 MAKEDEPEND      = $(top)/support/makedepend
188
189 POD2MAN         = pod2man -c 'InterNetNews Documentation' -r 'INN $(VERSION)'
190 POD2TEXT        = pod2text -s -l
191
192 ##  Installation directories.  If any of the below are incorrect, don't just
193 ##  edit this file; these directories are substituted in all over the source
194 ##  tree by configure.  Instead, re-run configure with the correct
195 ##  command-line flags to set the directories.  Run configure --help for a
196 ##  list of supported flags.
197
198 prefix          = @prefix@
199
200 PATHNEWS        = $(prefix)
201 PATHBIN         = $(PATHNEWS)/bin
202 PATHDOC         = @DOCDIR@
203 PATHETC         = @ETCDIR@
204 PATHMAN         = @mandir@
205 PATHINCLUDE     = @includedir@
206 PATHLIB         = @LIBDIR@
207 PATHCONTROL     = @CONTROLDIR@
208 PATHFILTER      = @FILTERDIR@
209 PATHRUN         = @RUNDIR@
210 PATHLOG         = @LOGDIR@
211 PATHLOGOLD      = $(PATHLOG)/OLD
212 PATHDB          = @DBDIR@
213 PATHSPOOL       = @SPOOLDIR@
214 PATHTMP         = @tmpdir@
215 PATHAUTH        = $(PATHBIN)/auth
216 PATHAUTHRESOLV  = $(PATHAUTH)/resolv
217 PATHAUTHPASSWD  = $(PATHAUTH)/passwd
218 PATHRNEWS       = $(PATHBIN)/rnews.libexec
219 PATHARCHIVE     = $(PATHSPOOL)/archive
220 PATHARTICLES    = $(PATHSPOOL)/articles
221 PATHINCOMING    = $(PATHSPOOL)/incoming
222 PATHTAPE        = $(PATHSPOOL)/innfeed
223 PATHINBAD       = $(PATHINCOMING)/bad
224 PATHOVERVIEW    = $(PATHSPOOL)/overview
225 PATHOUTGOING    = $(PATHSPOOL)/outgoing
226
227 MAN1            = @mandir@/man1
228 MAN3            = @mandir@/man3
229 MAN5            = @mandir@/man5
230 MAN8            = @mandir@/man8
231
232 ##  Installation settings.  The file installation modes are determined by
233 ##  configure; inews and rnews are special and have configure flags to
234 ##  control how they're installed.  See INSTALL for more information.
235
236 NEWSUSER        = @NEWSUSER@
237 NEWSGROUP       = @NEWSGRP@
238
239 INEWSMODE       = @INEWSMODE@
240 RNEWSMODE       = @RNEWSMODE@
241 FILEMODE        = @FILEMODE@
242
243 OWNER           = -o $(NEWSUSER) -g $(NEWSGROUP)
244 ROWNER          = -o $(NEWSUSER) -g @RNEWSGRP@
245
246 INSTALL         = $(top)/support/install-sh -c
247
248 ##  Installation commands.  These commands are used by the installation rules
249 ##  of each separate subdirectory.  The naming scheme is as follows: the first
250 ##  two characters are CP (indicating a plain copy) or LI (indicating an
251 ##  installation that goes through libtool).  After an underscore is a
252 ##  one-character indicator of the file type (R for a regular file, X for an
253 ##  executable, S for a setuid root executable) and then PUB for a
254 ##  world-readable/world-executable file or PRI for a group-readable/
255 ##  group-executable file (only the news group).
256 ##
257 ##  inews and rnews have their own special installation rules, as do database
258 ##  files like active and newsgroups that should have the same permissions as
259 ##  article files.
260
261 LI_SPRI         = $(LIBTOOL) $(INSTALL) -o root -g $(NEWSGROUP) -m 4550 -B .OLD
262 LI_XPRI         = $(LIBTOOL) $(INSTALL) $(OWNER) -m 0550 -B .OLD
263 LI_XPUB         = $(LIBTOOL) $(INSTALL) $(OWNER) -m 0555 -B .OLD
264
265 LI_INEWS        = $(LIBTOOL) $(INSTALL) $(OWNER) -m $(INEWSMODE) -B .OLD
266 LI_RNEWS        = $(LIBTOOL) $(INSTALL) $(ROWNER) -m $(RNEWSMODE) -B .OLD
267
268 CP_RPRI         = $(INSTALL) $(OWNER) -m 0640 -B .OLD
269 CP_RPUB         = $(INSTALL) $(OWNER) -m 0644 -B .OLD
270 CP_XPRI         = $(INSTALL) $(OWNER) -m 0550 -B .OLD
271 CP_XPUB         = $(INSTALL) $(OWNER) -m 0555 -B .OLD
272
273 CP_DATA         = $(INSTALL) $(OWNER) -m $(FILEMODE) -B .OLD
274
275 ##  How to install man pages.  Pick one of SOURCE, BSD4.4, NROFF-PACK, or
276 ##  NROFF-PACK-SCO.  Used by doc/man/putman.sh; read that script for more
277 ##  information on what it does.
278
279 MANPAGESTYLE    = SOURCE
280
281 ##  Some additional definitions needed by some versions of make, to ensure a
282 ##  consistant set of variables are available.
283
284 SHELL           = /bin/sh
285
286 @SET_MAKE@