* src/include/nonposix.h (mkdir, WAIT, creat) [_MSC_VER]: Define.
[s-roff.git] / Makefile.in
blobe19a65d01c986d11563bcd6054c7e0d8820f9345
1 # Copyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc.
2 # Written by James Clark (jjc@jclark.com)
3 #
4 # This file is part of groff.
5 #
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
9 # version.
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
14 # for more details.
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.
20 srcdir=@srcdir@
21 top_srcdir=@top_srcdir@
22 VPATH=@srcdir@
23 top_builddir=@groff_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
31 # world).
32 PAGE=@PAGE@
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.
58 DEVICE=ps
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
65 # empty (for EBCDIC).
66 OTHERDEVDIRS=@OTHERDEVDIRS@
68 # PSPRINT is the command to use for printing a PostScript file,
69 # for example `lpr'.
70 PSPRINT=@PSPRINT@
72 # DVIPRINT is the command to use for printing a TeX dvi file,
73 # for example `lpr -d'.
74 DVIPRINT=@DVIPRINT@
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.
81 g=@g@
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.
86 prefix=@prefix@
87 exec_prefix=@exec_prefix@
89 # bindir says where to install executables.
90 bindir=@bindir@
92 # libdir says where to install platform-dependent data
93 libdir=@libdir@
94 libprogramdir=$(libdir)/groff
96 # datasubdir says where to install platform-independent data files
97 datadir=@datadir@
98 dataprogramdir=$(datadir)/groff
99 datasubdir=$(dataprogramdir)/$(version)$(revision)
101 # infodir says where to install info files
102 infodir=@infodir@
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
141 # package.
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.
147 tmac_prefix=g
149 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
150 tmac_m_prefix=\
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.
153 tmac_s_prefix=\
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.
156 tmac_an_prefix=\
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.
163 indexext=.i
165 # Directory containing the default index for refer.
166 indexdir=/usr/dict/papers
168 # The filename (without suffix) of the default index for refer.
169 indexname=Ind
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.
177 mandir=@mandir@
178 manroot=$(mandir)
180 # man1ext is the man section for user commands.
181 man1ext=1
182 man1dir=$(manroot)/man$(man1ext)
184 # man5ext is the man section for file formats.
185 man5ext=5
186 man5dir=$(manroot)/man$(man5ext)
188 # man7ext is the man section for macros.
189 man7ext=7
190 man7dir=$(manroot)/man$(man7ext)
192 # the configure script checks whether all necessary utility programs for
193 # grohtml are available -- only then we can build the HTML documentation
194 make_html=@make_html@
195 make_install_html=@make_install_html@
197 # DEFINES should include the following:
198 # -DHAVE_MMAP if you have mmap() and <sys/mman.h>
199 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
200 # -DSYS_SIGLIST_DECLARED if you have sys_siglist[]
201 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
202 # wait() indicates whether a core image was
203 # produced for a process that was terminated
204 # by a signal
206 # -DHAVE_DIRENT_H if you have <dirent.h>
207 # -DHAVE_LIMITS_H if you have <limits.h>
208 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
209 # -DHAVE_MATH_H if you have <math.h>
210 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
211 # -DHAVE_STDINT_H if you have <stdint.h>
212 # -DHAVE_STDLIB_H if you have <stdlib.h>
213 # -DHAVE_STRING_H if you have <string.h>
214 # -DHAVE_STRINGS_H if you have <strings.h>
215 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
216 # -DHAVE_SYS_TIME_H if you have <sys/time.h>
217 # -DHAVE_UNISTD_H if you have <unistd.h>
219 # -DHAVE_FMOD if you have fmod()
220 # -DHAVE_GETCWD if you have getcwd()
221 # -DHAVE_GETTIMEOFDAY if you have gettimeofday()
222 # -DHAVE_ISATTY if you have isatty()
223 # -DHAVE_MKSTEMP if you have mkstemp()
224 # -DHAVE_MMAP if you have mmap()
225 # -DHAVE_PUTENV if you have putenv()
226 # -DHAVE_RENAME if you have rename()
227 # -DHAVE_SNPRINTF if you have snprintf()
228 # -DHAVE_STRCASECMP if you have strcasecmp()
229 # -DHAVE_STRNCASECMP if you have strncasecmp()
230 # -DHAVE_STRERROR if you have strerror()
231 # -DHAVE_STRSEP if you have strsep()
232 # -DHAVE_STRTOL if you have strtol()
234 # -DNEED_DECLARATION_GETTIMEOFTODAY
235 # if your C++ <sys/time.h> doesn't declare
236 # gettimeofday()
237 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
238 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
239 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
240 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare putenv()
241 # -DNEED_DECLARATION_STRCASECMP if your C++ <string.h> doesn't declare
242 # strcasecmp()
243 # -DNEED_DECLARATION_STRNCASECMP
244 # if your C++ <string.h> doesn't declare
245 # strncasecmp()
247 # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int
248 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
249 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
250 # <stdio.h>
251 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
252 # (Reiser) preprocessor
253 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
254 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
255 # -DRETSIGTYPE=int if signal handlers return int not void
256 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
257 # -DPAGEA4 if the the printer's page size is A4
258 DEFINES=@DEFS@
260 # Include
262 # {fmod,getcwd,mkstemp,putenv,snprintf,strerror,strtol}.$(OBJEXT)
264 # in LIBOBJS if your C library is missing the corresponding function.
265 LIBOBJS=@LIBOBJS@
267 # CCC is the compiler for C++ (.cc) files.
268 CCC=@CXX@
269 CC=@CC@
270 # CCDEFINES are definitions for C++ compilations.
271 CCDEFINES=$(DEFINES)
272 # CDEFINES are definitions for C compilations.
273 CDEFINES=$(DEFINES)
275 CCFLAGS=@CXXFLAGS@
276 CFLAGS=@CFLAGS@
277 LDFLAGS=@LDFLAGS@
278 YACC=@YACC@
279 YACCFLAGS=-v
281 EXEEXT=@EXEEXT@
282 OBJEXT=@OBJEXT@
283 LIBS=@LIBS@
284 LIBM=@LIBM@
285 RANLIB=@RANLIB@
286 INSTALL=@INSTALL@
287 INSTALL_PROGRAM=@INSTALL_PROGRAM@
288 INSTALL_SCRIPT=@INSTALL_SCRIPT@
289 INSTALL_DATA=@INSTALL_DATA@
290 INSTALL_INFO=@INSTALL_INFO@
291 LN_S=@LN_S@
292 AR=ar
293 ETAGS=etags
294 ETAGSFLAGS=
295 # Flag that tells etags to assume C++.
296 ETAGSCCFLAG=-C
297 # Full path to perl.
298 PERLPATH=@PERLPATH@
299 # Sed command with which to edit sh scripts.
300 SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
302 # the program to create directory hierarchies
303 mkinstalldirs=$(top_srcdir)/mkinstalldirs
305 PURIFY=purify
306 PURIFYCCFLAGS=
307 #PURIFYCCFLAGS=-g++=yes \
308 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
310 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
311 # copy of $(MDEFINES) when making individual directories; this could
312 # cause the argument list to become too long on some systems.
313 MDEFINES= \
314 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
315 "PAGE=$(PAGE)" \
316 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
317 "DEVICE=$(DEVICE)" \
318 "TTYDEVDIRS=$(TTYDEVDIRS)" \
319 "OTHERDEVDIRS=$(OTHERDEVDIRS)" \
320 "PSPRINT=$(PSPRINT)" \
321 "DVIPRINT=$(DVIPRINT)" \
322 "version=$(version)" \
323 "revision=$(revision)" \
324 "top_srcdir=$(top_srcdir)" \
325 "top_builddir=$(top_builddir)" \
326 "prefix=$(prefix)" \
327 "exec_prefix=$(exec_prefix)" \
328 "g=$(g)" \
329 "datadir=$(datadir)" \
330 "dataprogramdir=$(dataprogramdir)" \
331 "datasubdir=$(datasubdir)" \
332 "infodir=$(infodir)" \
333 "docdir=$(docdir)" \
334 "exampledir=$(exampledir)" \
335 "htmldocdir=$(htmldocdir)" \
336 "libdir=$(libdir)" \
337 "libprogramdir=$(libprogramdir)" \
338 "bindir=$(bindir)" \
339 "fontdir=$(fontdir)" \
340 "fontpath=$(fontpath)" \
341 "tmacdir=$(tmacdir)" \
342 "systemtmacdir=$(systemtmacdir)" \
343 "localtmacdir=$(localtmacdir)" \
344 "tmacpath=$(tmacpath)" \
345 "indexext=$(indexext)" \
346 "indexdir=$(indexdir)" \
347 "indexname=$(indexname)" \
348 "common_words_file=$(common_words_file)" \
349 "manroot=$(manroot)" \
350 "man1ext=$(man1ext)" \
351 "man1dir=$(man1dir)" \
352 "man5ext=$(man5ext)" \
353 "man5dir=$(man5dir)" \
354 "man7ext=$(man7ext)" \
355 "man7dir=$(man7dir)" \
356 "make_html=$(make_html)" \
357 "make_install_html=$(make_install_html)" \
358 "mkinstalldirs=$(mkinstalldirs)" \
359 "tmac_wrap=$(tmac_wrap)" \
360 "sys_tmac_prefix=$(sys_tmac_prefix)" \
361 "tmac_an_prefix=$(tmac_an_prefix)" \
362 "tmac_s_prefix=$(tmac_s_prefix)" \
363 "tmac_m_prefix=$(tmac_m_prefix)" \
364 "EXEEXT=$(EXEEXT)" \
365 "OBJEXT=$(OBJEXT)" \
366 "CCC=$(CCC)" \
367 "CC=$(CC)" \
368 "CCDEFINES=$(CCDEFINES)" \
369 "CDEFINES=$(CDEFINES)" \
370 "CCFLAGS=$(CCFLAGS)" \
371 "CFLAGS=$(CFLAGS)" \
372 "LDFLAGS=$(LDFLAGS)" \
373 "YACC=$(YACC)" \
374 "YACCFLAGS=$(YACCFLAGS)" \
375 "LIBM=$(LIBM)" \
376 "LIBS=$(LIBS)" \
377 "LIBOBJS=$(LIBOBJS)" \
378 "RANLIB=$(RANLIB)" \
379 "AR=$(AR)" \
380 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
381 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
382 "INSTALL_DATA=$(INSTALL_DATA)" \
383 "INSTALL_INFO=$(INSTALL_INFO)" \
384 "ETAGS=$(ETAGS)" \
385 "ETAGSFLAGS=$(ETAGSFLAGS)" \
386 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
387 "PERLPATH=$(PERLPATH)" \
388 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
389 "PURIFY=$(PURIFY)" \
390 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
392 SHELL=/bin/sh
393 INCDIRS=src/include
394 LIBDIRS=\
395 src/libs/libgroff \
396 src/libs/libdriver \
397 src/libs/libbib
398 CCPROGDIRS=\
399 src/roff/groff \
400 src/roff/troff \
401 src/preproc/tbl \
402 src/preproc/pic \
403 src/preproc/eqn \
404 src/preproc/grn \
405 src/preproc/refer \
406 src/preproc/soelim \
407 src/preproc/html \
408 src/devices/grops \
409 src/devices/grotty \
410 src/devices/grodvi \
411 src/devices/grolj4 \
412 src/devices/grohtml \
413 src/devices/grolbp \
414 src/utils/tfmtodit \
415 src/utils/hpftodit \
416 src/utils/lookbib \
417 src/utils/indxbib \
418 src/utils/lkbib \
419 src/utils/addftinfo
420 CPROGDIRS=src/utils/pfbtops
421 PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
422 DEVDIRS=\
423 font/devps \
424 font/devdvi \
425 font/devX75 \
426 font/devX75-12 \
427 font/devX100 \
428 font/devX100-12 \
429 font/devhtml
430 ALLTTYDEVDIRS=\
431 font/devascii \
432 font/devlatin1 \
433 font/devutf8 \
434 font/devcp1047
435 OTHERDIRS=\
436 man \
437 tmac \
438 src/utils/afmtodit \
439 src/roff/grog \
440 src/roff/nroff \
441 contrib/mm \
442 contrib/pic2graph \
443 contrib/eqn2graph \
444 contrib/groffer \
445 contrib/mom \
447 ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
448 $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
449 EXTRADIRS=\
450 font/devps/generate \
451 font/devdvi/generate \
452 font/devlj4/generate \
453 src/xditview \
455 NOMAKEDIRS=\
456 arch/djgpp \
457 contrib/mm/examples \
458 contrib/mm/mm \
459 contrib/mom/examples \
460 contrib/mom/momdoc \
461 src/libs/snprintf
462 DISTDIRS=\
463 $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \
464 $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS)
465 TARGETS=all install install_bin install_data clean distclean mostlyclean \
466 realclean extraclean distfiles TAGS depend uninstall_sub
468 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
469 # where Make needs to be case-sensitive to find files like BI and VERSION.
470 ENVSETUP=\
471 if test -f $(srcdir)/makefile.ccpg* && \
472 test -f $(srcdir)/Makefile.ccpg*; \
473 then FNCASE=y; export FNCASE; \
474 else :; \
477 do=all
478 dodirs=$(ALLDIRS) dot
479 # Default target for subdir_Makefile
480 subdir=src/roff/troff
483 $(TARGETS):
484 @$(ENVSETUP); $(MAKE) $(MDEFINES) do=$@ $(dodirs)
486 dot: FORCE
487 @$(ENVSETUP); \
488 $(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
489 -f $(top_srcdir)/Makefile.comm \
490 -f $(top_srcdir)/Makefile.sub $(do)
492 $(LIBDIRS): FORCE
493 @$(ENVSETUP); \
494 if test $(srcdir) = .; \
495 then srcdir=.; \
496 else srcdir=`cd $(srcdir); pwd`/$@; \
497 fi; \
498 test -d $@ || $(mkinstalldirs) $@; \
499 cd $@; \
500 test -f Makefile.dep || touch Makefile.dep; \
501 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
502 -f $(top_srcdir)/Makefile.comm \
503 -f $$srcdir/Makefile.sub \
504 -f $(top_srcdir)/Makefile.lib \
505 -f Makefile.dep $(do)
507 $(CPROGDIRS): FORCE
508 @$(ENVSETUP); \
509 if test $(srcdir) = .; \
510 then srcdir=.; \
511 else srcdir=`cd $(srcdir); pwd`/$@; \
512 fi; \
513 test -d $@ || $(mkinstalldirs) $@; \
514 cd $@; \
515 test -f Makefile.dep || touch Makefile.dep; \
516 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
517 -f $(top_srcdir)/Makefile.comm \
518 -f $$srcdir/Makefile.sub \
519 -f $(top_srcdir)/Makefile.cpg \
520 -f Makefile.dep $(do)
522 $(CCPROGDIRS): FORCE
523 @$(ENVSETUP); \
524 if test $(srcdir) = .; \
525 then srcdir=.; \
526 else srcdir=`cd $(srcdir); pwd`/$@; \
527 fi; \
528 test -d $@ || $(mkinstalldirs) $@; \
529 cd $@; \
530 test -f Makefile.dep || touch Makefile.dep; \
531 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
532 -f $(top_srcdir)/Makefile.comm \
533 -f $$srcdir/Makefile.sub \
534 -f $(top_srcdir)/Makefile.ccpg \
535 -f Makefile.dep $(do)
537 $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE
538 @$(ENVSETUP); \
539 if test $(srcdir) = .; \
540 then srcdir=.; \
541 else srcdir=`cd $(srcdir); pwd`/$@; \
542 fi; \
543 test -d $@ || $(mkinstalldirs) $@; \
544 cd $@; \
545 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
546 -f $(top_srcdir)/Makefile.comm \
547 -f $$srcdir/Makefile.sub \
548 -f $(top_srcdir)/Makefile.dev $(do)
550 $(INCDIRS) $(OTHERDIRS): FORCE
551 @$(ENVSETUP); \
552 if test $(srcdir) = .; \
553 then srcdir=.; \
554 else srcdir=`cd $(srcdir); pwd`/$@; \
555 fi; \
556 test -d $@ || $(mkinstalldirs) $@; \
557 cd $@; \
558 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
559 -f $(top_srcdir)/Makefile.comm \
560 -f $$srcdir/Makefile.sub \
561 -f $(top_srcdir)/Makefile.man $(do)
563 .PHONY: dist
564 dist:
565 -rm -fr tmp
566 rm -f groff-$(version)$(revision).tar.gz
567 mkdir tmp
568 for d in $(DISTDIRS); do \
569 $(mkinstalldirs) tmp/$$d; \
570 done
571 srcdir=`cd $(srcdir); pwd`; \
572 cd tmp; \
573 $(LN_S) ../Makefile .; \
574 $(LN_S) $$srcdir/* . 2>/dev/null || true; \
575 rm -rf CVS; \
576 for d in $(DISTDIRS); do \
577 (cd $$d; \
578 $(LN_S) $$srcdir/$$d/* . 2>/dev/null; \
579 rm -rf CVS || true); \
580 done; \
581 $(MAKE) srcdir=. VPATH=. distfiles; \
582 $(MAKE) srcdir=. VPATH=. extraclean; \
583 for d in $(EXTRADIRS); do \
584 (cd $$d; $(MAKE) extraclean); \
585 done; \
586 rm -f Makefile; \
587 $(LN_S) $$srcdir/Makefile.init Makefile
588 mv tmp groff-$(version)$(revision)
589 tar cfh - groff-$(version)$(revision) | \
590 gzip -c >groff-$(version)$(revision).tar.gz
591 rm -fr groff-$(version)$(revision)
593 # $(PROGDIRS): libgroff
594 # grops grotty grodvi: libdriver
595 # refer lookbib indxbib lkbib: libbib
596 # $(LIBDIRS) $(PROGDIRS): include
598 .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
600 # Create a Makefile in $(subdir). This is useful for development since it
601 # avoids running make recursively.
602 subdir_Makefile: Makefile.cfg
603 $(MAKE) do=Makefile $(subdir)
605 Makefile.cfg: Makefile
606 >Makefile.cfg
607 for var in $(MDEFINES); do \
608 echo "$$var" >>Makefile.cfg; \
609 done
611 Makefile: Makefile.in
612 $(SHELL) config.status
614 .PHONY: uninstall
615 uninstall: uninstall_sub uninstall_dirs
617 .PHONY: uninstall_dirs
618 uninstall_dirs:
619 # Use rmdir here so that the directories are only removed if they're empty
620 -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
621 $(tmacdir) $(systemtmacdir) $(localtmacdir) $(fontdir) $(bindir) \
622 $(datasubdir) $(dataprogramdir) $(datadir) $(infodir) \
623 $(exampledir) $(htmldocdir) $(docdir) \
624 $(libprogramdir) $(libdir)
627 .PHONY: check
628 check:
630 FORCE:
632 .NOEXPORT: