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