1 # Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2 # Written by James Clark (jjc@jclark.com)
4 # This file is part of groff.
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
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
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.
21 top_srcdir
=@top_srcdir@
23 top_builddir
=@groff_top_builddir@
26 version
=`cat $(top_srcdir)/VERSION`
27 # No additional number if revision is zero.
28 revision
=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
30 # Define `page' to be letter if your PostScript printer uses 8.5x11
31 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
35 # Normally the Postscript driver, grops, produces output that conforms
36 # to version 3.0 of the Adobe Document Structuring Conventions.
37 # Unfortunately some spoolers and previewers can't handle such output.
38 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
39 # make its output acceptable to such programs. This variable controls
40 # only the default behaviour of grops; the behaviour can be changed at
41 # runtime by the grops -b option (and so by groff -P-b).
42 # Use a value of 0 if your spoolers and previewers are able to handle
43 # conforming PostScript correctly.
44 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
45 # this is needed for early versions of TranScript that get confused by
46 # anything between the %%EndProlog line and the first %%Page: comment.
47 # Add 2 if lines in included files beginning with %! should be
48 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
49 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
50 # stripped out of included files; this is needed for spoolers that
51 # don't understand the %%{Begin,End}Document comments. I suspect this
52 # includes early versions of TranScript.
53 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
54 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
55 # with a printer that requires page reversal.
56 BROKEN_SPOOLER_FLAGS
=@BROKEN_SPOOLER_FLAGS@
58 # `DEVICE' is the default device.
61 # `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for
62 # ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8.
63 TTYDEVDIRS
=@TTYDEVDIRS@ font
/devutf8
65 # `OTHERDEVDIRS' is either `font/devlj4 font/devlbp' (for ASCII) or
67 OTHERDEVDIRS
=@OTHERDEVDIRS@
69 # `PSPRINT' is the command to use for printing a PostScript file,
73 # `DVIPRINT' is the command to use for printing a TeX dvi file,
74 # for example `lpr -d'.
77 # Prefix for names of programs that have Unix counterparts.
78 # For example, if `g' is `g' then troff will be installed as
79 # gtroff. This doesn't affect programs like grops or groff that have
80 # no Unix counterparts. Note that the groff versions of eqn and tbl
81 # will not work with Unix troff.
84 # Common prefix for installation directories.
85 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
86 # This must already exist when you do make install.
88 exec_prefix=@
exec_prefix@
90 # `bindir' says where to install executables.
93 # `libdir' says where to install platform-dependent data.
95 libprogramdir
=$(libdir)/groff
97 # `datasubdir' says where to install platform-independent data files.
99 dataprogramdir
=$(datadir)/groff
100 datasubdir
=$(dataprogramdir
)/$(version
)$(revision
)
102 # `infodir' says where to install info files.
105 # `docdir' says where to install documentation files.
106 docdir
=$(datadir)/doc
/groff
/$(version
)$(revision
)
108 # `exampledir' says where to install example files.
109 exampledir
=$(docdir
)/examples
111 # `htmldocdir' says where to install documentation in HTML format.
112 htmldocdir
=$(docdir
)/html
114 # `fontdir' says where to install dev*/*.
115 fontdir
=$(datasubdir
)/font
117 # `localfontdir' says where local fonts will be installed (as dev*/*).
118 localfontdir
=$(dataprogramdir
)/site-font
120 # `legacyfontdir' is for compatibility with non-GNU troff.
121 legacyfontdir
=/usr
/lib
/font
123 # `fontpath' says where to look for dev*/*.
124 fontpath
=$(localfontdir
)$(SEP
)$(fontdir
)$(SEP
)$(legacyfontdir
)
126 # `tmacdir' says where to install macros.
127 tmacdir
=$(datasubdir
)/tmac
129 # `systemtmacdir' says where to install platform-dependent macros.
130 systemtmacdir
=$(libprogramdir
)/site-tmac
132 # `localtmacdir' says where local files will be installed.
133 localtmacdir
=$(dataprogramdir
)/site-tmac
135 # `tmacpath' says where to look for macro files.
136 # The current directory will be prepended in unsafe mode only; the home
137 # directory will be always added.
138 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
139 # current nor in the home directory.
140 tmacpath
=$(systemtmacdir
)$(SEP
)$(localtmacdir
)$(SEP
)$(tmacdir
)
142 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
143 sys_tmac_prefix
=@sys_tmac_prefix@
145 # `pnmtops_nosetpage' is the command to be run to generate an eps
146 # file. Some versions of pnmtops provide the -nosetpage option.
147 # We detect this and use it if present.
148 pnmtops_nosetpage
=@pnmtops_nosetpage@
150 # `tmac_wrap' is list of system macro packages that should be made
151 # available to groff by creating a corresponding macro package
152 # in the groff macro directory that references the system macro
154 tmac_wrap
=@tmac_wrap@
156 # If there is a groff version of a macro package listed in $(tmac_wrap),
157 # then the groff version will be installed with a prefix of this.
158 # Don't make this empty.
161 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
163 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
164 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
166 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
167 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
169 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
171 # Extension to be used for refer index files. Index files are not
172 # sharable between different architectures, so you might want to use
173 # different suffixes for different architectures. Choose an extension
174 # that doesn't conflict with refer or any other indexing program.
177 # Directory containing the default index for refer.
178 indexdir
=/usr
/dict
/papers
180 # The filename (without suffix) of the default index for refer.
183 # common_words_file is a file containing a list of common words.
184 # If your system provides /usr/lib/eign it will be copied onto this,
185 # otherwise the supplied eign file will be used.
186 common_words_file
=$(datasubdir
)/eign
188 # `manroot' is the root of the man page directory tree.
192 # `man1ext' is the man section for user commands.
194 man1dir=$(manroot
)/man
$(man1ext)
196 # `man5ext' is the man section for file formats.
198 man5dir=$(manroot
)/man
$(man5ext)
200 # `man7ext' is the man section for macros.
202 man7dir=$(manroot
)/man
$(man7ext)
204 # The configure script checks whether all necessary utility programs for
205 # grohtml are available -- only then we can build the HTML documentation.
206 make_html
=@make_html@
207 make_install_html
=@make_install_html@
209 # DEFINES should include the following:
210 # -DHAVE_MMAP if you have mmap() and <sys/mman.h>
211 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
212 # -DSYS_SIGLIST_DECLARED if you have sys_siglist[]
213 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
214 # wait() indicates whether a core image was
215 # produced for a process that was terminated
218 # -DHAVE_DIRENT_H if you have <dirent.h>
219 # -DHAVE_LIMITS_H if you have <limits.h>
220 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
221 # -DHAVE_MATH_H if you have <math.h>
222 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
223 # -DHAVE_STDINT_H if you have <stdint.h>
224 # -DHAVE_STDLIB_H if you have <stdlib.h>
225 # -DHAVE_STRING_H if you have <string.h>
226 # -DHAVE_STRINGS_H if you have <strings.h>
227 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
228 # -DHAVE_SYS_TIME_H if you have <sys/time.h>
229 # -DHAVE_UNISTD_H if you have <unistd.h>
231 # -DHAVE_FMOD if you have fmod()
232 # -DHAVE_GETCWD if you have getcwd()
233 # -DHAVE_GETTIMEOFDAY if you have gettimeofday()
234 # -DHAVE_ISATTY if you have isatty()
235 # -DHAVE_MKSTEMP if you have mkstemp()
236 # -DHAVE_MMAP if you have mmap()
237 # -DHAVE_PUTENV if you have putenv()
238 # -DHAVE_RENAME if you have rename()
239 # -DHAVE_SETLOCALE if you have setlocale()
240 # -DHAVE_SNPRINTF if you have snprintf()
241 # -DHAVE_STRCASECMP if you have strcasecmp()
242 # -DHAVE_STRNCASECMP if you have strncasecmp()
243 # -DHAVE_STRERROR if you have strerror()
244 # -DHAVE_STRSEP if you have strsep()
245 # -DHAVE_STRTOL if you have strtol()
247 # -DNEED_DECLARATION_GETTIMEOFTODAY
248 # if your C++ <sys/time.h> doesn't declare
250 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
251 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
252 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
253 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare putenv()
254 # -DNEED_DECLARATION_RAND if your C++ <stdlib.h> doesn't declare rand()
255 # -DNEED_DECLARATION_SRAND if your C++ <stdlib.h> doesn't declare srand()
256 # -DNEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare
258 # -DNEED_DECLARATION_STRNCASECMP
259 # if your C++ <string.h> doesn't declare
262 # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int
263 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
264 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
266 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
267 # (Reiser) preprocessor
268 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
269 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
270 # -DRETSIGTYPE=int if signal handlers return int not void
271 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
272 # -DPAGEA4 if the the printer's page size is A4
277 # {fmod,getcwd,mkstemp,putenv,snprintf,strcasecmp,
278 # strerror,strncasecmp,strtol}.$(OBJEXT)
280 # in LIBOBJS if your C library is missing the corresponding function.
283 # `CCC' is the compiler for C++ (.cc) files.
286 # CCDEFINES are definitions for C++ compilations.
288 # CDEFINES are definitions for C compilations.
299 # a simple heuristic assumption
300 LIBEXT
=`case $(OBJEXT) in obj) echo lib;; *) echo a;; esac`
305 INSTALL_PROGRAM
=@INSTALL_PROGRAM@
306 INSTALL_SCRIPT
=@INSTALL_SCRIPT@
307 INSTALL_DATA
=@INSTALL_DATA@
308 INSTALL_INFO
=@INSTALL_INFO@
313 # Flag that tells etags to assume C++.
317 # Sed command with which to edit sh scripts.
318 SH_SCRIPT_SED_CMD
=@SH_SCRIPT_SED_CMD@
320 # The program to create directory hierarchies.
321 mkinstalldirs
=$(top_srcdir
)/mkinstalldirs
325 #PURIFYCCFLAGS=-g++=yes \
326 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
328 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
329 # copy of $(MDEFINES) when making individual directories; this could
330 # cause the argument list to become too long on some systems.
333 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
336 "CCDEFINES=$(CCDEFINES)" \
337 "CCFLAGS=$(CCFLAGS)" \
338 "CDEFINES=$(CDEFINES)" \
341 "DVIPRINT=$(DVIPRINT)" \
343 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
344 "ETAGSFLAGS=$(ETAGSFLAGS)" \
346 "INSTALL_DATA=$(INSTALL_DATA)" \
347 "INSTALL_INFO=$(INSTALL_INFO)" \
348 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
349 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
350 "LDFLAGS=$(LDFLAGS)" \
353 "LIBOBJS=$(LIBOBJS)" \
355 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
357 "OTHERDEVDIRS=$(OTHERDEVDIRS)" \
359 "PERLPATH=$(PERLPATH)" \
360 "PSPRINT=$(PSPRINT)" \
362 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \
365 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
366 "TTYDEVDIRS=$(TTYDEVDIRS)" \
368 "YACCFLAGS=$(YACCFLAGS)" \
370 "common_words_file=$(common_words_file)" \
371 "datadir=$(datadir)" \
372 "dataprogramdir=$(dataprogramdir)" \
373 "datasubdir=$(datasubdir)" \
375 "exampledir=$(exampledir)" \
376 "exec_prefix=$(exec_prefix)" \
377 "fontdir=$(fontdir)" \
378 "fontpath=$(fontpath)" \
380 "htmldocdir=$(htmldocdir)" \
381 "indexdir=$(indexdir)" \
382 "indexext=$(indexext)" \
383 "indexname=$(indexname)" \
384 "infodir=$(infodir)" \
385 "legacyfontdir=$(legacyfontdir)" \
387 "libprogramdir=$(libprogramdir)" \
388 "localfontdir=$(localfontdir)" \
389 "localtmacdir=$(localtmacdir)" \
390 "make_html=$(make_html)" \
391 "make_install_html=$(make_install_html)" \
392 "man1dir=$(man1dir)" \
393 "man1ext=$(man1ext)" \
394 "man5dir=$(man5dir)" \
395 "man5ext=$(man5ext)" \
396 "man7dir=$(man7dir)" \
397 "man7ext=$(man7ext)" \
398 "manroot=$(manroot)" \
399 "mkinstalldirs=$(mkinstalldirs)" \
401 "revision=$(revision)" \
402 "sys_tmac_prefix=$(sys_tmac_prefix)" \
403 "pnmtops_nosetpage=$(pnmtops_nosetpage)" \
404 "systemtmacdir=$(systemtmacdir)" \
405 "tmac_an_prefix=$(tmac_an_prefix)" \
406 "tmac_m_prefix=$(tmac_m_prefix)" \
407 "tmac_s_prefix=$(tmac_s_prefix)" \
408 "tmac_wrap=$(tmac_wrap)" \
409 "tmacdir=$(tmacdir)" \
410 "tmacpath=$(tmacpath)" \
411 "top_builddir=$(top_builddir)" \
412 "top_srcdir=$(top_srcdir)" \
435 src
/devices
/grohtml \
443 CPROGDIRS
=src
/utils
/pfbtops
444 PROGDIRS
=$(CCPROGDIRS
) $(CPROGDIRS
)
470 ALLDIRS
=$(INCDIRS
) $(LIBDIRS
) $(PROGDIRS
) \
471 $(DEVDIRS
) $(OTHERDEVDIRS
) $(TTYDEVDIRS
) $(OTHERDIRS
)
473 font
/devps
/generate \
474 font
/devdvi
/generate \
475 font
/devlj4
/generate \
480 contrib
/mm
/examples \
482 contrib
/mom
/examples \
486 $(INCDIRS
) $(LIBDIRS
) $(PROGDIRS
) $(DEVDIRS
) $(OTHERDEVDIRS
) \
487 $(ALLTTYDEVDIRS
) $(OTHERDIRS
) $(EXTRADIRS
) $(NOMAKEDIRS
)
488 TARGETS
=all install install_bin
install_data clean distclean mostlyclean \
489 realclean extraclean distfiles TAGS depend uninstall_sub
491 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
492 # where Make needs to be case-sensitive to find files like BI and VERSION.
494 if
test -f
$(srcdir)/makefile.ccpg
* && \
495 test -f
$(srcdir)/Makefile.ccpg
*; \
496 then FNCASE
=y
; export FNCASE
; \
501 dodirs
=$(ALLDIRS
) dot
502 # Default target for subdir_Makefile
503 subdir
=src
/roff
/troff
507 @
$(ENVSETUP
); $(MAKE
) $(MDEFINES
) do
=$@
$(dodirs
)
511 $(MAKE
) $(MDEFINES
) srcdir=$(srcdir) VPATH
=$(srcdir) \
512 -f
$(top_srcdir
)/Makefile.comm \
513 -f
$(top_srcdir
)/Makefile.sub
$(do
)
517 if
test $(srcdir) = .
; \
519 else srcdir=`cd $(srcdir); pwd`/$@
; \
521 test -d
$@ ||
$(mkinstalldirs
) $@
; \
523 test -f Makefile.dep || touch Makefile.dep
; \
524 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
525 -f
$(top_srcdir
)/Makefile.comm \
526 -f
$$srcdir/Makefile.sub \
527 -f
$(top_srcdir
)/Makefile.lib \
528 -f Makefile.dep
$(do
)
532 if
test $(srcdir) = .
; \
534 else srcdir=`cd $(srcdir); pwd`/$@
; \
536 test -d
$@ ||
$(mkinstalldirs
) $@
; \
538 test -f Makefile.dep || touch Makefile.dep
; \
539 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
540 -f
$(top_srcdir
)/Makefile.comm \
541 -f
$$srcdir/Makefile.sub \
542 -f
$(top_srcdir
)/Makefile.cpg \
543 -f Makefile.dep
$(do
)
547 if
test $(srcdir) = .
; \
549 else srcdir=`cd $(srcdir); pwd`/$@
; \
551 test -d
$@ ||
$(mkinstalldirs
) $@
; \
553 test -f Makefile.dep || touch Makefile.dep
; \
554 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
555 -f
$(top_srcdir
)/Makefile.comm \
556 -f
$$srcdir/Makefile.sub \
557 -f
$(top_srcdir
)/Makefile.ccpg \
558 -f Makefile.dep
$(do
)
560 $(DEVDIRS
) $(OTHERDEVDIRS
) $(TTYDEVDIRS
): FORCE
562 if
test $(srcdir) = .
; \
564 else srcdir=`cd $(srcdir); pwd`/$@
; \
566 test -d
$@ ||
$(mkinstalldirs
) $@
; \
568 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
569 -f
$(top_srcdir
)/Makefile.comm \
570 -f
$$srcdir/Makefile.sub \
571 -f
$(top_srcdir
)/Makefile.dev
$(do
)
573 $(INCDIRS
) $(OTHERDIRS
): FORCE
575 if
test $(srcdir) = .
; \
577 else srcdir=`cd $(srcdir); pwd`/$@
; \
579 test -d
$@ ||
$(mkinstalldirs
) $@
; \
581 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
582 -f
$(top_srcdir
)/Makefile.comm \
583 -f
$$srcdir/Makefile.sub \
584 -f
$(top_srcdir
)/Makefile.man
$(do
)
589 rm -f groff-
$(version
)$(revision
).
tar.gz
591 for d in
$(DISTDIRS
); do \
592 $(mkinstalldirs
) tmp
/$$d; \
594 srcdir=`cd $(srcdir); pwd`; \
596 $(LN_S
) ..
/Makefile .
; \
597 $(LN_S
) $$srcdir/* .
2>/dev
/null || true
; \
599 for d in
$(DISTDIRS
); do \
601 $(LN_S
) $$srcdir/$$d/* .
2>/dev
/null
; \
602 rm -rf CVS || true
); \
604 $(MAKE
) srcdir=. VPATH
=. distfiles
; \
605 $(MAKE
) srcdir=. VPATH
=. extraclean
; \
606 for d in
$(EXTRADIRS
); do \
607 (cd
$$d; $(MAKE
) extraclean
); \
610 $(LN_S
) $$srcdir/Makefile.init Makefile
611 mv tmp groff-
$(version
)$(revision
)
612 tar cfh
- groff-
$(version
)$(revision
) | \
613 gzip
-c
>groff-
$(version
)$(revision
).
tar.gz
614 rm -fr groff-
$(version
)$(revision
)
616 # $(PROGDIRS): libgroff
617 # grops grotty grodvi: libdriver
618 # refer lookbib indxbib lkbib: libbib
619 # $(LIBDIRS) $(PROGDIRS): include
621 .PHONY
: $(ALLDIRS
) dot
$(TARGETS
) FORCE
623 # Create a Makefile in $(subdir). This is useful for development since it
624 # avoids running make recursively.
625 subdir_Makefile
: Makefile.cfg
626 $(MAKE
) do
=Makefile
$(subdir
)
628 Makefile.cfg
: Makefile
630 for var in
$(MDEFINES
); do \
631 echo
"$$var" >>Makefile.cfg
; \
634 Makefile
: Makefile.in
635 $(SHELL
) config.status
638 uninstall: uninstall_sub uninstall_dirs
640 .PHONY
: uninstall_dirs
642 # Use `rmdir' here so that the directories are only removed if they are empty.
643 -rmdir
$(man1dir) $(man5dir) $(man7dir) $(manroot
) \
644 $(tmacdir
) $(systemtmacdir
) $(localtmacdir
) \
645 $(fontdir
) $(localfontdir
) $(bindir) \
646 $(datasubdir
) $(dataprogramdir
) $(datadir) $(infodir) \
647 $(exampledir
) $(htmldocdir
) $(docdir
) \
648 $(libprogramdir
) $(libdir)