1 # Copyright (C) 1989-2000, 2001, 2002 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
=@top_builddir@
25 version
=`cat $(top_srcdir)/VERSION`
26 # No additional number if revision is zero
27 revision
=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
29 # Define `page' to be letter if your PostScript printer uses 8.5x11
30 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
34 # Normally the Postscript driver, grops, produces output that conforms
35 # to version 3.0 of the Adobe Document Structuring Conventions.
36 # Unfortunately some spoolers and previewers can't handle such output.
37 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
38 # make its output acceptable to such programs. This variable controls
39 # only the default behaviour of grops; the behaviour can be changed at
40 # runtime by the grops -b option (and so by groff -P-b).
41 # Use a value of 0 if your spoolers and previewers are able to handle
42 # conforming PostScript correctly.
43 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
44 # this is needed for early versions of TranScript that get confused by
45 # anything between the %%EndProlog line and the first %%Page: comment.
46 # Add 2 if lines in included files beginning with %! should be
47 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
48 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
49 # stripped out of included files; this is needed for spoolers that
50 # don't understand the %%{Begin,End}Document comments. I suspect this
51 # includes early versions of TranScript.
52 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
53 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
54 # with a printer that requires page reversal.
55 BROKEN_SPOOLER_FLAGS
=@BROKEN_SPOOLER_FLAGS@
57 # DEVICE is the default device.
60 # TTYDEVDIRS is either `font/devascii font/devlatin1' (for
61 # ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8.
62 TTYDEVDIRS
=@TTYDEVDIRS@ font
/devutf8
64 # OTHERDEVDIRS is either `font/devlj4 font/devlbp' (for ASCII) or
66 OTHERDEVDIRS
=@OTHERDEVDIRS@
68 # PSPRINT is the command to use for printing a PostScript file,
72 # DVIPRINT is the command to use for printing a TeX dvi file,
73 # for example `lpr -d'.
76 # Prefix for names of programs that have Unix counterparts.
77 # For example, if `g' is `g' then troff will be installed as
78 # gtroff. This doesn't affect programs like grops or groff that have
79 # no Unix counterparts. Note that the groff versions of eqn and tbl
80 # will not work with Unix troff.
83 # Common prefix for installation directories.
84 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
85 # This must already exist when you do make install.
87 exec_prefix=@
exec_prefix@
89 # bindir says where to install executables.
92 # libdir says where to install platform-dependent data
94 libprogramdir
=$(libdir)/groff
96 # datasubdir says where to install platform-independent data files
98 dataprogramdir
=$(datadir)/groff
99 datasubdir
=$(dataprogramdir
)/$(version
)$(revision
)
101 # infodir says where to install info files
104 # docdir says where to install documentation files
105 docdir
=$(datadir)/doc
/groff
/$(version
)$(revision
)
107 # exampledir says where to install example files
108 exampledir
=$(docdir
)/examples
110 # htmldocdir says where to install documentation in HTML format
111 htmldocdir
=$(docdir
)/html
113 # fontdir says where to install dev*/*.
114 fontdir
=$(datasubdir
)/font
116 # fontpath says where to look for dev*/*.
117 fontpath
=$(fontdir
):/usr
/lib
/font
119 # tmacdir says where to install macros.
120 tmacdir
=$(datasubdir
)/tmac
122 # systemtmacdir says where to install platform-dependent macros
123 systemtmacdir
=$(libprogramdir
)/site-tmac
125 # localtmacdir says where local files will be installed
126 localtmacdir
=$(dataprogramdir
)/site-tmac
128 # tmacpath says where to look for macro files.
129 # The current directory will be prepended in unsafe mode only; the home
130 # directory will be always added.
131 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
132 # current nor in the home directory.
133 tmacpath
=$(systemtmacdir
):$(localtmacdir
):$(tmacdir
)
135 # sys_tmac_prefix is prefix (if any) for system macro packages
136 sys_tmac_prefix
=@sys_tmac_prefix@
138 # tmac_wrap is list of system macro packages that should be made
139 # available to groff by creating a corresponding macro package
140 # in the groff macro directory that references the system macro
142 tmac_wrap
=@tmac_wrap@
144 # If there is a groff version of a macro package listed in $(tmac_wrap),
145 # then the groff version will be installed with a prefix of this.
146 # Don't make this empty.
149 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
151 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
152 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
154 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
155 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
157 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
159 # Extension to be used for refer index files. Index files are not
160 # sharable between different architectures, so you might want to use
161 # different suffixes for different architectures. Choose an extension
162 # that doesn't conflict with refer or any other indexing program.
165 # Directory containing the default index for refer.
166 indexdir
=/usr
/dict
/papers
168 # The filename (without suffix) of the default index for refer.
171 # common_words_file is a file containing a list of common words.
172 # If your system provides /usr/lib/eign it will be copied onto this,
173 # otherwise the supplied eign file will be used.
174 common_words_file
=$(datasubdir
)/eign
176 # manroot is the root of the man page directory tree.
180 # man1ext is the man section for user commands.
182 man1dir=$(manroot
)/man
$(man1ext)
184 # man5ext is the man section for file formats.
186 man5dir=$(manroot
)/man
$(man5ext)
188 # man7ext is the man section for macros.
190 man7dir=$(manroot
)/man
$(man7ext)
192 # DEFINES should include the following:
193 # -DHAVE_MMAP if you have mmap() and <sys/mman.h>
194 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
195 # -DSYS_SIGLIST_DECLARED if you have sys_siglist[]
196 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
197 # wait() indicates whether a core image was
198 # produced for a process that was terminated
201 # -DHAVE_DIRENT_H if you have <dirent.h>
202 # -DHAVE_LIMITS_H if you have <limits.h>
203 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
204 # -DHAVE_MATH_H if you have <math.h>
205 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
206 # -DHAVE_STDINT_H if you have <stdint.h>
207 # -DHAVE_STDLIB_H if you have <stdlib.h>
208 # -DHAVE_STRING_H if you have <string.h>
209 # -DHAVE_STRINGS_H if you have <strings.h>
210 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
211 # -DHAVE_SYS_TIME_H if you have <sys/time.h>
212 # -DHAVE_UNISTD_H if you have <unistd.h>
214 # -DHAVE_FMOD if you have fmod()
215 # -DHAVE_GETCWD if you have getcwd()
216 # -DHAVE_GETTIMEOFDAY if you have gettimeofday()
217 # -DHAVE_MKSTEMP if you have mkstemp()
218 # -DHAVE_MMAP if you have mmap()
219 # -DHAVE_PUTENV if you have putenv()
220 # -DHAVE_RENAME if you have rename()
221 # -DHAVE_SNPRINTF if you have snprintf()
222 # -DHAVE_STRCASECMP if you have strcasecmp()
223 # -DHAVE_STRNCASECMP if you have strncasecmp()
224 # -DHAVE_STRERROR if you have strerror()
225 # -DHAVE_STRSEP if you have strsep()
226 # -DHAVE_STRTOL if you have strtol()
228 # -DNEED_DECLARATION_GETTIMEOFTODAY
229 # if your C++ <sys/time.h> doesn't declare
231 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
232 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
233 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
234 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare putenv()
235 # -DNEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare
237 # -DNEED_DECLARATION_STRNCASECMP
238 # if your C++ <string.h> doesn't declare
241 # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int
242 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
243 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
245 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
246 # (Reiser) preprocessor
247 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
248 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
249 # -DRETSIGTYPE=int if signal handlers return int not void
250 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
251 # -DPAGEA4 if the the printer's page size is A4
256 # fmod.o, getcwd.o, mkstemp.o, putenv.o, snprintf.o, strerror.o, strtol.o
258 # in LIBOBJS if your C library is missing the corresponding function.
261 # CCC is the compiler for C++ (.cc) files.
264 # CCDEFINES are definitions for C++ compilations.
266 # CDEFINES are definitions for C compilations.
280 INSTALL_PROGRAM
=@INSTALL_PROGRAM@
281 INSTALL_SCRIPT
=@INSTALL_SCRIPT@
282 INSTALL_DATA
=@INSTALL_DATA@
283 INSTALL_INFO
=@INSTALL_INFO@
288 # Flag that tells etags to assume C++.
292 # Sed command with which to edit sh scripts.
293 SH_SCRIPT_SED_CMD
=@SH_SCRIPT_SED_CMD@
295 # the program to create directory hierarchies
296 mkinstalldirs
=$(top_srcdir
)/mkinstalldirs
300 #PURIFYCCFLAGS=-g++=yes \
301 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
303 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
304 # copy of $(MDEFINES) when making individual directories; this could
305 # cause the argument list to become too long on some systems.
307 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
309 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
311 "TTYDEVDIRS=$(TTYDEVDIRS)" \
312 "OTHERDEVDIRS=$(OTHERDEVDIRS)" \
313 "PSPRINT=$(PSPRINT)" \
314 "DVIPRINT=$(DVIPRINT)" \
315 "top_srcdir=$(top_srcdir)" \
316 "top_builddir=$(top_builddir)" \
318 "exec_prefix=$(exec_prefix)" \
320 "datadir=$(datadir)" \
321 "dataprogramdir=$(dataprogramdir)" \
322 "datasubdir=$(datasubdir)" \
323 "infodir=$(infodir)" \
325 "exampledir=$(exampledir)" \
326 "htmldocdir=$(htmldocdir)" \
328 "libprogramdir=$(libprogramdir)" \
330 "fontdir=$(fontdir)" \
331 "fontpath=$(fontpath)" \
332 "tmacdir=$(tmacdir)" \
333 "systemtmacdir=$(systemtmacdir)" \
334 "localtmacdir=$(localtmacdir)" \
335 "tmacpath=$(tmacpath)" \
336 "indexext=$(indexext)" \
337 "indexdir=$(indexdir)" \
338 "indexname=$(indexname)" \
339 "common_words_file=$(common_words_file)" \
340 "manroot=$(manroot)" \
341 "man1ext=$(man1ext)" \
342 "man1dir=$(man1dir)" \
343 "man5ext=$(man5ext)" \
344 "man5dir=$(man5dir)" \
345 "man7ext=$(man7ext)" \
346 "man7dir=$(man7dir)" \
347 "mkinstalldirs=$(mkinstalldirs)" \
348 "tmac_wrap=$(tmac_wrap)" \
349 "sys_tmac_prefix=$(sys_tmac_prefix)" \
350 "tmac_an_prefix=$(tmac_an_prefix)" \
351 "tmac_s_prefix=$(tmac_s_prefix)" \
352 "tmac_m_prefix=$(tmac_m_prefix)" \
355 "CCDEFINES=$(CCDEFINES)" \
356 "CDEFINES=$(CDEFINES)" \
357 "CCFLAGS=$(CCFLAGS)" \
359 "LDFLAGS=$(LDFLAGS)" \
361 "YACCFLAGS=$(YACCFLAGS)" \
364 "LIBOBJS=$(LIBOBJS)" \
367 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
368 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
369 "INSTALL_DATA=$(INSTALL_DATA)" \
370 "INSTALL_INFO=$(INSTALL_INFO)" \
372 "ETAGSFLAGS=$(ETAGSFLAGS)" \
373 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
374 "PERLPATH=$(PERLPATH)" \
375 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
377 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
399 src
/devices
/grohtml \
407 CPROGDIRS
=src
/utils
/pfbtops
408 PROGDIRS
=$(CCPROGDIRS
) $(CPROGDIRS
)
433 ALLDIRS
=$(INCDIRS
) $(LIBDIRS
) $(PROGDIRS
) \
434 $(DEVDIRS
) $(OTHERDEVDIRS
) $(TTYDEVDIRS
) $(OTHERDIRS
)
436 font
/devps
/generate \
437 font
/devdvi
/generate \
440 DISTDIRS
=$(INCDIRS
) $(LIBDIRS
) $(PROGDIRS
) \
441 $(DEVDIRS
) $(OTHERDEVDIRS
) $(ALLTTYDEVDIRS
) $(OTHERDIRS
) $(EXTRADIRS
)
442 TARGETS
=all install install_bin
install_data clean distclean mostlyclean \
443 realclean extraclean distfiles TAGS depend uninstall_sub
445 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
446 # where Make needs to be case-sensitive to find files like BI and VERSION.
448 if
test -f
$(srcdir)/makefile.ccpg
* && \
449 test -f
$(srcdir)/Makefile.ccpg
*; \
450 then FNCASE
=y
; export FNCASE
; \
455 dodirs
=$(ALLDIRS
) dot
456 # Default target for subdir_Makefile
457 subdir
=src
/roff
/troff
461 @
$(ENVSETUP
); $(MAKE
) $(MDEFINES
) do
=$@
$(dodirs
)
465 $(MAKE
) $(MDEFINES
) srcdir=$(srcdir) VPATH
=$(srcdir) \
466 -f
$(top_srcdir
)/Makefile.comm \
467 -f
$(top_srcdir
)/Makefile.sub
$(do
)
471 if
test $(srcdir) = .
; \
473 else srcdir=`cd $(srcdir); pwd`/$@
; \
475 test -d
$@ ||
$(mkinstalldirs
) $@
; \
477 test -f Makefile.dep || touch Makefile.dep
; \
478 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
479 -f
$(top_srcdir
)/Makefile.comm \
480 -f
$$srcdir/Makefile.sub \
481 -f
$(top_srcdir
)/Makefile.lib \
482 -f Makefile.dep
$(do
)
486 if
test $(srcdir) = .
; \
488 else srcdir=`cd $(srcdir); pwd`/$@
; \
490 test -d
$@ ||
$(mkinstalldirs
) $@
; \
492 test -f Makefile.dep || touch Makefile.dep
; \
493 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
494 -f
$(top_srcdir
)/Makefile.comm \
495 -f
$$srcdir/Makefile.sub \
496 -f
$(top_srcdir
)/Makefile.cpg \
497 -f Makefile.dep
$(do
)
501 if
test $(srcdir) = .
; \
503 else srcdir=`cd $(srcdir); pwd`/$@
; \
505 test -d
$@ ||
$(mkinstalldirs
) $@
; \
507 test -f Makefile.dep || touch Makefile.dep
; \
508 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
509 -f
$(top_srcdir
)/Makefile.comm \
510 -f
$$srcdir/Makefile.sub \
511 -f
$(top_srcdir
)/Makefile.ccpg \
512 -f Makefile.dep
$(do
)
514 $(DEVDIRS
) $(OTHERDEVDIRS
) $(TTYDEVDIRS
): FORCE
516 if
test $(srcdir) = .
; \
518 else srcdir=`cd $(srcdir); pwd`/$@
; \
520 test -d
$@ ||
$(mkinstalldirs
) $@
; \
522 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
523 -f
$(top_srcdir
)/Makefile.comm \
524 -f
$$srcdir/Makefile.sub \
525 -f
$(top_srcdir
)/Makefile.dev
$(do
)
527 $(INCDIRS
) $(OTHERDIRS
): FORCE
529 if
test $(srcdir) = .
; \
531 else srcdir=`cd $(srcdir); pwd`/$@
; \
533 test -d
$@ ||
$(mkinstalldirs
) $@
; \
535 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
536 -f
$(top_srcdir
)/Makefile.comm \
537 -f
$$srcdir/Makefile.sub \
538 -f
$(top_srcdir
)/Makefile.man
$(do
)
543 rm -f groff-
$(version
)$(revision
).
tar.gz
545 for d in
$(DISTDIRS
); do \
546 $(mkinstalldirs
) tmp
/$$d; \
548 srcdir=`cd $(srcdir); pwd`; \
550 $(LN_S
) ..
/Makefile .
; \
551 $(LN_S
) $$srcdir/* .
2>/dev
/null || true
; \
553 for d in
$(DISTDIRS
); do \
555 $(LN_S
) $$srcdir/$$d/* .
2>/dev
/null
; \
556 rm -rf CVS || true
); \
558 $(MAKE
) srcdir=. VPATH
=. distfiles
; \
559 $(MAKE
) srcdir=. VPATH
=. extraclean
; \
560 for d in
$(EXTRADIRS
); do \
561 (cd
$$d; $(MAKE
) extraclean
); \
564 $(LN_S
) $$srcdir/Makefile.init Makefile
565 mv tmp groff-
$(version
)$(revision
)
566 tar cfh
- groff-
$(version
)$(revision
) | \
567 gzip
-c
>groff-
$(version
)$(revision
).
tar.gz
568 rm -fr groff-
$(version
)$(revision
)
570 # $(PROGDIRS): libgroff
571 # grops grotty grodvi: libdriver
572 # refer lookbib indxbib lkbib: libbib
573 # $(LIBDIRS) $(PROGDIRS): include
575 .PHONY
: $(ALLDIRS
) dot
$(TARGETS
) FORCE
577 # Create a Makefile in $(subdir). This is useful for development since it
578 # avoids running make recursively.
579 subdir_Makefile
: Makefile.cfg
580 $(MAKE
) do
=Makefile
$(subdir
)
582 Makefile.cfg
: Makefile
584 for var in
$(MDEFINES
); do \
585 echo
"$$var" >>Makefile.cfg
; \
588 Makefile
: Makefile.in
589 $(SHELL
) config.status
592 uninstall: uninstall_sub uninstall_dirs
594 .PHONY
: uninstall_dirs
596 # Use rmdir here so that the directories are only removed if they're empty
597 -rmdir
$(man1dir) $(man5dir) $(man7dir) $(manroot
) \
598 $(tmacdir
) $(systemtmacdir
) $(localtmacdir
) $(fontdir
) $(bindir) \
599 $(datasubdir
) $(dataprogramdir
) $(datadir) $(infodir) \
600 $(docdir
) $(exampledir
) $(htmldocdir
) \
601 $(libprogramdir
) $(libdir)