Provide `pdfroff' shell script, and manpage to document it;
[s-roff.git] / Makefile.in
blob57428cda569f355928c1a025d3fbb8a26985945c
1 # Copyright (C) 1989-2000, 2001, 2002, 2003, 2004
2 # Free Software Foundation, Inc.
3 # Written by James Clark (jjc@jclark.com)
4 #
5 # This file is part of groff.
6 #
7 # groff is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU General Public License as published by the Free
9 # Software Foundation; either version 2, or (at your option) any later
10 # version.
12 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with groff; see the file COPYING. If not, write to the Free Software
19 # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 SHELL=@SHELL@
23 srcdir=@srcdir@
24 top_srcdir=@abs_top_srcdir@
25 VPATH=@srcdir@
26 top_builddir=@abs_top_builddir@
28 # `RT_SEP' is the operating system's native PATH SEPARATOR CHAR, which
29 # is to be used in runtime PATHs compiled into groff executables.
30 RT_SEP=@GROFF_PATH_SEPARATOR@
32 # `SH_SEP' is a alternative PATH SEPARATOR CHAR, to be used in shell
33 # scripts and makefile rules; it may be the same as `RT_SEP', but,
34 # particularly in some Microsoft environments, it may differ.
35 SH_SEP=@PATH_SEPARATOR@
37 version=`cat $(top_srcdir)/VERSION`
38 # No additional number if revision is zero.
39 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
41 # Define `page' to be letter if your PostScript printer uses 8.5x11
42 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
43 # world).
44 PAGE=@PAGE@
46 # The name of the ghostscript program. Normally, gs, on GNU/Linux
47 # but it might be different on cygwin systems.
48 GHOSTSCRIPT=@GHOSTSCRIPT@
50 # Normally the Postscript driver, grops, produces output that conforms
51 # to version 3.0 of the Adobe Document Structuring Conventions.
52 # Unfortunately some spoolers and previewers can't handle such output.
53 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
54 # make its output acceptable to such programs. This variable controls
55 # only the default behaviour of grops; the behaviour can be changed at
56 # runtime by the grops -b option (and so by groff -P-b).
57 # Use a value of 0 if your spoolers and previewers are able to handle
58 # conforming PostScript correctly.
59 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
60 # this is needed for early versions of TranScript that get confused by
61 # anything between the %%EndProlog line and the first %%Page: comment.
62 # Add 2 if lines in included files beginning with %! should be
63 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
64 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
65 # stripped out of included files; this is needed for spoolers that
66 # don't understand the %%{Begin,End}Document comments. I suspect this
67 # includes early versions of TranScript.
68 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
69 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
70 # with a printer that requires page reversal.
71 BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@
73 # `DEVICE' is the default device.
74 DEVICE=ps
76 # `XDEVDIRS' is either `font/devX{75,100}{,-12}' or empty.
77 XDEVDIRS=@XDEVDIRS@
79 # `XPROGDIRS' is either `src/devices/xditview src/utils/xtotroff' or empty.
80 XPROGDIRS=@XPROGDIRS@
82 # `XLIBDIRS' is either `src/libs/libxutil' or empty.
83 XLIBDIRS=@XLIBDIRS@
85 # `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for
86 # ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8.
87 TTYDEVDIRS=@TTYDEVDIRS@ font/devutf8
89 # `OTHERDEVDIRS' is either `font/devlj4 font/devlbp' (for ASCII) or
90 # empty (for EBCDIC).
91 OTHERDEVDIRS=@OTHERDEVDIRS@
93 # `PSPRINT' is the command to use for printing a PostScript file,
94 # for example `lpr'.
95 PSPRINT=@PSPRINT@
97 # `DVIPRINT' is the command to use for printing a TeX dvi file,
98 # for example `lpr -d'.
99 DVIPRINT=@DVIPRINT@
101 # Prefix for names of programs that have Unix counterparts.
102 # For example, if `g' is `g' then troff will be installed as
103 # gtroff. This doesn't affect programs like grops or groff that have
104 # no Unix counterparts. Note that the groff versions of eqn and tbl
105 # will not work with Unix troff.
106 g=@g@
108 # Common prefix for installation directories.
109 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
110 # This must already exist when you do make install.
111 prefix=@prefix@
112 exec_prefix=@exec_prefix@
114 # `bindir' says where to install executables.
115 bindir=@bindir@
117 # `libdir' says where to install platform-dependent data.
118 libdir=@libdir@
119 libprogramdir=$(libdir)/groff
121 # `datasubdir' says where to install platform-independent data files.
122 datadir=@datadir@
123 dataprogramdir=$(datadir)/groff
124 datasubdir=$(dataprogramdir)/$(version)$(revision)
126 # `infodir' says where to install info files.
127 infodir=@infodir@
129 # `docdir' says where to install documentation files.
130 docdir=$(datadir)/doc/groff/$(version)$(revision)
132 # `exampledir' says where to install example files.
133 exampledir=$(docdir)/examples
135 # `htmldocdir' says where to install documentation in HTML format.
136 htmldocdir=$(docdir)/html
138 # `fontdir' says where to install dev*/*.
139 fontdir=$(datasubdir)/font
141 # `localfontdir' says where local fonts will be installed (as dev*/*).
142 localfontdir=$(dataprogramdir)/site-font
144 # `legacyfontdir' is for compatibility with non-GNU troff.
145 legacyfontdir=/usr/lib/font
147 # `fontpath' says where to look for dev*/*.
148 fontpath=$(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir)
150 # `tmacdir' says where to install macros.
151 tmacdir=$(datasubdir)/tmac
153 # `systemtmacdir' says where to install platform-dependent macros.
154 systemtmacdir=$(libprogramdir)/site-tmac
156 # `localtmacdir' says where local files will be installed.
157 localtmacdir=$(dataprogramdir)/site-tmac
159 # `appresdir' says where to install the application resource file for
160 # gxditview.
161 appresdir=@appresdir@
163 # `tmacpath' says where to look for macro files.
164 # The current directory will be prepended in unsafe mode only; the home
165 # directory will be always added.
166 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
167 # current nor in the home directory.
168 tmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir)
170 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
171 sys_tmac_prefix=@sys_tmac_prefix@
173 # `pnmtops_nosetpage' is the command to be run to generate an eps
174 # file. Some versions of pnmtops provide the -nosetpage option.
175 # We detect this and use it if present.
176 pnmtops_nosetpage=@pnmtops_nosetpage@
178 # `tmac_wrap' is list of system macro packages that should be made
179 # available to groff by creating a corresponding macro package
180 # in the groff macro directory that references the system macro
181 # package.
182 tmac_wrap=@tmac_wrap@
184 # If there is a groff version of a macro package listed in $(tmac_wrap),
185 # then the groff version will be installed with a prefix of this.
186 # Don't make this empty.
187 tmac_prefix=g
189 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
190 tmac_m_prefix=\
191 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
192 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
193 tmac_s_prefix=\
194 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
195 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
196 tmac_an_prefix=\
197 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
199 # Extension to be used for refer index files. Index files are not
200 # sharable between different architectures, so you might want to use
201 # different suffixes for different architectures. Choose an extension
202 # that doesn't conflict with refer or any other indexing program.
203 indexext=.i
205 # Directory containing the default index for refer.
206 indexdir=/usr/dict/papers
208 # The filename (without suffix) of the default index for refer.
209 indexname=Ind
211 # common_words_file is a file containing a list of common words.
212 # If your system provides /usr/lib/eign it will be copied onto this,
213 # otherwise the supplied eign file will be used.
214 common_words_file=$(datasubdir)/eign
216 # `manroot' is the root of the man page directory tree.
217 mandir=@mandir@
218 manroot=$(mandir)
220 # `man1ext' is the man section for user commands.
221 man1ext=1
222 man1dir=$(manroot)/man$(man1ext)
224 # `man5ext' is the man section for file formats.
225 man5ext=5
226 man5dir=$(manroot)/man$(man5ext)
228 # `man7ext' is the man section for macros.
229 man7ext=7
230 man7dir=$(manroot)/man$(man7ext)
232 # The configure script checks whether all necessary utility programs for
233 # grohtml are available -- only then we can build the HTML documentation.
234 make_html=@make_html@
235 make_install_html=@make_install_html@
237 # DEFINES should include the following:
238 # -DHAVE_MMAP if you have mmap() and <sys/mman.h>
239 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
240 # -DSYS_SIGLIST_DECLARED if you have sys_siglist[]
241 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
242 # wait() indicates whether a core image was
243 # produced for a process that was terminated
244 # by a signal
246 # -DHAVE_DIRENT_H if you have <dirent.h>
247 # -DHAVE_LIMITS_H if you have <limits.h>
248 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
249 # -DHAVE_MATH_H if you have <math.h>
250 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
251 # -DHAVE_CC_INTTYPES_H if you have a C++ <inttypes.h>
252 # -DHAVE_STDLIB_H if you have <stdlib.h>
253 # -DHAVE_STRING_H if you have <string.h>
254 # -DHAVE_STRINGS_H if you have <strings.h>
255 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
256 # -DHAVE_SYS_TIME_H if you have <sys/time.h>
257 # -DHAVE_UNISTD_H if you have <unistd.h>
259 # -DHAVE_FMOD if you have fmod()
260 # -DHAVE_GETCWD if you have getcwd()
261 # -DHAVE_GETTIMEOFDAY if you have gettimeofday()
262 # -DHAVE_ISATTY if you have isatty()
263 # -DHAVE_KILL if you have kill()
264 # -DHAVE_MKSTEMP if you have mkstemp()
265 # -DHAVE_MMAP if you have mmap()
266 # -DHAVE_PUTENV if you have putenv()
267 # -DHAVE_RENAME if you have rename()
268 # -DHAVE_SETLOCALE if you have setlocale()
269 # -DHAVE_SNPRINTF if you have snprintf()
270 # -DHAVE_STRCASECMP if you have strcasecmp()
271 # -DHAVE_STRNCASECMP if you have strncasecmp()
272 # -DHAVE_STRERROR if you have strerror()
273 # -DHAVE_STRSEP if you have strsep()
274 # -DHAVE_STRTOL if you have strtol()
275 # -DHAVE_VSNPRINTF if you have vsnprintf()
277 # -DNEED_DECLARATION_GETTIMEOFTODAY
278 # if your C++ <sys/time.h> doesn't declare
279 # gettimeofday()
280 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
281 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
282 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
283 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare
284 # putenv()
285 # -DNEED_DECLARATION_RAND if your C++ <stdlib.h> doesn't declare rand()
286 # -DNEED_DECLARATION_SNPRINTF if your C++ <stdio.h> doesn't declare
287 # snprintf()
288 # -DNEED_DECLARATION_SRAND if your C++ <stdlib.h> doesn't declare srand()
289 # -DNEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare
290 # strcasecmp()
291 # -DNEED_DECLARATION_STRNCASECMP
292 # if your C++ <string.h> doesn't declare
293 # strncasecmp()
294 # -DNEED_DECLARATION_VFPRINTF if your C++ <stdio.h> doesn't declare
295 # vfprintf()
296 # -DNEED_DECLARATION_VSNPRINTF if your C++ <stdio.h> doesn't declare
297 # vsnprintf()
299 # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int
300 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
301 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
302 # <stdio.h>
303 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
304 # (Reiser) preprocessor
305 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
306 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
307 # -DRETSIGTYPE=int if signal handlers return int not void
308 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
309 # -DPAGEA4 if the the printer's page size is A4
310 # -DGHOSTSCRIPT=gs the name (and directory if required) of the
311 # ghostscript program
312 DEFINES=@DEFS@
314 # Include
316 # {fmod,getcwd,mkstemp,putenv,snprintf,strcasecmp,
317 # strerror,strncasecmp,strtol}.$(OBJEXT)
319 # in LIBOBJS if your C library is missing the corresponding function.
320 # vsnprintf is defined in the snprintf.$(OBJEXT) module.
321 LIBOBJS=@LIBOBJS@
323 # `CCC' is the compiler for C++ (.cpp) files.
324 CCC=@CXX@
325 CC=@CC@
326 # CCDEFINES are definitions for C++ compilations.
327 CCDEFINES=$(DEFINES)
328 # CDEFINES are definitions for C compilations.
329 CDEFINES=$(DEFINES)
331 CCFLAGS=@CXXFLAGS@
332 CFLAGS=@CFLAGS@
333 CPPFLAGS=@CPPFLAGS@
334 LDFLAGS=@LDFLAGS@
336 X_CFLAGS=@X_CFLAGS@
337 X_LIBS=@X_LIBS@
338 X_EXTRA_LIBS=@X_EXTRA_LIBS@
339 X_PRE_LIBS=@X_PRE_LIBS@
341 YACC=@YACC@
342 YACCFLAGS=-v
344 EXEEXT=@EXEEXT@
345 OBJEXT=@OBJEXT@
346 # a simple heuristic assumption
347 LIBEXT=`case $(OBJEXT) in obj) echo lib;; *) echo a;; esac`
348 LIBS=@LIBS@
349 LIBM=@LIBM@
350 RANLIB=@RANLIB@
351 INSTALL=@INSTALL@
352 INSTALL_PROGRAM=@INSTALL_PROGRAM@
353 INSTALL_SCRIPT=@INSTALL_SCRIPT@
354 INSTALL_DATA=@INSTALL_DATA@
355 INSTALL_INFO=@INSTALL_INFO@
356 LN_S=@LN_S@
357 AR=ar
358 ETAGS=etags
359 ETAGSFLAGS=
360 # Flag that tells etags to assume C++.
361 ETAGSCCFLAG=-C
362 # Full path to perl.
363 PERLPATH=@PERLPATH@
364 # Sed command with which to edit sh scripts.
365 SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
366 # Sed script to deal with OS dependencies in sh scripts.
367 SH_DEPS_SED_SCRIPT=$(top_builddir)/arch/misc/shdeps.sed
369 # The program to create directory hierarchies.
370 mkinstalldirs= $(SHELL) $(top_srcdir)/mkinstalldirs
372 PURIFY=purify
373 PURIFYCCFLAGS=
374 #PURIFYCCFLAGS=-g++=yes \
375 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
377 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
378 # copy of $(MDEFINES) when making individual directories; this could
379 # cause the argument list to become too long on some systems.
380 MDEFINES= \
381 "AR=$(AR)" \
382 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
383 "CC=$(CC)" \
384 "CCC=$(CCC)" \
385 "CCDEFINES=$(CCDEFINES)" \
386 "CCFLAGS=$(CCFLAGS)" \
387 "CDEFINES=$(CDEFINES)" \
388 "CFLAGS=$(CFLAGS)" \
389 "CPPFLAGS=$(CPPFLAGS)" \
390 "DEVICE=$(DEVICE)" \
391 "DVIPRINT=$(DVIPRINT)" \
392 "ETAGS=$(ETAGS)" \
393 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
394 "ETAGSFLAGS=$(ETAGSFLAGS)" \
395 "EXEEXT=$(EXEEXT)" \
396 "INSTALL_DATA=$(INSTALL_DATA)" \
397 "INSTALL_INFO=$(INSTALL_INFO)" \
398 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
399 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
400 "LDFLAGS=$(LDFLAGS)" \
401 "LIBEXT=$(LIBEXT)" \
402 "LIBM=$(LIBM)" \
403 "LIBOBJS=$(LIBOBJS)" \
404 "LIBS=$(LIBS)" \
405 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
406 "OBJEXT=$(OBJEXT)" \
407 "OTHERDEVDIRS=$(OTHERDEVDIRS)" \
408 "PAGE=$(PAGE)" \
409 "GHOSTSCRIPT=$(GHOSTSCRIPT)" \
410 "PERLPATH=$(PERLPATH)" \
411 "PSPRINT=$(PSPRINT)" \
412 "PURIFY=$(PURIFY)" \
413 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \
414 "RANLIB=$(RANLIB)" \
415 "RT_SEP=$(RT_SEP)" \
416 "SH_SEP=$(SH_SEP)" \
417 "SHELL=$(SHELL)" \
418 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
419 "SH_DEPS_SED_SCRIPT=$(SH_DEPS_SED_SCRIPT)" \
420 "TTYDEVDIRS=$(TTYDEVDIRS)" \
421 "XDEVDIRS=$(XDEVDIRS)" \
422 "XLIBDIRS=$(XLIBDIRS)" \
423 "XPROGDIRS=$(XPROGDIRS)" \
424 "X_CFLAGS=$(X_CFLAGS)" \
425 "X_LIBS=$(X_LIBS)" \
426 "X_EXTRA_LIBS=$(X_EXTRA_LIBS)" \
427 "X_PRE_LIBS=$(X_PRE_LIBS)" \
428 "YACC=$(YACC)" \
429 "YACCFLAGS=$(YACCFLAGS)" \
430 "appresdir=$(appresdir)" \
431 "bindir=$(bindir)" \
432 "common_words_file=$(common_words_file)" \
433 "datadir=$(datadir)" \
434 "dataprogramdir=$(dataprogramdir)" \
435 "datasubdir=$(datasubdir)" \
436 "docdir=$(docdir)" \
437 "exampledir=$(exampledir)" \
438 "exec_prefix=$(exec_prefix)" \
439 "fontdir=$(fontdir)" \
440 "fontpath=$(fontpath)" \
441 "g=$(g)" \
442 "htmldocdir=$(htmldocdir)" \
443 "indexdir=$(indexdir)" \
444 "indexext=$(indexext)" \
445 "indexname=$(indexname)" \
446 "infodir=$(infodir)" \
447 "legacyfontdir=$(legacyfontdir)" \
448 "libdir=$(libdir)" \
449 "libprogramdir=$(libprogramdir)" \
450 "localfontdir=$(localfontdir)" \
451 "localtmacdir=$(localtmacdir)" \
452 "make_html=$(make_html)" \
453 "make_install_html=$(make_install_html)" \
454 "man1dir=$(man1dir)" \
455 "man1ext=$(man1ext)" \
456 "man5dir=$(man5dir)" \
457 "man5ext=$(man5ext)" \
458 "man7dir=$(man7dir)" \
459 "man7ext=$(man7ext)" \
460 "manroot=$(manroot)" \
461 "mkinstalldirs=$(mkinstalldirs)" \
462 "prefix=$(prefix)" \
463 "revision=$(revision)" \
464 "sys_tmac_prefix=$(sys_tmac_prefix)" \
465 "pnmtops_nosetpage=$(pnmtops_nosetpage)" \
466 "systemtmacdir=$(systemtmacdir)" \
467 "tmac_an_prefix=$(tmac_an_prefix)" \
468 "tmac_m_prefix=$(tmac_m_prefix)" \
469 "tmac_s_prefix=$(tmac_s_prefix)" \
470 "tmac_wrap=$(tmac_wrap)" \
471 "tmacdir=$(tmacdir)" \
472 "tmacpath=$(tmacpath)" \
473 "top_builddir=$(top_builddir)" \
474 "top_srcdir=$(top_srcdir)" \
475 "version=$(version)"
477 INCDIRS=src/include
478 LIBDIRS=\
479 src/libs/libgroff \
480 src/libs/libdriver \
481 src/libs/libbib \
482 $(XLIBDIRS)
483 CCPROGDIRS=\
484 src/roff/groff \
485 src/roff/troff \
486 src/preproc/tbl \
487 src/preproc/pic \
488 src/preproc/eqn \
489 src/preproc/grn \
490 src/preproc/refer \
491 src/preproc/soelim \
492 src/preproc/html \
493 src/devices/grops \
494 src/devices/grotty \
495 src/devices/grodvi \
496 src/devices/grolj4 \
497 src/devices/grohtml \
498 src/devices/grolbp \
499 src/utils/tfmtodit \
500 src/utils/hpftodit \
501 src/utils/lookbib \
502 src/utils/indxbib \
503 src/utils/lkbib \
504 src/utils/addftinfo
505 CPROGDIRS=\
506 src/utils/pfbtops \
507 $(XPROGDIRS)
508 PROGDEPDIRS=arch/misc
509 PROGDIRS=$(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
510 DEVDIRS=\
511 font/devps \
512 font/devdvi \
513 font/devhtml
514 ALLTTYDEVDIRS=\
515 font/devascii \
516 font/devlatin1 \
517 font/devutf8 \
518 font/devcp1047
519 # `doc' must be processed before `contrib/pdfmark'.
520 OTHERDIRS=\
521 man \
522 tmac \
523 src/utils/afmtodit \
524 src/roff/grog \
525 src/roff/nroff \
526 doc \
527 contrib/mm \
528 contrib/pic2graph \
529 contrib/eqn2graph \
530 contrib/grap2graph \
531 contrib/groffer \
532 contrib/mom \
533 contrib/pdfmark \
534 contrib/gdiffmk
535 ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
536 $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
537 EXTRADIRS=\
538 font/devps/generate \
539 font/devdvi/generate \
540 font/devlj4/generate \
542 NOMAKEDIRS=\
543 arch/djgpp \
544 contrib/mm/examples \
545 contrib/mm/mm \
546 contrib/mom/examples \
547 contrib/mom/momdoc \
548 src/libs/snprintf
549 DISTDIRS=\
550 $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) \
551 $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS)
552 TARGETS=all install install_bin install_data clean distclean mostlyclean \
553 realclean extraclean distfiles TAGS depend uninstall_sub
555 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
556 # where Make needs to be case-sensitive to find files like BI and VERSION.
557 ENVSETUP=\
558 if test -f $(srcdir)/makefile.ccpg* && \
559 test -f $(srcdir)/Makefile.ccpg*; then \
560 FNCASE=y; export FNCASE; \
561 else :; \
564 do=all
565 dodirs=$(ALLDIRS) dot
566 # Default target for subdir_Makefile
567 subdir=src/roff/troff
570 $(TARGETS):
571 @$(ENVSETUP); $(MAKE) $(MDEFINES) do=$@ $(dodirs)
573 dot: FORCE
574 @$(ENVSETUP); \
575 $(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
576 -f $(top_srcdir)/Makefile.comm \
577 -f $(top_srcdir)/Makefile.sub $(do)
579 $(LIBDIRS): FORCE
580 @$(ENVSETUP); \
581 if test $(srcdir) = .; then \
582 srcdir=.; \
583 else \
584 srcdir=`cd $(srcdir); pwd`/$@; \
585 fi; \
586 test -d $@ || $(mkinstalldirs) $@; \
587 cd $@; \
588 test -f Makefile.dep || touch Makefile.dep; \
589 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
590 -f $(top_srcdir)/Makefile.comm \
591 -f $$srcdir/Makefile.sub \
592 -f $(top_srcdir)/Makefile.lib \
593 -f Makefile.dep $(do)
595 $(CPROGDIRS): FORCE
596 @$(ENVSETUP); \
597 if test $(srcdir) = .; then \
598 srcdir=.; \
599 else \
600 srcdir=`cd $(srcdir); pwd`/$@; \
601 fi; \
602 test -d $@ || $(mkinstalldirs) $@; \
603 cd $@; \
604 test -f Makefile.dep || touch Makefile.dep; \
605 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
606 -f $(top_srcdir)/Makefile.comm \
607 -f $$srcdir/Makefile.sub \
608 -f $(top_srcdir)/Makefile.cpg \
609 -f Makefile.dep $(do)
611 $(CCPROGDIRS): FORCE
612 @$(ENVSETUP); \
613 if test $(srcdir) = .; then \
614 srcdir=.; \
615 else \
616 srcdir=`cd $(srcdir); pwd`/$@; \
617 fi; \
618 test -d $@ || $(mkinstalldirs) $@; \
619 cd $@; \
620 test -f Makefile.dep || touch Makefile.dep; \
621 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
622 -f $(top_srcdir)/Makefile.comm \
623 -f $$srcdir/Makefile.sub \
624 -f $(top_srcdir)/Makefile.ccpg \
625 -f Makefile.dep $(do)
627 $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE
628 @$(ENVSETUP); \
629 if test $(srcdir) = .; then \
630 srcdir=.; \
631 else \
632 srcdir=`cd $(srcdir); pwd`/$@; \
633 fi; \
634 test -d $@ || $(mkinstalldirs) $@; \
635 cd $@; \
636 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
637 -f $(top_srcdir)/Makefile.comm \
638 -f $$srcdir/Makefile.sub \
639 -f $(top_srcdir)/Makefile.dev $(do)
641 $(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE
642 @$(ENVSETUP); \
643 if test $(srcdir) = .; then \
644 srcdir=.; \
645 else \
646 srcdir=`cd $(srcdir); pwd`/$@; \
647 fi; \
648 test -d $@ || $(mkinstalldirs) $@; \
649 cd $@; \
650 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
651 -f $(top_srcdir)/Makefile.comm \
652 -f $$srcdir/Makefile.sub \
653 -f $(top_srcdir)/Makefile.man $(do)
655 .PHONY: dist
656 dist:
657 -rm -fr tmp
658 rm -f groff-$(version)$(revision).tar.gz
659 mkdir tmp
660 for d in $(DISTDIRS); do \
661 $(mkinstalldirs) tmp/$$d; \
662 done
663 srcdir=`cd $(srcdir); pwd`; \
664 cd tmp; \
665 $(LN_S) ../Makefile .; \
666 $(LN_S) $$srcdir/* . 2>/dev/null || true; \
667 rm -rf CVS; \
668 for d in $(DISTDIRS); do \
669 (cd $$d; \
670 $(LN_S) $$srcdir/$$d/* . 2>/dev/null; \
671 rm -rf CVS || true); \
672 done; \
673 $(MAKE) srcdir=. VPATH=. distfiles; \
674 $(MAKE) srcdir=. VPATH=. extraclean; \
675 for d in $(EXTRADIRS); do \
676 (cd $$d; $(MAKE) extraclean); \
677 done; \
678 rm -f Makefile; \
679 $(LN_S) $$srcdir/Makefile.init Makefile
680 mv tmp groff-$(version)$(revision)
681 tar cfh - groff-$(version)$(revision) | \
682 gzip -c >groff-$(version)$(revision).tar.gz
683 rm -fr groff-$(version)$(revision)
685 # $(PROGDIRS): libgroff
686 # grops grotty grodvi: libdriver
687 # refer lookbib indxbib lkbib: libbib
688 # $(LIBDIRS) $(PROGDIRS): include
690 .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
692 # Create a Makefile in $(subdir). This is useful for development since it
693 # avoids running make recursively.
694 subdir_Makefile: Makefile.cfg
695 $(MAKE) do=Makefile $(subdir)
697 Makefile.cfg: Makefile
698 >Makefile.cfg
699 for var in $(MDEFINES); do \
700 echo "$$var" >>Makefile.cfg; \
701 done
703 Makefile: Makefile.in
704 $(SHELL) config.status
706 .PHONY: uninstall
707 uninstall: uninstall_sub uninstall_dirs
709 .PHONY: uninstall_dirs
710 uninstall_dirs:
711 # Use `rmdir' here so that the directories are only removed if they are empty.
712 -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
713 $(tmacdir) $(systemtmacdir) $(localtmacdir) \
714 $(fontdir) $(localfontdir) $(bindir) \
715 $(datasubdir) $(dataprogramdir) $(datadir) $(infodir) \
716 $(exampledir) $(htmldocdir) $(docdir) \
717 $(libprogramdir) $(libdir)
719 .PHONY: check docheck
720 check: site.exp docheck
722 docheck:
723 if $(SHELL) -c "runtest --version" > /dev/null 2>&1; then \
724 runtest; \
725 else \
726 echo "WARNING: could not find \`runtest'" 1>&2; \
729 # This snippet has been taken from the automake package.
731 site.exp:
732 @echo "Making a new site.exp file..."
733 @echo "## these variables are automatically generated by make ##" >site.tmp
734 @echo "# Do not edit here. If you wish to override these values" >>site.tmp
735 @echo "# edit the last section" >>site.tmp
736 @echo "set tool groff" >>site.tmp
737 @echo "set srcdir $(srcdir)/testsuite" >>site.tmp
738 @echo "set objdir `pwd`" >> site.tmp
739 @echo "## All variables above are generated by configure. Do not edit! ##" >> site.tmp
740 @test ! -f site.exp \
741 || sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
742 @-rm -f site.bak
743 @test ! -f site.exp || mv site.exp site.bak
744 @mv site.tmp site.exp
746 FORCE:
748 .NOEXPORT: