* src/roff/troff/input.h: s/COMPATIBLE_SAVE/PUSH_GROFF_MODE/.
[s-roff.git] / Makefile.in
blob234de0c6b7b18881009441fce5858c2dae6f613d
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 # Normally the Postscript driver, grops, produces output that conforms
47 # to version 3.0 of the Adobe Document Structuring Conventions.
48 # Unfortunately some spoolers and previewers can't handle such output.
49 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
50 # make its output acceptable to such programs. This variable controls
51 # only the default behaviour of grops; the behaviour can be changed at
52 # runtime by the grops -b option (and so by groff -P-b).
53 # Use a value of 0 if your spoolers and previewers are able to handle
54 # conforming PostScript correctly.
55 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
56 # this is needed for early versions of TranScript that get confused by
57 # anything between the %%EndProlog line and the first %%Page: comment.
58 # Add 2 if lines in included files beginning with %! should be
59 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
60 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
61 # stripped out of included files; this is needed for spoolers that
62 # don't understand the %%{Begin,End}Document comments. I suspect this
63 # includes early versions of TranScript.
64 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
65 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
66 # with a printer that requires page reversal.
67 BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@
69 # `DEVICE' is the default device.
70 DEVICE=ps
72 # `XDEVDIRS' is either `font/devX{75,100}{,-12}' or empty.
73 XDEVDIRS=@XDEVDIRS@
75 # `XPROGDIRS' is either `src/devices/xditview src/utils/xtotroff' or empty.
76 XPROGDIRS=@XPROGDIRS@
78 # `XLIBDIRS' is either `src/libs/libxutil' or empty.
79 XLIBDIRS=@XLIBDIRS@
81 # `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for
82 # ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8.
83 TTYDEVDIRS=@TTYDEVDIRS@ font/devutf8
85 # `OTHERDEVDIRS' is either `font/devlj4 font/devlbp' (for ASCII) or
86 # empty (for EBCDIC).
87 OTHERDEVDIRS=@OTHERDEVDIRS@
89 # `PSPRINT' is the command to use for printing a PostScript file,
90 # for example `lpr'.
91 PSPRINT=@PSPRINT@
93 # `DVIPRINT' is the command to use for printing a TeX dvi file,
94 # for example `lpr -d'.
95 DVIPRINT=@DVIPRINT@
97 # Prefix for names of programs that have Unix counterparts.
98 # For example, if `g' is `g' then troff will be installed as
99 # gtroff. This doesn't affect programs like grops or groff that have
100 # no Unix counterparts. Note that the groff versions of eqn and tbl
101 # will not work with Unix troff.
102 g=@g@
104 # Common prefix for installation directories.
105 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
106 # This must already exist when you do make install.
107 prefix=@prefix@
108 exec_prefix=@exec_prefix@
110 # `bindir' says where to install executables.
111 bindir=@bindir@
113 # `libdir' says where to install platform-dependent data.
114 libdir=@libdir@
115 libprogramdir=$(libdir)/groff
117 # `datasubdir' says where to install platform-independent data files.
118 datadir=@datadir@
119 dataprogramdir=$(datadir)/groff
120 datasubdir=$(dataprogramdir)/$(version)$(revision)
122 # `infodir' says where to install info files.
123 infodir=@infodir@
125 # `docdir' says where to install documentation files.
126 docdir=$(datadir)/doc/groff/$(version)$(revision)
128 # `exampledir' says where to install example files.
129 exampledir=$(docdir)/examples
131 # `htmldocdir' says where to install documentation in HTML format.
132 htmldocdir=$(docdir)/html
134 # `fontdir' says where to install dev*/*.
135 fontdir=$(datasubdir)/font
137 # `localfontdir' says where local fonts will be installed (as dev*/*).
138 localfontdir=$(dataprogramdir)/site-font
140 # `legacyfontdir' is for compatibility with non-GNU troff.
141 legacyfontdir=/usr/lib/font
143 # `fontpath' says where to look for dev*/*.
144 fontpath=$(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir)
146 # `tmacdir' says where to install macros.
147 tmacdir=$(datasubdir)/tmac
149 # `systemtmacdir' says where to install platform-dependent macros.
150 systemtmacdir=$(libprogramdir)/site-tmac
152 # `localtmacdir' says where local files will be installed.
153 localtmacdir=$(dataprogramdir)/site-tmac
155 # `appresdir' says where to install the application resource file for
156 # gxditview.
157 appresdir=@appresdir@
159 # `tmacpath' says where to look for macro files.
160 # The current directory will be prepended in unsafe mode only; the home
161 # directory will be always added.
162 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
163 # current nor in the home directory.
164 tmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir)
166 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
167 sys_tmac_prefix=@sys_tmac_prefix@
169 # `pnmtops_nosetpage' is the command to be run to generate an eps
170 # file. Some versions of pnmtops provide the -nosetpage option.
171 # We detect this and use it if present.
172 pnmtops_nosetpage=@pnmtops_nosetpage@
174 # `tmac_wrap' is list of system macro packages that should be made
175 # available to groff by creating a corresponding macro package
176 # in the groff macro directory that references the system macro
177 # package.
178 tmac_wrap=@tmac_wrap@
180 # If there is a groff version of a macro package listed in $(tmac_wrap),
181 # then the groff version will be installed with a prefix of this.
182 # Don't make this empty.
183 tmac_prefix=g
185 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
186 tmac_m_prefix=\
187 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
188 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
189 tmac_s_prefix=\
190 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
191 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
192 tmac_an_prefix=\
193 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
195 # Extension to be used for refer index files. Index files are not
196 # sharable between different architectures, so you might want to use
197 # different suffixes for different architectures. Choose an extension
198 # that doesn't conflict with refer or any other indexing program.
199 indexext=.i
201 # Directory containing the default index for refer.
202 indexdir=/usr/dict/papers
204 # The filename (without suffix) of the default index for refer.
205 indexname=Ind
207 # common_words_file is a file containing a list of common words.
208 # If your system provides /usr/lib/eign it will be copied onto this,
209 # otherwise the supplied eign file will be used.
210 common_words_file=$(datasubdir)/eign
212 # `manroot' is the root of the man page directory tree.
213 mandir=@mandir@
214 manroot=$(mandir)
216 # `man1ext' is the man section for user commands.
217 man1ext=1
218 man1dir=$(manroot)/man$(man1ext)
220 # `man5ext' is the man section for file formats.
221 man5ext=5
222 man5dir=$(manroot)/man$(man5ext)
224 # `man7ext' is the man section for macros.
225 man7ext=7
226 man7dir=$(manroot)/man$(man7ext)
228 # The configure script checks whether all necessary utility programs for
229 # grohtml are available -- only then we can build the HTML documentation.
230 make_html=@make_html@
231 make_install_html=@make_install_html@
233 # DEFINES should include the following:
234 # -DHAVE_MMAP if you have mmap() and <sys/mman.h>
235 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
236 # -DSYS_SIGLIST_DECLARED if you have sys_siglist[]
237 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
238 # wait() indicates whether a core image was
239 # produced for a process that was terminated
240 # by a signal
242 # -DHAVE_DIRENT_H if you have <dirent.h>
243 # -DHAVE_LIMITS_H if you have <limits.h>
244 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
245 # -DHAVE_MATH_H if you have <math.h>
246 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
247 # -DHAVE_CC_INTTYPES_H if you have a C++ <inttypes.h>
248 # -DHAVE_STDLIB_H if you have <stdlib.h>
249 # -DHAVE_STRING_H if you have <string.h>
250 # -DHAVE_STRINGS_H if you have <strings.h>
251 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
252 # -DHAVE_SYS_TIME_H if you have <sys/time.h>
253 # -DHAVE_UNISTD_H if you have <unistd.h>
255 # -DHAVE_FMOD if you have fmod()
256 # -DHAVE_GETCWD if you have getcwd()
257 # -DHAVE_GETTIMEOFDAY if you have gettimeofday()
258 # -DHAVE_ISATTY if you have isatty()
259 # -DHAVE_KILL if you have kill()
260 # -DHAVE_MKSTEMP if you have mkstemp()
261 # -DHAVE_MMAP if you have mmap()
262 # -DHAVE_PUTENV if you have putenv()
263 # -DHAVE_RENAME if you have rename()
264 # -DHAVE_SETLOCALE if you have setlocale()
265 # -DHAVE_SNPRINTF if you have snprintf()
266 # -DHAVE_STRCASECMP if you have strcasecmp()
267 # -DHAVE_STRNCASECMP if you have strncasecmp()
268 # -DHAVE_STRERROR if you have strerror()
269 # -DHAVE_STRSEP if you have strsep()
270 # -DHAVE_STRTOL if you have strtol()
271 # -DHAVE_VSNPRINTF if you have vsnprintf()
273 # -DNEED_DECLARATION_GETTIMEOFTODAY
274 # if your C++ <sys/time.h> doesn't declare
275 # gettimeofday()
276 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
277 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
278 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
279 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare
280 # putenv()
281 # -DNEED_DECLARATION_RAND if your C++ <stdlib.h> doesn't declare rand()
282 # -DNEED_DECLARATION_SNPRINTF if your C++ <stdio.h> doesn't declare
283 # snprintf()
284 # -DNEED_DECLARATION_SRAND if your C++ <stdlib.h> doesn't declare srand()
285 # -DNEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare
286 # strcasecmp()
287 # -DNEED_DECLARATION_STRNCASECMP
288 # if your C++ <string.h> doesn't declare
289 # strncasecmp()
290 # -DNEED_DECLARATION_VFPRINTF if your C++ <stdio.h> doesn't declare
291 # vfprintf()
292 # -DNEED_DECLARATION_VSNPRINTF if your C++ <stdio.h> doesn't declare
293 # vsnprintf()
295 # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int
296 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
297 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
298 # <stdio.h>
299 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
300 # (Reiser) preprocessor
301 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
302 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
303 # -DRETSIGTYPE=int if signal handlers return int not void
304 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
305 # -DPAGEA4 if the the printer's page size is A4
306 DEFINES=@DEFS@
308 # Include
310 # {fmod,getcwd,mkstemp,putenv,snprintf,strcasecmp,
311 # strerror,strncasecmp,strtol}.$(OBJEXT)
313 # in LIBOBJS if your C library is missing the corresponding function.
314 # vsnprintf is defined in the snprintf.$(OBJEXT) module.
315 LIBOBJS=@LIBOBJS@
317 # `CCC' is the compiler for C++ (.cpp) files.
318 CCC=@CXX@
319 CC=@CC@
320 # CCDEFINES are definitions for C++ compilations.
321 CCDEFINES=$(DEFINES)
322 # CDEFINES are definitions for C compilations.
323 CDEFINES=$(DEFINES)
325 CCFLAGS=@CXXFLAGS@
326 CFLAGS=@CFLAGS@
327 CPPFLAGS=@CPPFLAGS@
328 LDFLAGS=@LDFLAGS@
330 X_CFLAGS=@X_CFLAGS@
331 X_LIBS=@X_LIBS@
332 X_EXTRA_LIBS=@X_EXTRA_LIBS@
333 X_PRE_LIBS=@X_PRE_LIBS@
335 YACC=@YACC@
336 YACCFLAGS=-v
338 EXEEXT=@EXEEXT@
339 OBJEXT=@OBJEXT@
340 # a simple heuristic assumption
341 LIBEXT=`case $(OBJEXT) in obj) echo lib;; *) echo a;; esac`
342 LIBS=@LIBS@
343 LIBM=@LIBM@
344 RANLIB=@RANLIB@
345 INSTALL=@INSTALL@
346 INSTALL_PROGRAM=@INSTALL_PROGRAM@
347 INSTALL_SCRIPT=@INSTALL_SCRIPT@
348 INSTALL_DATA=@INSTALL_DATA@
349 INSTALL_INFO=@INSTALL_INFO@
350 LN_S=@LN_S@
351 AR=ar
352 ETAGS=etags
353 ETAGSFLAGS=
354 # Flag that tells etags to assume C++.
355 ETAGSCCFLAG=-C
356 # Full path to perl.
357 PERLPATH=@PERLPATH@
358 # Sed command with which to edit sh scripts.
359 SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
360 # Sed script to deal with OS dependencies in sh scripts.
361 SH_DEPS_SED_SCRIPT=$(top_builddir)/arch/misc/shdeps.sed
363 # The program to create directory hierarchies.
364 mkinstalldirs= $(SHELL) $(top_srcdir)/mkinstalldirs
366 PURIFY=purify
367 PURIFYCCFLAGS=
368 #PURIFYCCFLAGS=-g++=yes \
369 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
371 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
372 # copy of $(MDEFINES) when making individual directories; this could
373 # cause the argument list to become too long on some systems.
374 MDEFINES= \
375 "AR=$(AR)" \
376 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
377 "CC=$(CC)" \
378 "CCC=$(CCC)" \
379 "CCDEFINES=$(CCDEFINES)" \
380 "CCFLAGS=$(CCFLAGS)" \
381 "CDEFINES=$(CDEFINES)" \
382 "CFLAGS=$(CFLAGS)" \
383 "CPPFLAGS=$(CPPFLAGS)" \
384 "DEVICE=$(DEVICE)" \
385 "DVIPRINT=$(DVIPRINT)" \
386 "ETAGS=$(ETAGS)" \
387 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
388 "ETAGSFLAGS=$(ETAGSFLAGS)" \
389 "EXEEXT=$(EXEEXT)" \
390 "INSTALL_DATA=$(INSTALL_DATA)" \
391 "INSTALL_INFO=$(INSTALL_INFO)" \
392 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
393 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
394 "LDFLAGS=$(LDFLAGS)" \
395 "LIBEXT=$(LIBEXT)" \
396 "LIBM=$(LIBM)" \
397 "LIBOBJS=$(LIBOBJS)" \
398 "LIBS=$(LIBS)" \
399 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
400 "OBJEXT=$(OBJEXT)" \
401 "OTHERDEVDIRS=$(OTHERDEVDIRS)" \
402 "PAGE=$(PAGE)" \
403 "PERLPATH=$(PERLPATH)" \
404 "PSPRINT=$(PSPRINT)" \
405 "PURIFY=$(PURIFY)" \
406 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \
407 "RANLIB=$(RANLIB)" \
408 "RT_SEP=$(RT_SEP)" \
409 "SH_SEP=$(SH_SEP)" \
410 "SHELL=$(SHELL)" \
411 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
412 "SH_DEPS_SED_SCRIPT=$(SH_DEPS_SED_SCRIPT)" \
413 "TTYDEVDIRS=$(TTYDEVDIRS)" \
414 "XDEVDIRS=$(XDEVDIRS)" \
415 "XLIBDIRS=$(XLIBDIRS)" \
416 "XPROGDIRS=$(XPROGDIRS)" \
417 "X_CFLAGS=$(X_CFLAGS)" \
418 "X_LIBS=$(X_LIBS)" \
419 "X_EXTRA_LIBS=$(X_EXTRA_LIBS)" \
420 "X_PRE_LIBS=$(X_PRE_LIBS)" \
421 "YACC=$(YACC)" \
422 "YACCFLAGS=$(YACCFLAGS)" \
423 "appresdir=$(appresdir)" \
424 "bindir=$(bindir)" \
425 "common_words_file=$(common_words_file)" \
426 "datadir=$(datadir)" \
427 "dataprogramdir=$(dataprogramdir)" \
428 "datasubdir=$(datasubdir)" \
429 "docdir=$(docdir)" \
430 "exampledir=$(exampledir)" \
431 "exec_prefix=$(exec_prefix)" \
432 "fontdir=$(fontdir)" \
433 "fontpath=$(fontpath)" \
434 "g=$(g)" \
435 "htmldocdir=$(htmldocdir)" \
436 "indexdir=$(indexdir)" \
437 "indexext=$(indexext)" \
438 "indexname=$(indexname)" \
439 "infodir=$(infodir)" \
440 "legacyfontdir=$(legacyfontdir)" \
441 "libdir=$(libdir)" \
442 "libprogramdir=$(libprogramdir)" \
443 "localfontdir=$(localfontdir)" \
444 "localtmacdir=$(localtmacdir)" \
445 "make_html=$(make_html)" \
446 "make_install_html=$(make_install_html)" \
447 "man1dir=$(man1dir)" \
448 "man1ext=$(man1ext)" \
449 "man5dir=$(man5dir)" \
450 "man5ext=$(man5ext)" \
451 "man7dir=$(man7dir)" \
452 "man7ext=$(man7ext)" \
453 "manroot=$(manroot)" \
454 "mkinstalldirs=$(mkinstalldirs)" \
455 "prefix=$(prefix)" \
456 "revision=$(revision)" \
457 "sys_tmac_prefix=$(sys_tmac_prefix)" \
458 "pnmtops_nosetpage=$(pnmtops_nosetpage)" \
459 "systemtmacdir=$(systemtmacdir)" \
460 "tmac_an_prefix=$(tmac_an_prefix)" \
461 "tmac_m_prefix=$(tmac_m_prefix)" \
462 "tmac_s_prefix=$(tmac_s_prefix)" \
463 "tmac_wrap=$(tmac_wrap)" \
464 "tmacdir=$(tmacdir)" \
465 "tmacpath=$(tmacpath)" \
466 "top_builddir=$(top_builddir)" \
467 "top_srcdir=$(top_srcdir)" \
468 "version=$(version)"
470 INCDIRS=src/include
471 LIBDIRS=\
472 src/libs/libgroff \
473 src/libs/libdriver \
474 src/libs/libbib \
475 $(XLIBDIRS)
476 CCPROGDIRS=\
477 src/roff/groff \
478 src/roff/troff \
479 src/preproc/tbl \
480 src/preproc/pic \
481 src/preproc/eqn \
482 src/preproc/grn \
483 src/preproc/refer \
484 src/preproc/soelim \
485 src/preproc/html \
486 src/devices/grops \
487 src/devices/grotty \
488 src/devices/grodvi \
489 src/devices/grolj4 \
490 src/devices/grohtml \
491 src/devices/grolbp \
492 src/utils/tfmtodit \
493 src/utils/hpftodit \
494 src/utils/lookbib \
495 src/utils/indxbib \
496 src/utils/lkbib \
497 src/utils/addftinfo
498 CPROGDIRS=\
499 src/utils/pfbtops \
500 $(XPROGDIRS)
501 PROGDEPDIRS=arch/misc
502 PROGDIRS=$(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
503 DEVDIRS=\
504 font/devps \
505 font/devdvi \
506 font/devhtml
507 ALLTTYDEVDIRS=\
508 font/devascii \
509 font/devlatin1 \
510 font/devutf8 \
511 font/devcp1047
512 OTHERDIRS=\
513 man \
514 tmac \
515 src/utils/afmtodit \
516 src/roff/grog \
517 src/roff/nroff \
518 contrib/mm \
519 contrib/pic2graph \
520 contrib/eqn2graph \
521 contrib/grap2graph \
522 contrib/groffer \
523 contrib/mom \
525 ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
526 $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
527 EXTRADIRS=\
528 font/devps/generate \
529 font/devdvi/generate \
530 font/devlj4/generate \
532 NOMAKEDIRS=\
533 arch/djgpp \
534 contrib/mm/examples \
535 contrib/mm/mm \
536 contrib/mom/examples \
537 contrib/mom/momdoc \
538 src/libs/snprintf
539 DISTDIRS=\
540 $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) \
541 $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS)
542 TARGETS=all install install_bin install_data clean distclean mostlyclean \
543 realclean extraclean distfiles TAGS depend uninstall_sub
545 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
546 # where Make needs to be case-sensitive to find files like BI and VERSION.
547 ENVSETUP=\
548 if test -f $(srcdir)/makefile.ccpg* && \
549 test -f $(srcdir)/Makefile.ccpg*; then \
550 FNCASE=y; export FNCASE; \
551 else :; \
554 do=all
555 dodirs=$(ALLDIRS) dot
556 # Default target for subdir_Makefile
557 subdir=src/roff/troff
560 $(TARGETS):
561 @$(ENVSETUP); $(MAKE) $(MDEFINES) do=$@ $(dodirs)
563 dot: FORCE
564 @$(ENVSETUP); \
565 $(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
566 -f $(top_srcdir)/Makefile.comm \
567 -f $(top_srcdir)/Makefile.sub $(do)
569 $(LIBDIRS): FORCE
570 @$(ENVSETUP); \
571 if test $(srcdir) = .; then \
572 srcdir=.; \
573 else \
574 srcdir=`cd $(srcdir); pwd`/$@; \
575 fi; \
576 test -d $@ || $(mkinstalldirs) $@; \
577 cd $@; \
578 test -f Makefile.dep || touch Makefile.dep; \
579 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
580 -f $(top_srcdir)/Makefile.comm \
581 -f $$srcdir/Makefile.sub \
582 -f $(top_srcdir)/Makefile.lib \
583 -f Makefile.dep $(do)
585 $(CPROGDIRS): FORCE
586 @$(ENVSETUP); \
587 if test $(srcdir) = .; then \
588 srcdir=.; \
589 else \
590 srcdir=`cd $(srcdir); pwd`/$@; \
591 fi; \
592 test -d $@ || $(mkinstalldirs) $@; \
593 cd $@; \
594 test -f Makefile.dep || touch Makefile.dep; \
595 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
596 -f $(top_srcdir)/Makefile.comm \
597 -f $$srcdir/Makefile.sub \
598 -f $(top_srcdir)/Makefile.cpg \
599 -f Makefile.dep $(do)
601 $(CCPROGDIRS): FORCE
602 @$(ENVSETUP); \
603 if test $(srcdir) = .; then \
604 srcdir=.; \
605 else \
606 srcdir=`cd $(srcdir); pwd`/$@; \
607 fi; \
608 test -d $@ || $(mkinstalldirs) $@; \
609 cd $@; \
610 test -f Makefile.dep || touch Makefile.dep; \
611 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
612 -f $(top_srcdir)/Makefile.comm \
613 -f $$srcdir/Makefile.sub \
614 -f $(top_srcdir)/Makefile.ccpg \
615 -f Makefile.dep $(do)
617 $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE
618 @$(ENVSETUP); \
619 if test $(srcdir) = .; then \
620 srcdir=.; \
621 else \
622 srcdir=`cd $(srcdir); pwd`/$@; \
623 fi; \
624 test -d $@ || $(mkinstalldirs) $@; \
625 cd $@; \
626 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
627 -f $(top_srcdir)/Makefile.comm \
628 -f $$srcdir/Makefile.sub \
629 -f $(top_srcdir)/Makefile.dev $(do)
631 $(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE
632 @$(ENVSETUP); \
633 if test $(srcdir) = .; then \
634 srcdir=.; \
635 else \
636 srcdir=`cd $(srcdir); pwd`/$@; \
637 fi; \
638 test -d $@ || $(mkinstalldirs) $@; \
639 cd $@; \
640 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
641 -f $(top_srcdir)/Makefile.comm \
642 -f $$srcdir/Makefile.sub \
643 -f $(top_srcdir)/Makefile.man $(do)
645 .PHONY: dist
646 dist:
647 -rm -fr tmp
648 rm -f groff-$(version)$(revision).tar.gz
649 mkdir tmp
650 for d in $(DISTDIRS); do \
651 $(mkinstalldirs) tmp/$$d; \
652 done
653 srcdir=`cd $(srcdir); pwd`; \
654 cd tmp; \
655 $(LN_S) ../Makefile .; \
656 $(LN_S) $$srcdir/* . 2>/dev/null || true; \
657 rm -rf CVS; \
658 for d in $(DISTDIRS); do \
659 (cd $$d; \
660 $(LN_S) $$srcdir/$$d/* . 2>/dev/null; \
661 rm -rf CVS || true); \
662 done; \
663 $(MAKE) srcdir=. VPATH=. distfiles; \
664 $(MAKE) srcdir=. VPATH=. extraclean; \
665 for d in $(EXTRADIRS); do \
666 (cd $$d; $(MAKE) extraclean); \
667 done; \
668 rm -f Makefile; \
669 $(LN_S) $$srcdir/Makefile.init Makefile
670 mv tmp groff-$(version)$(revision)
671 tar cfh - groff-$(version)$(revision) | \
672 gzip -c >groff-$(version)$(revision).tar.gz
673 rm -fr groff-$(version)$(revision)
675 # $(PROGDIRS): libgroff
676 # grops grotty grodvi: libdriver
677 # refer lookbib indxbib lkbib: libbib
678 # $(LIBDIRS) $(PROGDIRS): include
680 .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
682 # Create a Makefile in $(subdir). This is useful for development since it
683 # avoids running make recursively.
684 subdir_Makefile: Makefile.cfg
685 $(MAKE) do=Makefile $(subdir)
687 Makefile.cfg: Makefile
688 >Makefile.cfg
689 for var in $(MDEFINES); do \
690 echo "$$var" >>Makefile.cfg; \
691 done
693 Makefile: Makefile.in
694 $(SHELL) config.status
696 .PHONY: uninstall
697 uninstall: uninstall_sub uninstall_dirs
699 .PHONY: uninstall_dirs
700 uninstall_dirs:
701 # Use `rmdir' here so that the directories are only removed if they are empty.
702 -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
703 $(tmacdir) $(systemtmacdir) $(localtmacdir) \
704 $(fontdir) $(localfontdir) $(bindir) \
705 $(datasubdir) $(dataprogramdir) $(datadir) $(infodir) \
706 $(exampledir) $(htmldocdir) $(docdir) \
707 $(libprogramdir) $(libdir)
710 .PHONY: check
711 check:
713 FORCE:
715 .NOEXPORT: