1 # Copyright (C) 1989-2000 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 font/devutf8' (for
61 # ASCII) or `font/devcp1047' (for EBCDIC).
62 TTYDEVDIRS
=@TTYDEVDIRS@
64 # PSPRINT is the command to use for printing a PostScript file,
68 # DVIPRINT is the command to use for printing a TeX dvi file,
69 # for example `lpr -d'.
72 # Prefix for names of programs that have Unix counterparts.
73 # For example, if `g' is `g' then troff will be installed as
74 # gtroff. This doesn't affect programs like grops or groff that have
75 # no Unix counterparts. Note that the groff versions of eqn and tbl
76 # will not work with Unix troff.
79 # Common prefix for installation directories.
80 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
81 # This must already exist when you do make install.
83 exec_prefix=@
exec_prefix@
85 # bindir says where to install executables.
88 # libdir says where to install platform-dependent data
90 libprogramdir
=$(libdir)/groff
92 # datasubdir says where to install platform-independent data files
94 dataprogramdir
=$(datadir)/groff
95 datasubdir
=$(dataprogramdir
)/$(version
)$(revision
)
97 # fontdir says where to install dev*/*.
98 fontdir
=$(datasubdir
)/font
100 # fontpath says where to look for dev*/*.
101 # $HOME will be always prepended.
102 fontpath
=$(fontdir
):/usr
/lib
/font
104 # tmacdir says where to install macros.
105 tmacdir
=$(datasubdir
)/tmac
107 # systemtmacdir says where to install platform-dependent macros
108 systemtmacdir
=$(libprogramdir
)/site-tmac
110 # localtmacdir says where local files will be installed
111 localtmacdir
=$(dataprogramdir
)/site-tmac
113 # tmacpath says where to look for macro files.
114 # The current directory will always be prepended except for searching and
115 # scanning troffrc and troffrc-end which prepend the home directory instead.
116 tmacpath
=$(systemtmacdir
):$(localtmacdir
):$(tmacdir
)
118 # sys_tmac_prefix is prefix (if any) for system macro packages
119 sys_tmac_prefix
=@sys_tmac_prefix@
121 # tmac_wrap is list of system macro packages that should be made
122 # available to groff by creating a corresponding macro package
123 # in the groff macro directory that references the system macro
125 tmac_wrap
=@tmac_wrap@
127 # If there is a groff version of a macro package listed in $(tmac_wrap),
128 # then the groff version will be installed with a prefix of this.
129 # Don't make this empty.
132 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
134 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
135 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
137 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
138 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
140 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
142 # Extension to be used for refer index files. Index files are not
143 # sharable between different architectures, so you might want to use
144 # different suffixes for different architectures. Choose an extension
145 # that doesn't conflict with refer or any other indexing program.
148 # Directory containing the default index for refer.
149 indexdir
=/usr
/dict
/papers
151 # The filename (without suffix) of the default index for refer.
154 # common_words_file is a file containing a list of common words.
155 # If your system provides /usr/lib/eign it will be copied onto this,
156 # otherwise the supplied eign file will be used.
157 common_words_file
=$(datasubdir
)/eign
159 # manroot is the root of the man page directory tree.
162 # man1ext is the man section for user commands.
164 man1dir=$(manroot
)/man
$(man1ext)
166 # man5ext is the man section for file formats.
168 man5dir=$(manroot
)/man
$(man5ext)
170 # man7ext is the man section for macros.
172 man7dir=$(manroot
)/man
$(man7ext)
174 # DEFINES should include the following:
175 # -DHAVE_MMAP if you have mmap() and <sys/mman.h>
176 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
177 # -DHAVE_SYS_SIGLIST if you have sys_siglist[]
178 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
179 # wait() indicates whether a core image was
180 # produced for a process that was terminated
182 # -DHAVE_UNISTD_H if you have <unistd.h>
183 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
184 # -DHAVE_DIRENT_H if you have <dirent.h>
185 # -DHAVE_LIMITS_H if you have <limits.h>
186 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
187 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
188 # -DHAVE_STDLIB_H if you have <stdlib.h>
189 # -DHAVE_STRINGS_H if you have <strings.h>
190 # -DHAVE_RENAME if you have rename()
191 # -DHAVE_MKSTEMP if you have mkstemp()
192 # -DHAVE_STRDUP if you have strdup()
193 # -DHAVE_STRSEP if you have strsep()
194 # -DHAVE_STRCASECMP if you have strcasecmp()
195 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
196 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare putenv()
197 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
198 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
199 # -DNEED_DECLARATION_STRNCASECMP
200 # if your C++ <string.h> doesn't declare
202 # -DRET_TYPE_SRAND_IS_VOID if your srand() returns void or int
203 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
204 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
206 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
207 # (Reiser) preprocessor
208 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
209 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
210 # -DRETSIGTYPE=int if signal handlers return int not void
211 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
214 # Include fmod.o, strtol.o, getcwd.o, strerror.o, putenv.o in LIBOBJS if
215 # your C library is missing the corresponding function.
218 # CCC is the compiler for C++ (.cc) files.
221 # CCDEFINES are definitions for C++ compilations.
223 # CDEFINES are definitions for C compilations.
236 INSTALL_PROGRAM
=@INSTALL_PROGRAM@
237 INSTALL_SCRIPT
=@INSTALL_SCRIPT@
238 INSTALL_DATA
=@INSTALL_DATA@
243 # Flag that tells etags to assume C++.
247 # Sed command with which to edit sh scripts.
248 SH_SCRIPT_SED_CMD
=@SH_SCRIPT_SED_CMD@
250 # the program to create directory hierarchies
251 mkinstalldirs
=$(top_srcdir
)/mkinstalldirs
255 #PURIFYCCFLAGS=-g++=yes \
256 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
258 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
259 # copy of $(MDEFINES) when making individual directories; this could
260 # cause the argument list to become too long on some systems.
262 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
264 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
266 "TTYDEVDIRS=$(TTYDEVDIRS)" \
267 "PSPRINT=$(PSPRINT)" \
268 "DVIPRINT=$(DVIPRINT)" \
269 "top_srcdir=$(top_srcdir)" \
270 "top_builddir=$(top_builddir)" \
272 "exec_prefix=$(exec_prefix)" \
274 "datadir=$(datadir)" \
275 "dataprogramdir=$(dataprogramdir)" \
276 "datasubdir=$(datasubdir)" \
278 "libprogramdir=$(libprogramdir)" \
280 "fontdir=$(fontdir)" \
281 "fontpath=$(fontpath)" \
282 "tmacdir=$(tmacdir)" \
283 "systemtmacdir=$(systemtmacdir)" \
284 "localtmacdir=$(localtmacdir)" \
285 "tmacpath=$(tmacpath)" \
286 "indexext=$(indexext)" \
287 "indexdir=$(indexdir)" \
288 "indexname=$(indexname)" \
289 "common_words_file=$(common_words_file)" \
290 "manroot=$(manroot)" \
291 "man1ext=$(man1ext)" \
292 "man1dir=$(man1dir)" \
293 "man5ext=$(man5ext)" \
294 "man5dir=$(man5dir)" \
295 "man7ext=$(man7ext)" \
296 "man7dir=$(man7dir)" \
297 "mkinstalldirs=$(mkinstalldirs)" \
298 "tmac_wrap=$(tmac_wrap)" \
299 "sys_tmac_prefix=$(sys_tmac_prefix)" \
300 "tmac_an_prefix=$(tmac_an_prefix)" \
301 "tmac_s_prefix=$(tmac_s_prefix)" \
302 "tmac_m_prefix=$(tmac_m_prefix)" \
305 "CCDEFINES=$(CCDEFINES)" \
306 "CDEFINES=$(CDEFINES)" \
307 "CCFLAGS=$(CCFLAGS)" \
309 "LDFLAGS=$(LDFLAGS)" \
311 "YACCFLAGS=$(YACCFLAGS)" \
314 "LIBOBJS=$(LIBOBJS)" \
317 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
318 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
319 "INSTALL_DATA=$(INSTALL_DATA)" \
321 "ETAGSFLAGS=$(ETAGSFLAGS)" \
322 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
323 "PERLPATH=$(PERLPATH)" \
324 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
326 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
348 src
/devices
/grohtml \
349 src
/devices
/grohtml2 \
357 CPROGDIRS
=src
/utils
/pfbtops
358 PROGDIRS
=$(CCPROGDIRS
) $(CPROGDIRS
)
382 ALLDIRS
=$(INCDIRS
) $(LIBDIRS
) $(PROGDIRS
) \
383 $(DEVDIRS
) $(TTYDEVDIRS
) $(OTHERDIRS
)
385 font
/devps
/generate \
386 font
/devdvi
/generate \
389 DISTDIRS
=$(INCDIRS
) $(LIBDIRS
) $(PROGDIRS
) \
390 $(DEVDIRS
) $(ALLTTYDEVDIRS
) $(OTHERDIRS
) $(EXTRADIRS
)
391 TARGETS
=all install install_bin
install_data clean distclean mostlyclean \
392 realclean extraclean distfiles TAGS depend uninstall_sub
394 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
395 # where Make needs to be case-sensitive to find files like BI and VERSION.
397 if
test -f
$(srcdir)/makefile.ccpg
* && \
398 test -f
$(srcdir)/Makefile.ccpg
*; \
399 then FNCASE
=y
; export FNCASE
; \
404 dodirs
=$(ALLDIRS
) dot
405 # Default target for subdir_Makefile
406 subdir
=src
/roff
/troff
410 @
$(ENVSETUP
); $(MAKE
) $(MDEFINES
) do
=$@
$(dodirs
)
414 $(MAKE
) $(MDEFINES
) srcdir=$(srcdir) VPATH
=$(srcdir) \
415 -f
$(top_srcdir
)/Makefile.comm \
416 -f
$(top_srcdir
)/Makefile.sub
$(do
)
420 if
test $(srcdir) = .
; \
422 else srcdir=`cd $(srcdir); pwd`/$@
; \
424 test -d
$@ ||
$(mkinstalldirs
) $@
; \
426 test -f Makefile.dep || touch Makefile.dep
; \
427 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
428 -f
$(top_srcdir
)/Makefile.comm \
429 -f
$$srcdir/Makefile.sub \
430 -f
$(top_srcdir
)/Makefile.lib \
431 -f Makefile.dep
$(do
)
435 if
test $(srcdir) = .
; \
437 else srcdir=`cd $(srcdir); pwd`/$@
; \
439 test -d
$@ ||
$(mkinstalldirs
) $@
; \
441 test -f Makefile.dep || touch Makefile.dep
; \
442 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
443 -f
$(top_srcdir
)/Makefile.comm \
444 -f
$$srcdir/Makefile.sub \
445 -f
$(top_srcdir
)/Makefile.cpg \
446 -f Makefile.dep
$(do
)
450 if
test $(srcdir) = .
; \
452 else srcdir=`cd $(srcdir); pwd`/$@
; \
454 test -d
$@ ||
$(mkinstalldirs
) $@
; \
456 test -f Makefile.dep || touch Makefile.dep
; \
457 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
458 -f
$(top_srcdir
)/Makefile.comm \
459 -f
$$srcdir/Makefile.sub \
460 -f
$(top_srcdir
)/Makefile.ccpg \
461 -f Makefile.dep
$(do
)
463 $(DEVDIRS
) $(TTYDEVDIRS
): FORCE
465 if
test $(srcdir) = .
; \
467 else srcdir=`cd $(srcdir); pwd`/$@
; \
469 test -d
$@ ||
$(mkinstalldirs
) $@
; \
471 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
472 -f
$(top_srcdir
)/Makefile.comm \
473 -f
$$srcdir/Makefile.sub \
474 -f
$(top_srcdir
)/Makefile.dev
$(do
)
476 $(INCDIRS
) $(OTHERDIRS
): FORCE
478 if
test $(srcdir) = .
; \
480 else srcdir=`cd $(srcdir); pwd`/$@
; \
482 test -d
$@ ||
$(mkinstalldirs
) $@
; \
484 $(MAKE
) $(MDEFINES
) srcdir=$$srcdir VPATH
=$$srcdir \
485 -f
$(top_srcdir
)/Makefile.comm \
486 -f
$$srcdir/Makefile.sub \
487 -f
$(top_srcdir
)/Makefile.man
$(do
)
492 rm -f groff-
$(version
)$(revision
).
tar.gz
493 rm -f src
/xditview
/Imakefile
;
495 for d in
$(DISTDIRS
); do \
496 $(mkinstalldirs
) tmp
/$$d; \
498 srcdir=`cd $(srcdir); pwd`; \
500 $(LN_S
) ..
/Makefile .
; \
501 $(LN_S
) $$srcdir/* .
2>/dev
/null || true
; \
502 for d in
$(DISTDIRS
); do \
503 (cd
$$d; $(LN_S
) $$srcdir/$$d/* .
2>/dev
/null || true
); \
505 $(MAKE
) srcdir=$$srcdir VPATH
=$$srcdir extraclean
; \
506 for d in
$(EXTRADIRS
); do \
507 (cd
$$d; $(MAKE
) extraclean
); \
510 $(LN_S
) $$srcdir/Makefile.init Makefile
511 mv tmp groff-
$(version
)$(revision
)
512 tar cfh
- groff-
$(version
)$(revision
) | \
513 gzip
-c
>groff-
$(version
)$(revision
).
tar.gz
514 rm -fr groff-
$(version
)$(revision
)
516 # $(PROGDIRS): libgroff
517 # grops grotty grodvi: libdriver
518 # refer lookbib indxbib lkbib: libbib
519 # $(LIBDIRS) $(PROGDIRS): include
521 .PHONY
: $(ALLDIRS
) dot
$(TARGETS
) FORCE
523 subdir_Makefile
: Makefile.cfg
524 $(MAKE
) do
=Makefile
$(subdir
)
526 Makefile.cfg
: Makefile
528 for var in
$(MDEFINES
); do \
529 echo
"$$var" >>Makefile.cfg
; \
532 Makefile
: Makefile.in
533 $(SHELL
) config.status
536 uninstall: uninstall_sub uninstall_dirs
538 .PHONY
: uninstall_dirs
540 # Use rmdir here so that the directories are only removed if they're empty
541 -rmdir
$(man1dir) $(man5dir) $(man7dir) $(manroot
) \
542 $(tmacdir
) $(systemtmacdir
) $(localtmacdir
) $(fontdir
) $(bindir) \
543 $(datasubdir
) $(dataprogramdir
) $(datadir) \
544 $(libprogramdir
) $(libdir)