* src/roff/troff/input.cpp (get_copy): Add third argument to control
[s-roff.git] / Makefile.in
blobd7ca803d517aad9e6abda0c118e36d77673ac227
1 # Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006
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, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
21 SHELL=@SHELL@
23 srcdir=@srcdir@
24 top_srcdir=@abs_top_srcdir@
25 VPATH=@srcdir@
26 top_builddir=@abs_top_builddir@
28 # `HOST' is the canonical host specification,
29 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
30 # or
31 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
32 HOST=@host@
34 # `RT_SEP' is the operating system's native PATH SEPARATOR CHAR, which
35 # is to be used in runtime PATHs compiled into groff executables.
36 RT_SEP=@GROFF_PATH_SEPARATOR@
38 # `SH_SEP' is a alternative PATH SEPARATOR CHAR, to be used in shell
39 # scripts and makefile rules; it may be the same as `RT_SEP', but,
40 # particularly in some Microsoft environments, it may differ.
41 SH_SEP=@PATH_SEPARATOR@
43 # `GLIBC21' is yes if the host operating system uses GNU libc 2.1 or newer,
44 # otherwise no.
45 GLIBC21=@GLIBC21@
47 version=`cat $(top_srcdir)/VERSION`
48 # No additional number if revision is zero.
49 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
51 # Define `page' to be letter if your PostScript printer uses 8.5x11
52 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
53 # world).
54 PAGE=@PAGE@
56 # The name of the ghostscript program. Normally, gs, on GNU/Linux
57 # but it might be different on MS-DOS/MS-WIN32 systems.
58 GHOSTSCRIPT=@GHOSTSCRIPT@
60 # `ALT_GHOSTSCRIPT_PROGS' specifies a list alternative names,
61 # which can be tried if `GHOSTSCRIPT' cannot be found at run time.
62 ALT_GHOSTSCRIPT_PROGS=@ALT_GHOSTSCRIPT_PROGS@
64 # Similarly, `ALT_AWK_PROGS' specifies a list of alternative names,
65 # which can be tried at run time, to identify the awk program.
66 ALT_AWK_PROGS=@ALT_AWK_PROGS@
68 # Normally the Postscript driver, grops, produces output that conforms
69 # to version 3.0 of the Adobe Document Structuring Conventions.
70 # Unfortunately some spoolers and previewers can't handle such output.
71 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
72 # make its output acceptable to such programs. This variable controls
73 # only the default behaviour of grops; the behaviour can be changed at
74 # runtime by the grops -b option (and so by groff -P-b).
75 # Use a value of 0 if your spoolers and previewers are able to handle
76 # conforming PostScript correctly.
77 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
78 # this is needed for early versions of TranScript that get confused by
79 # anything between the %%EndProlog line and the first %%Page: comment.
80 # Add 2 if lines in included files beginning with %! should be
81 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
82 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
83 # stripped out of included files; this is needed for spoolers that
84 # don't understand the %%{Begin,End}Document comments. I suspect this
85 # includes early versions of TranScript.
86 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
87 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
88 # with a printer that requires page reversal.
89 BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@
91 # `DEVICE' is the default device.
92 DEVICE=ps
94 # `XDEVDIRS' is either `font/devX{75,100}{,-12}' or empty.
95 XDEVDIRS=@XDEVDIRS@
97 # `XPROGDIRS' is either `src/devices/xditview src/utils/xtotroff' or empty.
98 XPROGDIRS=@XPROGDIRS@
100 # `XLIBDIRS' is either `src/libs/libxutil' or empty.
101 XLIBDIRS=@XLIBDIRS@
103 # `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for
104 # ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8.
105 TTYDEVDIRS=@TTYDEVDIRS@ font/devutf8
107 # `OTHERDEVDIRS' is either `font/devlj4 font/devlbp' (for ASCII) or
108 # empty (for EBCDIC).
109 OTHERDEVDIRS=@OTHERDEVDIRS@
111 # `PSPRINT' is the command to use for printing a PostScript file,
112 # for example `lpr'.
113 PSPRINT=@PSPRINT@
115 # `DVIPRINT' is the command to use for printing a TeX dvi file,
116 # for example `lpr -d'.
117 DVIPRINT=@DVIPRINT@
119 # Prefix for names of programs that have Unix counterparts.
120 # For example, if `g' is `g' then troff will be installed as
121 # gtroff. This doesn't affect programs like grops or groff that have
122 # no Unix counterparts. Note that the groff versions of eqn and tbl
123 # will not work with Unix troff.
124 g=@g@
126 # Common prefix for installation directories.
127 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
128 # This must already exist when you do make install.
129 prefix=@prefix@
130 exec_prefix=@exec_prefix@
132 # `bindir' says where to install executables.
133 bindir=@bindir@
135 # `libdir' says where to install platform-dependent data.
136 libdir=@libdir@
137 libprogramdir=$(libdir)/groff
139 # `datasubdir' says where to install platform-independent data files.
140 datadir=@datadir@
141 dataprogramdir=$(datadir)/groff
142 datasubdir=$(dataprogramdir)/$(version)$(revision)
144 # `infodir' says where to install info files.
145 infodir=@infodir@
147 # `docdir' says where to install documentation files.
148 docdir=$(datadir)/doc/groff/$(version)$(revision)
150 # `exampledir' says where to install example files.
151 exampledir=$(docdir)/examples
153 # `htmldocdir' says where to install documentation in HTML format.
154 htmldocdir=$(docdir)/html
156 # `pdfdocdir' says where to install documentation in PDF format.
157 pdfdocdir=$(docdir)/pdf
159 # `fontdir' says where to install dev*/*.
160 fontdir=$(datasubdir)/font
162 # `oldfontdir' says where to install old font sets (as dev*/*).
163 oldfontdir=$(datasubdir)/oldfont
165 # `localfontdir' says where local fonts will be installed (as dev*/*).
166 localfontdir=$(dataprogramdir)/site-font
168 # `legacyfontdir' is for compatibility with non-GNU troff.
169 legacyfontdir=/usr/lib/font
171 # `fontpath' says where to look for dev*/*.
172 fontpath=$(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir)
174 # `tmacdir' says where to install macros.
175 tmacdir=$(datasubdir)/tmac
177 # `systemtmacdir' says where to install platform-dependent macros.
178 systemtmacdir=$(libprogramdir)/site-tmac
180 # `localtmacdir' says where local files will be installed.
181 localtmacdir=$(dataprogramdir)/site-tmac
183 # `appresdir' says where to install the application resource file for
184 # gxditview.
185 appresdir=@appresdir@
187 # `tmacpath' says where to look for macro files.
188 # The current directory will be prepended in unsafe mode only; the home
189 # directory will be always added.
190 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
191 # current nor in the home directory.
192 tmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir)
194 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
195 sys_tmac_prefix=@sys_tmac_prefix@
197 # `pnmtops_nosetpage' is the command to be run to generate an eps
198 # file. Some versions of pnmtops provide the -nosetpage option.
199 # We detect this and use it if present.
200 pnmtops_nosetpage=@pnmtops_nosetpage@
202 # `tmac_wrap' is list of system macro packages that should be made
203 # available to groff by creating a corresponding macro package
204 # in the groff macro directory that references the system macro
205 # package.
206 tmac_wrap=@tmac_wrap@
208 # If there is a groff version of a macro package listed in $(tmac_wrap),
209 # then the groff version will be installed with a prefix of this.
210 # Don't make this empty.
211 tmac_prefix=g
213 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
214 tmac_m_prefix=\
215 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
216 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
217 tmac_s_prefix=\
218 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
219 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
220 tmac_an_prefix=\
221 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
223 # Extension to be used for refer index files. Index files are not
224 # sharable between different architectures, so you might want to use
225 # different suffixes for different architectures. Choose an extension
226 # that doesn't conflict with refer or any other indexing program.
227 indexext=.i
229 # Directory containing the default index for refer.
230 indexdir=/usr/dict/papers
232 # The filename (without suffix) of the default index for refer.
233 indexname=Ind
235 # common_words_file is a file containing a list of common words.
236 # If your system provides /usr/lib/eign it will be copied onto this,
237 # otherwise the supplied eign file will be used.
238 common_words_file=$(datasubdir)/eign
240 # `manroot' is the root of the man page directory tree.
241 mandir=@mandir@
242 manroot=$(mandir)
244 # `man1ext' is the man section for user commands.
245 man1ext=1
246 man1dir=$(manroot)/man$(man1ext)
248 # `man5ext' is the man section for file formats.
249 man5ext=5
250 man5dir=$(manroot)/man$(man5ext)
252 # `man7ext' is the man section for macros.
253 man7ext=7
254 man7dir=$(manroot)/man$(man7ext)
256 # The configure script checks whether all necessary utility programs for
257 # grohtml are available -- only then we can build the HTML documentation.
258 make_html=@make_html@
259 make_install_html=@make_install_html@
261 # The configure script also checks whether all necessary utility programs
262 # for pdfroff are available -- only then we can build PDF documentation.
263 make_pdfdoc=@make_pdfdoc@
264 make_install_pdfdoc=@make_install_pdfdoc@
266 # All the previous installation directories, when used, are prefixed with
267 # $(DESTDIR) during install and uninstall, to support staged installations.
269 # DEFINES should include the following:
271 # -DWORDS_BIGENDIAN if your target platform is big-endian
272 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
274 # -DHAVE_DIRECT_H if you have <direct.h>
275 # -DHAVE_DIRENT_H if you have <dirent.h>
276 # -DHAVE_CC_INTTYPES_H if you have a C++ <inttypes.h>
277 # -DHAVE_PROCESS_H if you have <process.h>
278 # -DHAVE_LIMITS_H if you have <limits.h>
279 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
280 # -DHAVE_MATH_H if you have <math.h>
281 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
282 # -DHAVE_STDDEF_H if you have <stddef.h>
283 # -DHAVE_STDLIB_H if you have <stdlib.h>
284 # -DHAVE_STRING_H if you have <string.h>
285 # -DHAVE_STRINGS_H if you have <strings.h>
286 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
287 # -DHAVE_SYS_STAT_H if you have <sys/stat.h>
288 # -DHAVE_SYS_TIME_H if you have <sys/time.h>
289 # -DHAVE_SYS_TYPES_H if you have <sys/types.h>
290 # -DHAVE_UNISTD_H if you have <unistd.h>
292 # -DHAVE_FMOD if you have fmod()
293 # -DHAVE_GETCWD if you have getcwd()
294 # -DHAVE_GETTIMEOFDAY if you have gettimeofday()
295 # -DHAVE_ICONV if you have iconv()
296 # -DHAVE_ISATTY if you have isatty()
297 # -DHAVE_KILL if you have kill()
298 # -DHAVE_LANGINFO_CODESET if you have nl_langinfo()
299 # -DHAVE_MKSTEMP if you have mkstemp()
300 # -DHAVE_MMAP if you have mmap()
301 # -DHAVE_PUTENV if you have putenv()
302 # -DHAVE_RENAME if you have rename()
303 # -DHAVE_SETLOCALE if you have setlocale()
304 # -DHAVE_SNPRINTF if you have snprintf()
305 # -DHAVE_STRCASECMP if you have strcasecmp()
306 # -DHAVE_STRNCASECMP if you have strncasecmp()
307 # -DHAVE_STRERROR if you have strerror()
308 # -DHAVE_STRSEP if you have strsep()
309 # -DHAVE_STRTOL if you have strtol()
310 # -DHAVE_VSNPRINTF if you have vsnprintf()
312 # -DNEED_DECLARATION_GETTIMEOFTODAY
313 # if your C++ <sys/time.h> doesn't declare
314 # gettimeofday()
315 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
316 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
317 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
318 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare
319 # putenv()
320 # -DNEED_DECLARATION_RAND if your C++ <stdlib.h> doesn't declare rand()
321 # -DNEED_DECLARATION_SNPRINTF if your C++ <stdio.h> doesn't declare
322 # snprintf()
323 # -DNEED_DECLARATION_SRAND if your C++ <stdlib.h> doesn't declare srand()
324 # -DNEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare
325 # strcasecmp()
326 # -DNEED_DECLARATION_STRNCASECMP
327 # if your C++ <string.h> doesn't declare
328 # strncasecmp()
329 # -DNEED_DECLARATION_VFPRINTF if your C++ <stdio.h> doesn't declare
330 # vfprintf()
331 # -DNEED_DECLARATION_VSNPRINTF if your C++ <stdio.h> doesn't declare
332 # vsnprintf()
334 # -DHAVE_DECL_GETC_UNLOCKED if you have getc_unlocked()
335 # -DHAVE_DECL_SYS_SIGLIST if you have sys_siglist[]
337 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
338 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
339 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
340 # <stdio.h>
341 # -DICONV_CONST=const if declaration of iconv() needs const
342 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
343 # -DRETSIGTYPE=int if signal handlers return int not void
344 # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int
346 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
347 # wait() indicates whether a core image was
348 # produced for a process that was terminated
349 # by a signal
351 # -Duintmax_t=<value> define to `unsigned long' or `unsigned long
352 # long' if <inttypes.h> does not exist
354 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
355 # (Reiser) preprocessor
356 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
358 # -DPAGE=A4 if the the printer's page size is A4
359 # -DGHOSTSCRIPT=gs the name (and directory if required) of the
360 # ghostscript program
362 DEFINES=@DEFS@
364 # Include
366 # {fmod,getcwd,mkstemp,putenv,snprintf,strcasecmp,
367 # strerror,strncasecmp,strtol}.$(OBJEXT)
369 # in LIBOBJS if your C library is missing the corresponding function.
370 # vsnprintf is defined in the snprintf.$(OBJEXT) module.
371 LIBOBJS=@LIBOBJS@
373 # `CCC' is the compiler for C++ (.cpp) files.
374 CCC=@CXX@
375 CC=@CC@
376 # CCDEFINES are definitions for C++ compilations.
377 CCDEFINES=$(DEFINES)
378 # CDEFINES are definitions for C compilations.
379 CDEFINES=$(DEFINES)
381 CCFLAGS=@CXXFLAGS@
382 CFLAGS=@CFLAGS@
383 CPPFLAGS=@CPPFLAGS@
384 LDFLAGS=@LDFLAGS@
386 X_CFLAGS=@X_CFLAGS@
387 X_LIBS=@X_LIBS@
388 X_EXTRA_LIBS=@X_EXTRA_LIBS@
389 X_PRE_LIBS=@X_PRE_LIBS@
391 YACC=@YACC@
392 YACCFLAGS=-v
394 EGREP=@EGREP@
396 MAKEINFO=@MAKEINFO@
398 EXEEXT=@EXEEXT@
399 OBJEXT=@OBJEXT@
400 # a simple heuristic assumption
401 LIBEXT=`case $(OBJEXT) in obj) echo lib;; *) echo a;; esac`
402 LIBS=@LIBS@
403 LIBM=@LIBM@
404 LIBICONV=@LIBICONV@
405 RANLIB=@RANLIB@
406 INSTALL=@INSTALL@
407 INSTALL_PROGRAM=@INSTALL_PROGRAM@
408 INSTALL_SCRIPT=@INSTALL_SCRIPT@
409 INSTALL_DATA=@INSTALL_DATA@
410 INSTALL_INFO=@INSTALL_INFO@
411 LN_S=@LN_S@
412 AR=ar
413 ETAGS=etags
414 ETAGSFLAGS=
415 # Flag that tells etags to assume C++.
416 ETAGSCCFLAG=-C
417 # Full path to perl.
418 PERLPATH=@PERLPATH@
419 # Sed command with which to edit sh scripts.
420 SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
421 # Sed script to deal with OS dependencies in sh scripts.
422 SH_DEPS_SED_SCRIPT=$(top_builddir)/arch/misc/shdeps.sed
424 # The program to create directory hierarchies.
425 mkinstalldirs= $(SHELL) $(top_srcdir)/mkinstalldirs
427 PURIFY=purify
428 PURIFYCCFLAGS=
429 #PURIFYCCFLAGS=-g++=yes \
430 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
432 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
433 # copy of $(MDEFINES) when making individual directories; this could
434 # cause the argument list to become too long on some systems.
435 MDEFINES= \
436 "ALT_AWK_PROGS=$(ALT_AWK_PROGS)" \
437 "ALT_GHOSTSCRIPT_PROGS=$(ALT_GHOSTSCRIPT_PROGS)" \
438 "AR=$(AR)" \
439 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
440 "CC=$(CC)" \
441 "CCC=$(CCC)" \
442 "CCDEFINES=$(CCDEFINES)" \
443 "CCFLAGS=$(CCFLAGS)" \
444 "CDEFINES=$(CDEFINES)" \
445 "CFLAGS=$(CFLAGS)" \
446 "CPPFLAGS=$(CPPFLAGS)" \
447 "DEVICE=$(DEVICE)" \
448 "DVIPRINT=$(DVIPRINT)" \
449 "EGREP=$(EGREP)" \
450 "ETAGS=$(ETAGS)" \
451 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
452 "ETAGSFLAGS=$(ETAGSFLAGS)" \
453 "EXEEXT=$(EXEEXT)" \
454 "GLIBC21=$(GLIBC21)" \
455 "HOST=$(HOST)" \
456 "INSTALL_DATA=$(INSTALL_DATA)" \
457 "INSTALL_INFO=$(INSTALL_INFO)" \
458 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
459 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
460 "LDFLAGS=$(LDFLAGS)" \
461 "LIBEXT=$(LIBEXT)" \
462 "LIBICONV=$(LIBICONV)" \
463 "LIBM=$(LIBM)" \
464 "LIBOBJS=$(LIBOBJS)" \
465 "LIBS=$(LIBS)" \
466 "MAKEINFO=$(MAKEINFO)" \
467 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
468 "OBJEXT=$(OBJEXT)" \
469 "OTHERDEVDIRS=$(OTHERDEVDIRS)" \
470 "PAGE=$(PAGE)" \
471 "GHOSTSCRIPT=$(GHOSTSCRIPT)" \
472 "PERLPATH=$(PERLPATH)" \
473 "PSPRINT=$(PSPRINT)" \
474 "PURIFY=$(PURIFY)" \
475 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \
476 "RANLIB=$(RANLIB)" \
477 "RT_SEP=$(RT_SEP)" \
478 "SH_SEP=$(SH_SEP)" \
479 "SHELL=$(SHELL)" \
480 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
481 "SH_DEPS_SED_SCRIPT=$(SH_DEPS_SED_SCRIPT)" \
482 "TTYDEVDIRS=$(TTYDEVDIRS)" \
483 "XDEVDIRS=$(XDEVDIRS)" \
484 "XLIBDIRS=$(XLIBDIRS)" \
485 "XPROGDIRS=$(XPROGDIRS)" \
486 "X_CFLAGS=$(X_CFLAGS)" \
487 "X_LIBS=$(X_LIBS)" \
488 "X_EXTRA_LIBS=$(X_EXTRA_LIBS)" \
489 "X_PRE_LIBS=$(X_PRE_LIBS)" \
490 "YACC=$(YACC)" \
491 "YACCFLAGS=$(YACCFLAGS)" \
492 "appresdir=$(appresdir)" \
493 "bindir=$(bindir)" \
494 "common_words_file=$(common_words_file)" \
495 "datadir=$(datadir)" \
496 "dataprogramdir=$(dataprogramdir)" \
497 "datasubdir=$(datasubdir)" \
498 "docdir=$(docdir)" \
499 "exampledir=$(exampledir)" \
500 "exec_prefix=$(exec_prefix)" \
501 "fontdir=$(fontdir)" \
502 "fontpath=$(fontpath)" \
503 "g=$(g)" \
504 "htmldocdir=$(htmldocdir)" \
505 "pdfdocdir=$(pdfdocdir)" \
506 "indexdir=$(indexdir)" \
507 "indexext=$(indexext)" \
508 "indexname=$(indexname)" \
509 "infodir=$(infodir)" \
510 "legacyfontdir=$(legacyfontdir)" \
511 "libdir=$(libdir)" \
512 "libprogramdir=$(libprogramdir)" \
513 "localfontdir=$(localfontdir)" \
514 "localtmacdir=$(localtmacdir)" \
515 "make_html=$(make_html)" \
516 "make_install_html=$(make_install_html)" \
517 "make_pdfdoc=$(make_pdfdoc)" \
518 "make_install_pdfdoc=$(make_install_pdfdoc)" \
519 "man1dir=$(man1dir)" \
520 "man1ext=$(man1ext)" \
521 "man5dir=$(man5dir)" \
522 "man5ext=$(man5ext)" \
523 "man7dir=$(man7dir)" \
524 "man7ext=$(man7ext)" \
525 "manroot=$(manroot)" \
526 "mkinstalldirs=$(mkinstalldirs)" \
527 "oldfontdir=$(oldfontdir)" \
528 "pnmtops_nosetpage=$(pnmtops_nosetpage)" \
529 "prefix=$(prefix)" \
530 "revision=$(revision)" \
531 "sys_tmac_prefix=$(sys_tmac_prefix)" \
532 "systemtmacdir=$(systemtmacdir)" \
533 "tmac_an_prefix=$(tmac_an_prefix)" \
534 "tmac_m_prefix=$(tmac_m_prefix)" \
535 "tmac_s_prefix=$(tmac_s_prefix)" \
536 "tmac_wrap=$(tmac_wrap)" \
537 "tmacdir=$(tmacdir)" \
538 "tmacpath=$(tmacpath)" \
539 "top_builddir=$(top_builddir)" \
540 "top_srcdir=$(top_srcdir)" \
541 "version=$(version)"
543 MAKE_K_FLAG=`case "$(MAKEFLAGS)" in *k*) echo ' -k ';; esac`
545 INCDIRS=src/include
546 LIBDIRS=\
547 src/libs/libgroff \
548 src/libs/libdriver \
549 src/libs/libbib \
550 $(XLIBDIRS)
551 CCPROGDIRS=\
552 src/roff/groff \
553 src/roff/troff \
554 src/preproc/preconv \
555 src/preproc/tbl \
556 src/preproc/pic \
557 src/preproc/eqn \
558 src/preproc/grn \
559 src/preproc/refer \
560 src/preproc/soelim \
561 src/preproc/html \
562 src/devices/grops \
563 src/devices/grotty \
564 src/devices/grodvi \
565 src/devices/grolj4 \
566 src/devices/grohtml \
567 src/devices/grolbp \
568 src/utils/tfmtodit \
569 src/utils/hpftodit \
570 src/utils/lookbib \
571 src/utils/indxbib \
572 src/utils/lkbib \
573 src/utils/addftinfo
574 CPROGDIRS=\
575 src/utils/pfbtops
576 PROGDEPDIRS=arch/misc
577 PROGDIRS=$(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) $(XPROGDIRS)
578 DEVDIRS=\
579 font/devps \
580 font/devdvi \
581 font/devhtml
582 ALLTTYDEVDIRS=\
583 font/devascii \
584 font/devlatin1 \
585 font/devutf8 \
586 font/devcp1047
587 # `doc' must be processed before `contrib/pdfmark'.
588 OTHERDIRS=\
589 man \
590 tmac \
591 src/utils/afmtodit \
592 src/roff/grog \
593 src/roff/nroff \
594 doc \
595 contrib/mm \
596 contrib/chem \
597 contrib/pic2graph \
598 contrib/eqn2graph \
599 contrib/grap2graph \
600 contrib/groffer \
601 contrib/mom \
602 contrib/hdtbl \
603 contrib/pdfmark \
604 contrib/gdiffmk
605 ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
606 $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
607 EXTRADIRS=\
608 font/devps/generate \
609 font/devdvi/generate \
610 font/devlj4/generate \
612 NOMAKEDIRS=\
613 arch/djgpp \
614 contrib/chem/examples \
615 contrib/chem/examples/122 \
616 contrib/groffer/perl \
617 contrib/groffer/shell \
618 contrib/hdtbl/examples \
619 contrib/mm/examples \
620 contrib/mm/mm \
621 contrib/mom/examples \
622 contrib/mom/momdoc \
623 contrib/gdiffmk/tests \
624 src/libs/snprintf
625 DISTDIRS=\
626 $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) \
627 $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS)
628 TARGETS=all install_bin install_data clean distclean mostlyclean \
629 realclean extraclean distfiles TAGS depend uninstall_sub fonts
631 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
632 # where Make needs to be case-sensitive to find files like BI and VERSION.
633 ENVSETUP=\
634 if test -f $(srcdir)/makefile.ccpg* && \
635 test -f $(srcdir)/Makefile.ccpg*; then \
636 FNCASE=y; export FNCASE; \
637 else :; \
640 do=all
641 dodirs=$(ALLDIRS) dot
642 # Default target for subdir_Makefile
643 subdir=src/roff/troff
646 $(TARGETS):
647 @$(ENVSETUP); $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) do=$@ $(dodirs)
649 dot: FORCE
650 @$(ENVSETUP); \
651 $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
652 -f $(top_srcdir)/Makefile.comm \
653 -f $(top_srcdir)/Makefile.sub $(do)
655 $(LIBDIRS): FORCE $(INCDIRS) $(PROGDEPDIRS)
656 @$(ENVSETUP); \
657 if test $(srcdir) = .; then \
658 srcdir=.; \
659 else \
660 srcdir=`cd $(srcdir); pwd`/$@; \
661 fi; \
662 test -d $@ || $(mkinstalldirs) $@; \
663 cd $@; \
664 test -f Makefile.dep || touch Makefile.dep; \
665 $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
666 -f $(top_srcdir)/Makefile.comm \
667 -f $$srcdir/Makefile.sub \
668 -f $(top_srcdir)/Makefile.lib \
669 -f Makefile.dep $(do)
671 $(CPROGDIRS) $(XPROGDIRS): FORCE $(LIBDIRS)
672 @$(ENVSETUP); \
673 if test $(srcdir) = .; then \
674 srcdir=.; \
675 else \
676 srcdir=`cd $(srcdir); pwd`/$@; \
677 fi; \
678 test -d $@ || $(mkinstalldirs) $@; \
679 cd $@; \
680 test -f Makefile.dep || touch Makefile.dep; \
681 $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
682 -f $(top_srcdir)/Makefile.comm \
683 -f $$srcdir/Makefile.sub \
684 -f $(top_srcdir)/Makefile.cpg \
685 -f Makefile.dep $(do)
687 $(CCPROGDIRS): FORCE $(LIBDIRS)
688 @$(ENVSETUP); \
689 if test $(srcdir) = .; then \
690 srcdir=.; \
691 else \
692 srcdir=`cd $(srcdir); pwd`/$@; \
693 fi; \
694 test -d $@ || $(mkinstalldirs) $@; \
695 cd $@; \
696 test -f Makefile.dep || touch Makefile.dep; \
697 $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
698 -f $(top_srcdir)/Makefile.comm \
699 -f $$srcdir/Makefile.sub \
700 -f $(top_srcdir)/Makefile.ccpg \
701 -f Makefile.dep $(do)
703 $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
704 @$(ENVSETUP); \
705 if test $(srcdir) = .; then \
706 srcdir=.; \
707 else \
708 srcdir=`cd $(srcdir); pwd`/$@; \
709 fi; \
710 test -d $@ || $(mkinstalldirs) $@; \
711 cd $@; \
712 $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
713 -f $(top_srcdir)/Makefile.comm \
714 -f $$srcdir/Makefile.sub \
715 -f $(top_srcdir)/Makefile.dev $(do)
717 $(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
719 $(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE
720 @$(ENVSETUP); \
721 if test $(srcdir) = .; then \
722 srcdir=.; \
723 else \
724 srcdir=`cd $(srcdir); pwd`/$@; \
725 fi; \
726 test -d $@ || $(mkinstalldirs) $@; \
727 cd $@; \
728 $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
729 -f $(top_srcdir)/Makefile.comm \
730 -f $$srcdir/Makefile.sub \
731 -f $(top_srcdir)/Makefile.man $(do)
733 .PHONY: dist
734 dist:
735 -rm -fr tmp
736 rm -f groff-$(version)$(revision).tar.gz
737 mkdir tmp
738 for d in $(DISTDIRS); do \
739 $(mkinstalldirs) tmp/$$d; \
740 done
741 srcdir=`cd $(srcdir); pwd`; \
742 cd tmp; \
743 $(LN_S) ../Makefile .; \
744 $(LN_S) $$srcdir/* . 2>/dev/null || true; \
745 rm -rf CVS; \
746 for d in $(DISTDIRS); do \
747 (cd $$d; \
748 $(LN_S) $$srcdir/$$d/* . 2>/dev/null; \
749 rm -rf CVS || true); \
750 done; \
751 $(MAKE) srcdir=. VPATH=. distfiles; \
752 $(MAKE) srcdir=. VPATH=. extraclean; \
753 for d in $(EXTRADIRS); do \
754 (cd $$d; \
755 if test -f Makefile; then \
756 $(MAKE) extraclean; \
757 else \
758 $(MAKE) -f $(top_builddir)/$$d/Makefile extraclean; \
759 fi); \
760 done; \
761 rm -f Makefile; \
762 $(LN_S) $$srcdir/Makefile.init Makefile
763 mv tmp groff-$(version)$(revision)
764 tar cfh - groff-$(version)$(revision) | \
765 gzip -c >groff-$(version)$(revision).tar.gz
766 rm -fr groff-$(version)$(revision)
768 # $(PROGDIRS): libgroff
769 # grops grotty grodvi: libdriver
770 # refer lookbib indxbib lkbib: libbib
771 # $(LIBDIRS) $(PROGDIRS): include
773 .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
775 # Create a Makefile in $(subdir). This is useful for development since it
776 # avoids running make recursively.
777 subdir_Makefile: Makefile.cfg
778 $(MAKE) do=Makefile $(subdir)
780 Makefile.cfg: Makefile
781 >Makefile.cfg
782 for var in $(MDEFINES); do \
783 echo "$$var" >>Makefile.cfg; \
784 done
786 Makefile: Makefile.in
787 $(SHELL) config.status
789 .PHONY: install
790 install:
791 -test -d $(DESTDIR)$(prefix) \
792 || $(mkinstalldirs) $(DESTDIR)$(prefix)
793 @$(ENVSETUP); $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) \
794 do=do_install $(dodirs)
795 cd $(DESTDIR)$(dataprogramdir); \
796 rm -f current; \
797 $(LN_S) $(version)$(revision) current
799 .PHONY: uninstall
800 uninstall: uninstall_sub uninstall_dirs
802 .PHONY: uninstall_dirs
803 # Use `rmdir' here so that the directories are only removed if they are empty.
804 uninstall_dirs:
805 -rm -f $(dataprogramdir)/current
806 -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
807 $(tmacdir) $(systemtmacdir) $(localtmacdir) \
808 $(fontdir) $(localfontdir) $(oldfontdir) $(bindir) \
809 $(datasubdir) $(dataprogramdir) $(infodir) \
810 $(exampledir) $(htmldocdir) $(pdfdocdir) $(docdir) \
811 $(libprogramdir) $(libdir) \
812 $(datadir)/doc/groff $(datadir)/doc $(datadir) 2>/dev/null || :
814 .PHONY: check
815 check:
816 @echo There is no validation suite for this package.
818 #check: site.exp docheck
819 #.PHONY: docheck
821 #docheck:
822 # if $(SHELL) -c "runtest --version" > /dev/null 2>&1; then \
823 # runtest; \
824 # else \
825 # echo "WARNING: could not find \`runtest'" 1>&2; \
826 # fi
828 # This snippet has been taken from the automake package.
830 #site.exp:
831 # @echo "Making a new site.exp file..."
832 # @echo "## these variables are automatically generated by make ##" >site.tmp
833 # @echo "# Do not edit here. If you wish to override these values" >>site.tmp
834 # @echo "# edit the last section" >>site.tmp
835 # @echo "set tool groff" >>site.tmp
836 # @echo "set srcdir $(srcdir)/testsuite" >>site.tmp
837 # @echo "set objdir `pwd`" >> site.tmp
838 # @echo "## All variables above are generated by configure. Do not edit! ##" >> site.tmp
839 # @test ! -f site.exp \
840 # || sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
841 # @-rm -f site.bak
842 # @test ! -f site.exp || mv site.exp site.bak
843 # @mv site.tmp site.exp
845 FORCE:
847 .NOEXPORT: