* man/roff.man, src/roff/troff/troff.man, NEWS, doc/groff.texinfo:
[s-roff.git] / Makefile.in
bloba296e338647afb09f306aefec3fc03b848b801fd
1 # Copyright (C) 1989-2000 Free Software Foundation, Inc.
2 # Written by James Clark (jjc@jclark.com)
3 #
4 # This file is part of groff.
5 #
6 # groff is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation; either version 2, or (at your option) any later
9 # version.
11 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with groff; see the file COPYING. If not, write to the Free Software
18 # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 srcdir=@srcdir@
21 top_srcdir=@top_srcdir@
22 VPATH=@srcdir@
23 top_builddir=@top_builddir@
25 version=`cat $(top_srcdir)/VERSION`
26 # No additional number if revision is zero
27 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
29 # Define `page' to be letter if your PostScript printer uses 8.5x11
30 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
31 # world).
32 PAGE=@PAGE@
34 # Normally the Postscript driver, grops, produces output that conforms
35 # to version 3.0 of the Adobe Document Structuring Conventions.
36 # Unfortunately some spoolers and previewers can't handle such output.
37 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
38 # make its output acceptable to such programs. This variable controls
39 # only the default behaviour of grops; the behaviour can be changed at
40 # runtime by the grops -b option (and so by groff -P-b).
41 # Use a value of 0 if your spoolers and previewers are able to handle
42 # conforming PostScript correctly.
43 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
44 # this is needed for early versions of TranScript that get confused by
45 # anything between the %%EndProlog line and the first %%Page: comment.
46 # Add 2 if lines in included files beginning with %! should be
47 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
48 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
49 # stripped out of included files; this is needed for spoolers that
50 # don't understand the %%{Begin,End}Document comments. I suspect this
51 # includes early versions of TranScript.
52 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
53 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
54 # with a printer that requires page reversal.
55 BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@
57 # DEVICE is the default device.
58 DEVICE=ps
60 # TTYDEVDIRS is either `font/devascii font/devlatin1 font/devutf8' (for
61 # ASCII) or `font/devcp1047' (for EBCDIC).
62 TTYDEVDIRS=@TTYDEVDIRS@
64 # PSPRINT is the command to use for printing a PostScript file,
65 # for example `lpr'.
66 PSPRINT=@PSPRINT@
68 # DVIPRINT is the command to use for printing a TeX dvi file,
69 # for example `lpr -d'.
70 DVIPRINT=@DVIPRINT@
72 # Prefix for names of programs that have Unix counterparts.
73 # For example, if `g' is `g' then troff will be installed as
74 # gtroff. This doesn't affect programs like grops or groff that have
75 # no Unix counterparts. Note that the groff versions of eqn and tbl
76 # will not work with Unix troff.
77 g=@g@
79 # Common prefix for installation directories.
80 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
81 # This must already exist when you do make install.
82 prefix=@prefix@
84 exec_prefix=@exec_prefix@
86 # bindir says where to install executables.
87 bindir=$(exec_prefix)/bin
89 # datasubdir says where to install data files
90 datadir=@datadir@
91 dataprogramdir=$(datadir)/groff
92 datasubdir=$(dataprogramdir)/$(version)$(revision)
94 # fontdir says where to install dev*/*.
95 fontdir=$(datasubdir)/font
97 # fontpath says where to look for dev*/*.
98 fontpath=.:$(fontdir):/usr/lib/font
100 # tmacdir says where to install macros.
101 tmacdir=$(datasubdir)/tmac
103 # localtmacdir says where local files will be installed
104 localtmacdir=$(dataprogramdir)/site-tmac
106 # tmacpath says where to look for macro files.
107 tmacpath=.:$(localtmacdir):$(tmacdir)
109 # sys_tmac_prefix is prefix (if any) for system macro packages
110 sys_tmac_prefix=@sys_tmac_prefix@
112 # tmac_wrap is list of system macro packages that should be made
113 # available to groff by creating a corresponding macro package
114 # in the groff macro directory that references the system macro
115 # package.
116 tmac_wrap=@tmac_wrap@
118 # If there is a groff version of a macro package listed in $(tmac_wrap),
119 # then the groff version will be installed with a prefix of this.
120 # Don't make this empty.
121 tmac_prefix=g
123 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
124 tmac_m_prefix=\
125 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
126 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
127 tmac_s_prefix=\
128 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
129 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
130 tmac_an_prefix=\
131 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
133 # Extension to be used for refer index files. Index files are not
134 # sharable between different architectures, so you might want to use
135 # different suffixes for different architectures. Choose an extension
136 # that doesn't conflict with refer or any other indexing program.
137 indexext=.i
139 # Directory containing the default index for refer.
140 indexdir=/usr/dict/papers
142 # The filename (without suffix) of the default index for refer.
143 indexname=Ind
145 # common_words_file is a file containing a list of common words.
146 # If your system provides /usr/lib/eign it will be copied onto this,
147 # otherwise the supplied eign file will be used.
148 common_words_file=$(datasubdir)/eign
150 # manroot is the root of the man page directory tree.
151 manroot=@mandir@
153 # man1ext is the man section for user commands.
154 man1ext=1
155 man1dir=$(manroot)/man$(man1ext)
157 # man5ext is the man section for file formats.
158 man5ext=5
159 man5dir=$(manroot)/man$(man5ext)
161 # man7ext is the man section for macros.
162 man7ext=7
163 man7dir=$(manroot)/man$(man7ext)
165 # DEFINES should include the following:
166 # -DHAVE_MMAP if you have mmap() and <sys/mman.h>
167 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
168 # -DHAVE_SYS_SIGLIST if you have sys_siglist[]
169 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
170 # wait() indicates whether a core image was
171 # produced for a process that was terminated
172 # by a signal
173 # -DHAVE_UNISTD_H if you have <unistd.h>
174 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
175 # -DHAVE_DIRENT_H if you have <dirent.h>
176 # -DHAVE_LIMITS_H if you have <limits.h>
177 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
178 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
179 # -DHAVE_STDLIB_H if you have <stdlib.h>
180 # -DHAVE_STRINGS_H if you have <strings.h>
181 # -DHAVE_RENAME if you have rename()
182 # -DHAVE_MKSTEMP if you have mkstemp()
183 # -DHAVE_STRDUP if you have strdup()
184 # -DHAVE_STRSEP if you have strsep()
185 # -DHAVE_STRCASECMP if you have strcasecmp()
186 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
187 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare putenv()
188 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
189 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
190 # -DNEED_DECLARATION_STRNCASECMP
191 # if your C++ <string.h> doesn't declare
192 # strncasecmp()
193 # -DRET_TYPE_SRAND_IS_VOID if your srand() returns void or int
194 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
195 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
196 # <stdio.h>
197 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
198 # (Reiser) preprocessor
199 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
200 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
201 # -DRETSIGTYPE=int if signal handlers return int not void
202 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
203 DEFINES=@DEFS@
205 # Include fmod.o, strtol.o, getcwd.o, strerror.o, putenv.o in LIBOBJS if
206 # your C library is missing the corresponding function.
207 LIBOBJS=@LIBOBJS@
209 # CCC is the compiler for C++ (.cc) files.
210 CCC=@CXX@
211 CC=@CC@
212 # CCDEFINES are definitions for C++ compilations.
213 CCDEFINES=$(DEFINES)
214 # CDEFINES are definitions for C compilations.
215 CDEFINES=$(DEFINES)
217 CCFLAGS=@CXXFLAGS@
218 CFLAGS=@CFLAGS@
219 LDFLAGS=@LDFLAGS@
220 YACC=@YACC@
221 YACCFLAGS=-v
223 LIBS=@LIBS@
224 LIBM=@LIBM@
225 RANLIB=@RANLIB@
226 INSTALL=@INSTALL@
227 INSTALL_PROGRAM=@INSTALL_PROGRAM@
228 INSTALL_SCRIPT=@INSTALL_SCRIPT@
229 INSTALL_DATA=@INSTALL_DATA@
230 LN_S=@LN_S@
231 AR=ar
232 ETAGS=etags
233 ETAGSFLAGS=
234 # Flag that tells etags to assume C++.
235 ETAGSCCFLAG=-C
236 # Full path to perl.
237 PERLPATH=@PERLPATH@
238 # Sed command with which to edit sh scripts.
239 SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
241 # the program to create directory hierarchies
242 mkinstalldirs=$(top_srcdir)/mkinstalldirs
244 PURIFY=purify
245 PURIFYCCFLAGS=
246 #PURIFYCCFLAGS=-g++=yes \
247 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
249 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
250 # copy of $(MDEFINES) when making individual directories; this could
251 # cause the argument list to become too long on some systems.
252 MDEFINES= \
253 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
254 "PAGE=$(PAGE)" \
255 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
256 "DEVICE=$(DEVICE)" \
257 "TTYDEVDIRS=$(TTYDEVDIRS)" \
258 "PSPRINT=$(PSPRINT)" \
259 "DVIPRINT=$(DVIPRINT)" \
260 "top_srcdir=$(top_srcdir)" \
261 "top_builddir=$(top_builddir)" \
262 "prefix=$(prefix)" \
263 "exec_prefix=$(exec_prefix)" \
264 "g=$(g)" \
265 "datadir=$(datadir)" \
266 "dataprogramdir=$(dataprogramdir)" \
267 "datasubdir=$(datasubdir)" \
268 "bindir=$(bindir)" \
269 "fontdir=$(fontdir)" \
270 "fontpath=$(fontpath)" \
271 "tmacdir=$(tmacdir)" \
272 "localtmacdir=$(localtmacdir)" \
273 "tmacpath=$(tmacpath)" \
274 "indexext=$(indexext)" \
275 "indexdir=$(indexdir)" \
276 "indexname=$(indexname)" \
277 "common_words_file=$(common_words_file)" \
278 "manroot=$(manroot)" \
279 "man1ext=$(man1ext)" \
280 "man1dir=$(man1dir)" \
281 "man5ext=$(man5ext)" \
282 "man5dir=$(man5dir)" \
283 "man7ext=$(man7ext)" \
284 "man7dir=$(man7dir)" \
285 "mkinstalldirs=$(mkinstalldirs)" \
286 "tmac_wrap=$(tmac_wrap)" \
287 "sys_tmac_prefix=$(sys_tmac_prefix)" \
288 "tmac_an_prefix=$(tmac_an_prefix)" \
289 "tmac_s_prefix=$(tmac_s_prefix)" \
290 "tmac_m_prefix=$(tmac_m_prefix)" \
291 "CCC=$(CCC)" \
292 "CC=$(CC)" \
293 "CCDEFINES=$(CCDEFINES)" \
294 "CDEFINES=$(CDEFINES)" \
295 "CCFLAGS=$(CCFLAGS)" \
296 "CFLAGS=$(CFLAGS)" \
297 "LDFLAGS=$(LDFLAGS)" \
298 "YACC=$(YACC)" \
299 "YACCFLAGS=$(YACCFLAGS)" \
300 "LIBM=$(LIBM)" \
301 "LIBS=$(LIBS)" \
302 "LIBOBJS=$(LIBOBJS)" \
303 "RANLIB=$(RANLIB)" \
304 "AR=$(AR)" \
305 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
306 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
307 "INSTALL_DATA=$(INSTALL_DATA)" \
308 "ETAGS=$(ETAGS)" \
309 "ETAGSFLAGS=$(ETAGSFLAGS)" \
310 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
311 "PERLPATH=$(PERLPATH)" \
312 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
313 "PURIFY=$(PURIFY)" \
314 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
316 SHELL=/bin/sh
317 INCDIRS=src/include
318 LIBDIRS=\
319 src/libs/libgroff \
320 src/libs/libdriver \
321 src/libs/libbib
322 CCPROGDIRS=\
323 src/roff/groff \
324 src/roff/troff \
325 src/preproc/tbl \
326 src/preproc/pic \
327 src/preproc/eqn \
328 src/preproc/grn \
329 src/preproc/refer \
330 src/preproc/soelim \
331 src/preproc/html2 \
332 src/devices/grops \
333 src/devices/grotty \
334 src/devices/grodvi \
335 src/devices/grolj4 \
336 src/devices/grohtml \
337 src/devices/grohtml2 \
338 src/devices/grolbp \
339 src/utils/tfmtodit \
340 src/utils/hpftodit \
341 src/utils/lookbib \
342 src/utils/indxbib \
343 src/utils/lkbib \
344 src/utils/addftinfo
345 CPROGDIRS=src/utils/pfbtops
346 PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
347 DEVDIRS=\
348 font/devps \
349 font/devdvi \
350 font/devX75 \
351 font/devX75-12 \
352 font/devX100 \
353 font/devX100-12 \
354 font/devlj4 \
355 font/devhtml \
356 font/devhtml2 \
357 font/devlbp
358 ALLTTYDEVDIRS=\
359 font/devascii \
360 font/devlatin1 \
361 font/devutf8 \
362 font/devcp1047
363 OTHERDIRS=\
364 man \
365 tmac \
366 src/utils/afmtodit \
367 src/roff/grog \
368 src/roff/nroff \
369 contrib/mm
370 ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
371 $(DEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
372 EXTRADIRS=\
373 font/devps/generate \
374 font/devdvi/generate \
375 src/xditview \
377 DISTDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
378 $(DEVDIRS) $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS)
379 TARGETS=all install install_bin install_data clean distclean mostlyclean \
380 realclean extraclean distfiles TAGS depend uninstall_sub
382 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
383 # where Make needs to be case-sensitive to find files like BI and VERSION.
384 ENVSETUP=\
385 if test -f $(srcdir)/makefile.ccpg* && \
386 test -f $(srcdir)/Makefile.ccpg*; \
387 then FNCASE=y; export FNCASE; \
388 else :; \
391 do=all
392 dodirs=$(ALLDIRS) dot
393 # Default target for subdir_Makefile
394 subdir=src/roff/troff
397 $(TARGETS):
398 @$(ENVSETUP); $(MAKE) $(MDEFINES) do=$@ $(dodirs)
400 dot: FORCE
401 @$(ENVSETUP); \
402 $(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
403 -f $(top_srcdir)/Makefile.comm \
404 -f $(top_srcdir)/Makefile.sub $(do)
406 $(LIBDIRS): FORCE
407 @$(ENVSETUP); \
408 if test $(srcdir) = .; \
409 then srcdir=.; \
410 else srcdir=`cd $(srcdir); pwd`/$@; \
411 fi; \
412 test -d $@ || $(mkinstalldirs) $@; \
413 cd $@; \
414 test -f Makefile.dep || touch Makefile.dep; \
415 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
416 -f $(top_srcdir)/Makefile.comm \
417 -f $$srcdir/Makefile.sub \
418 -f $(top_srcdir)/Makefile.lib \
419 -f Makefile.dep $(do)
421 $(CPROGDIRS): FORCE
422 @$(ENVSETUP); \
423 if test $(srcdir) = .; \
424 then srcdir=.; \
425 else srcdir=`cd $(srcdir); pwd`/$@; \
426 fi; \
427 test -d $@ || $(mkinstalldirs) $@; \
428 cd $@; \
429 test -f Makefile.dep || touch Makefile.dep; \
430 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
431 -f $(top_srcdir)/Makefile.comm \
432 -f $$srcdir/Makefile.sub \
433 -f $(top_srcdir)/Makefile.cpg \
434 -f Makefile.dep $(do)
436 $(CCPROGDIRS): FORCE
437 @$(ENVSETUP); \
438 if test $(srcdir) = .; \
439 then srcdir=.; \
440 else srcdir=`cd $(srcdir); pwd`/$@; \
441 fi; \
442 test -d $@ || $(mkinstalldirs) $@; \
443 cd $@; \
444 test -f Makefile.dep || touch Makefile.dep; \
445 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
446 -f $(top_srcdir)/Makefile.comm \
447 -f $$srcdir/Makefile.sub \
448 -f $(top_srcdir)/Makefile.ccpg \
449 -f Makefile.dep $(do)
451 $(DEVDIRS) $(TTYDEVDIRS): FORCE
452 @$(ENVSETUP); \
453 if test $(srcdir) = .; \
454 then srcdir=.; \
455 else srcdir=`cd $(srcdir); pwd`/$@; \
456 fi; \
457 test -d $@ || $(mkinstalldirs) $@; \
458 cd $@; \
459 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
460 -f $(top_srcdir)/Makefile.comm \
461 -f $$srcdir/Makefile.sub \
462 -f $(top_srcdir)/Makefile.dev $(do)
464 $(INCDIRS) $(OTHERDIRS): FORCE
465 @$(ENVSETUP); \
466 if test $(srcdir) = .; \
467 then srcdir=.; \
468 else srcdir=`cd $(srcdir); pwd`/$@; \
469 fi; \
470 test -d $@ || $(mkinstalldirs) $@; \
471 cd $@; \
472 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
473 -f $(top_srcdir)/Makefile.comm \
474 -f $$srcdir/Makefile.sub \
475 -f $(top_srcdir)/Makefile.man $(do)
477 .PHONY: dist
478 dist:
479 -rm -fr tmp
480 rm -f groff-$(version)$(revision).tar.gz
481 rm -f src/xditview/Imakefile;
482 mkdir tmp
483 for d in $(DISTDIRS); do \
484 $(mkinstalldirs) tmp/$$d; \
485 done
486 srcdir=`cd $(srcdir); pwd`; \
487 cd tmp; \
488 $(LN_S) ../Makefile .; \
489 $(LN_S) $$srcdir/* . 2>/dev/null || true; \
490 for d in $(DISTDIRS); do \
491 (cd $$d; $(LN_S) $$srcdir/$$d/* . 2>/dev/null || true); \
492 done; \
493 $(MAKE) srcdir=$$srcdir VPATH=$$srcdir extraclean; \
494 for d in $(EXTRADIRS); do \
495 (cd $$d; $(MAKE) extraclean); \
496 done; \
497 rm -f Makefile; \
498 $(LN_S) $$srcdir/Makefile.init Makefile
499 mv tmp groff-$(version)$(revision)
500 tar cfh - groff-$(version)$(revision) | \
501 gzip -c >groff-$(version)$(revision).tar.gz
502 rm -fr groff-$(version)$(revision)
504 # $(PROGDIRS): libgroff
505 # grops grotty grodvi: libdriver
506 # refer lookbib indxbib lkbib: libbib
507 # $(LIBDIRS) $(PROGDIRS): include
509 .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
511 subdir_Makefile: Makefile.cfg
512 $(MAKE) do=Makefile $(subdir)
514 Makefile.cfg: Makefile
515 >Makefile.cfg
516 for var in $(MDEFINES); do \
517 echo "$$var" >>Makefile.cfg; \
518 done
520 Makefile: Makefile.in
521 $(SHELL) config.status
523 .PHONY: uninstall
524 uninstall: uninstall_sub uninstall_dirs
526 .PHONY: uninstall_dirs
527 uninstall_dirs:
528 # Use rmdir here so that the directories are only removed if they're empty
529 -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
530 $(tmacdir) $(localtmacdir) $(fontdir) $(bindir) \
531 $(datasubdir) $(dataprogramdir) $(datadir)
534 .PHONY: check
535 check:
537 FORCE:
539 .NOEXPORT: