* Makefile.in (ENVSETUP): Don't assume POSIX make semantics for
[s-roff.git] / Makefile.in
blobccbd522dbb7df1b7aeb68baddbdfa0e8fe3d3af4
1 # Copyright (C) 1989-2000 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 # Define `page' to be letter if your PostScript printer uses 8.5x11
21 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
22 # world).
23 PAGE=@PAGE@
25 # Normally the Postscript driver, grops, produces output that conforms
26 # to version 3.0 of the Adobe Document Structuring Conventions.
27 # Unfortunately some spoolers and previewers can't handle such output.
28 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
29 # make its output acceptable to such programs. This variable controls
30 # only the default behaviour of grops; the behaviour can be changed at
31 # runtime by the grops -b option (and so by groff -P-b).
32 # Use a value of 0 if your spoolers and previewers are able to handle
33 # conforming PostScript correctly.
34 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
35 # this is needed for early versions of TranScript that get confused by
36 # anything between the %%EndProlog line and the first %%Page: comment.
37 # Add 2 if lines in included files beginning with %! should be
38 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
39 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
40 # stripped out of included files; this is needed for spoolers that
41 # don't understand the %%{Begin,End}Document comments. I suspect this
42 # includes early versions of TranScript.
43 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
44 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
45 # with a printer that requires page reversal.
46 BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@
48 # DEVICE is the default device.
49 DEVICE=ps
51 # TTYDEVDIRS is either `font/devascii font/devlatin1 font/devutf8' (for
52 # ASCII) or `font/devcp1047' (for EBCDIC).
53 TTYDEVDIRS=@TTYDEVDIRS@
55 # PSPRINT is the command to use for printing a PostScript file,
56 # for example `lpr'.
57 PSPRINT=@PSPRINT@
59 # DVIPRINT is the command to use for printing a TeX dvi file,
60 # for example `lpr -d'.
61 DVIPRINT=@DVIPRINT@
63 # Prefix for names of programs that have Unix counterparts.
64 # For example, if `g' is `g' then troff will be installed as
65 # gtroff. This doesn't affect programs like grops or groff that have
66 # no Unix counterparts. Note that the groff versions of eqn and tbl
67 # will not work with Unix troff.
68 g=@g@
70 # Common prefix for installation directories.
71 # Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
72 # This must already exist when you do make install.
73 prefix=@prefix@
75 exec_prefix=@exec_prefix@
77 # bindir says where to install executables.
78 bindir=$(exec_prefix)/bin
80 # datasubdir says where to install data files
81 datadir=@datadir@
82 datasubdir=$(datadir)/groff
84 # fontdir says where to install dev*/*.
85 fontdir=$(datasubdir)/font
87 # fontpath says where to look for dev*/*.
88 fontpath=.:$(fontdir):/usr/lib/font
90 # tmacdir says where to install macros.
91 tmacdir=$(datasubdir)/tmac
93 # tmacpath says where to look for macro files.
94 tmacpath=.:$(tmacdir)
96 # sys_tmac_prefix is prefix (if any) for system macro packages
97 sys_tmac_prefix=@sys_tmac_prefix@
99 # tmac_wrap is list of system macro packages that should be made
100 # available to groff by creating a corresponding macro package
101 # in the groff macro directory that references the system macro
102 # package.
103 tmac_wrap=@tmac_wrap@
105 # If there is a groff version of a macro package listed in $(tmac_wrap),
106 # then the groff version will be installed with a prefix of this.
107 # Don't make this empty.
108 tmac_prefix=g
110 # The groff -mm macros will be available as -m$(tmac_m_prefix)m.
111 tmac_m_prefix=\
112 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
113 # The groff -ms macros will be available as -m$(tmac_s_prefix)s.
114 tmac_s_prefix=\
115 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
116 # The groff -man macros will be available as -m$(tmac_an_prefix)an.
117 tmac_an_prefix=\
118 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
120 # Extension to be used for refer index files. Index files are not
121 # sharable between different architectures, so you might want to use
122 # different suffixes for different architectures. Choose an extension
123 # that doesn't conflict with refer or any other indexing program.
124 indexext=.i
126 # Directory containing the default index for refer.
127 indexdir=/usr/dict/papers
129 # The filename (without suffix) of the default index for refer.
130 indexname=Ind
132 # common_words_file is a file containing a list of common words.
133 # If your system provides /usr/lib/eign it will be copied onto this,
134 # otherwise the supplied eign file will be used.
135 common_words_file=$(datasubdir)/eign
137 # manroot is the root of the man page directory tree.
138 manroot=@mandir@
140 # man1ext is the man section for user commands.
141 man1ext=1
142 man1dir=$(manroot)/man$(man1ext)
144 # man5ext is the man section for file formats.
145 man5ext=5
146 man5dir=$(manroot)/man$(man5ext)
148 # man7ext is the man section for macros.
149 man7ext=7
150 man7dir=$(manroot)/man$(man7ext)
152 # DEFINES should include the following:
153 # -DHAVE_MMAP if you have mmap() and <sys/mman.h>
154 # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []'
155 # -DHAVE_SYS_SIGLIST if you have sys_siglist[]
156 # -DWCOREFLAG=0200 if the 0200 bit of the status returned by
157 # wait() indicates whether a core image was
158 # produced for a process that was terminated
159 # by a signal
160 # -DHAVE_UNISTD_H if you have <unistd.h>
161 # -DHAVE_CC_OSFCN_H if you have a C++ <osfcn.h>
162 # -DHAVE_DIRENT_H if you have <dirent.h>
163 # -DHAVE_LIMITS_H if you have <limits.h>
164 # -DHAVE_CC_LIMITS_H if you have a C++ <limits.h>
165 # -DHAVE_SYS_DIR_H if you have <sys/dir.h>
166 # -DHAVE_STDLIB_H if you have <stdlib.h>
167 # -DHAVE_STRINGS_H if you have <strings.h>
168 # -DHAVE_RENAME if you have rename()
169 # -DHAVE_MKSTEMP if you have mkstemp()
170 # -DHAVE_STRDUP if you have strdup()
171 # -DHAVE_STRSEP if you have strsep()
172 # -DHAVE_STRCASECMP if you have strcasecmp()
173 # -DNEED_DECLARATION_HYPOT if your C++ <math.h> doesn't declare hypot()
174 # -DNEED_DECLARATION_PUTENV if your C++ <stdlib.h> doesn't declare putenv()
175 # -DNEED_DECLARATION_POPEN if your C++ <stdio.h> doesn't declare popen()
176 # -DNEED_DECLARATION_PCLOSE if your C++ <stdio.h> doesn't declare pclose()
177 # -DNEED_DECLARATION_STRNCASECMP
178 # if your C++ <string.h> doesn't declare
179 # strncasecmp()
180 # -DRET_TYPE_SRAND_IS_VOID if your srand() returns void or int
181 # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h>
182 # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or
183 # <stdio.h>
184 # -DTRADITIONAL_CPP if your C++ compiler uses a traditional
185 # (Reiser) preprocessor
186 # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t *
187 # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception
188 # -DRETSIGTYPE=int if signal handlers return int not void
189 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
190 DEFINES=@DEFS@
192 # Include fmod.o, strtol.o, getcwd.o, strerror.o, putenv.o in LIBOBJS if
193 # your C library is missing the corresponding function.
194 LIBOBJS=@LIBOBJS@
196 # CCC is the compiler for C++ (.cc) files.
197 CCC=@CXX@
198 CC=@CC@
199 # CCDEFINES are definitions for C++ compilations.
200 CCDEFINES=$(DEFINES)
201 # CDEFINES are definitions for C compilations.
202 CDEFINES=$(DEFINES)
204 CCFLAGS=@CXXFLAGS@
205 CFLAGS=@CFLAGS@
206 LDFLAGS=@LDFLAGS@
207 YACC=@YACC@
208 YACCFLAGS=-v
210 LIBS=@LIBS@
211 LIBM=@LIBM@
212 RANLIB=@RANLIB@
213 INSTALL=@INSTALL@
214 INSTALL_PROGRAM=@INSTALL_PROGRAM@
215 INSTALL_SCRIPT=@INSTALL_SCRIPT@
216 INSTALL_DATA=@INSTALL_DATA@
217 LN_S=@LN_S@
218 AR=ar
219 ETAGS=etags
220 ETAGSFLAGS=
221 # Flag that tells etags to assume C++.
222 ETAGSCCFLAG=-C
223 # Full path to perl.
224 PERLPATH=@PERLPATH@
225 # Sed command with which to edit sh scripts.
226 SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
228 srcdir=@srcdir@
229 top_srcdir=@top_srcdir@
230 VPATH=@srcdir@
231 top_builddir=@top_builddir@
233 # the program to create directory hierarchies
234 mkinstalldirs=$(top_srcdir)/mkinstalldirs
236 PURIFY=purify
237 PURIFYCCFLAGS=
238 #PURIFYCCFLAGS=-g++=yes \
239 # -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld
241 # Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
242 # copy of $(MDEFINES) when making individual directories; this could
243 # cause the argument list to become too long on some systems.
244 MDEFINES= \
245 "MAKEOVERRIDES=$(MAKEOVERRIDES)" \
246 "PAGE=$(PAGE)" \
247 "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
248 "DEVICE=$(DEVICE)" \
249 "TTYDEVDIRS=$(TTYDEVDIRS)" \
250 "PSPRINT=$(PSPRINT)" \
251 "DVIPRINT=$(DVIPRINT)" \
252 "top_srcdir=$(top_srcdir)" \
253 "top_builddir=$(top_builddir)" \
254 "prefix=$(prefix)" \
255 "exec_prefix=$(exec_prefix)" \
256 "bindir=$(bindir)" \
257 "g=$(g)" \
258 "datadir=$(datadir)" \
259 "datasubdir=$(datasubdir)" \
260 "fontdir=$(fontdir)" \
261 "fontpath=$(fontpath)" \
262 "tmacdir=$(tmacdir)" \
263 "tmacpath=$(tmacpath)" \
264 "indexext=$(indexext)" \
265 "indexdir=$(indexdir)" \
266 "indexname=$(indexname)" \
267 "common_words_file=$(common_words_file)" \
268 "manroot=$(manroot)" \
269 "man1ext=$(man1ext)" \
270 "man1dir=$(man1dir)" \
271 "man5ext=$(man5ext)" \
272 "man5dir=$(man5dir)" \
273 "man7ext=$(man7ext)" \
274 "man7dir=$(man7dir)" \
275 "mkinstalldirs=$(mkinstalldirs)" \
276 "tmac_wrap=$(tmac_wrap)" \
277 "sys_tmac_prefix=$(sys_tmac_prefix)" \
278 "tmac_an_prefix=$(tmac_an_prefix)" \
279 "tmac_s_prefix=$(tmac_s_prefix)" \
280 "tmac_m_prefix=$(tmac_m_prefix)" \
281 "CCC=$(CCC)" \
282 "CC=$(CC)" \
283 "CCDEFINES=$(CCDEFINES)" \
284 "CDEFINES=$(CDEFINES)" \
285 "CCFLAGS=$(CCFLAGS)" \
286 "CFLAGS=$(CFLAGS)" \
287 "LDFLAGS=$(LDFLAGS)" \
288 "YACC=$(YACC)" \
289 "YACCFLAGS=$(YACCFLAGS)" \
290 "LIBM=$(LIBM)" \
291 "LIBS=$(LIBS)" \
292 "LIBOBJS=$(LIBOBJS)" \
293 "RANLIB=$(RANLIB)" \
294 "AR=$(AR)" \
295 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
296 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
297 "INSTALL_DATA=$(INSTALL_DATA)" \
298 "ETAGS=$(ETAGS)" \
299 "ETAGSFLAGS=$(ETAGSFLAGS)" \
300 "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
301 "PERLPATH=$(PERLPATH)" \
302 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
303 "PURIFY=$(PURIFY)" \
304 "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
306 SHELL=/bin/sh
307 INCDIRS=src/include
308 LIBDIRS=\
309 src/libs/libgroff \
310 src/libs/libdriver \
311 src/libs/libbib
312 CCPROGDIRS=\
313 src/roff/groff \
314 src/roff/troff \
315 src/preproc/tbl \
316 src/preproc/pic \
317 src/preproc/eqn \
318 src/preproc/grn \
319 src/preproc/refer \
320 src/preproc/soelim \
321 src/devices/grops \
322 src/devices/grotty \
323 src/devices/grodvi \
324 src/devices/grolj4 \
325 src/devices/grohtml \
326 src/devices/grolbp \
327 src/utils/tfmtodit \
328 src/utils/hpftodit \
329 src/utils/lookbib \
330 src/utils/indxbib \
331 src/utils/lkbib \
332 src/utils/addftinfo
333 CPROGDIRS=src/utils/pfbtops
334 PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
335 DEVDIRS=\
336 font/devps \
337 font/devdvi \
338 font/devX75 \
339 font/devX75-12 \
340 font/devX100 \
341 font/devX100-12 \
342 font/devlj4 \
343 font/devhtml \
344 font/devlbp
345 ALLTTYDEVDIRS=\
346 font/devascii \
347 font/devlatin1 \
348 font/devutf8 \
349 font/devcp1047
350 OTHERDIRS=\
351 man \
352 tmac \
353 src/utils/afmtodit \
354 src/roff/grog \
355 src/roff/nroff \
356 contrib/mm
357 ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
358 $(DEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
359 EXTRADIRS=\
360 font/devps/generate \
361 font/devdvi/generate \
362 src/xditview \
364 DISTDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
365 $(DEVDIRS) $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS)
366 TARGETS=all install install_bin install_data clean distclean mostlyclean \
367 realclean extraclean distfiles TAGS depend uninstall_sub
369 # This ENVSETUP gork is required by the DJGPP build on Windows 9X,
370 # where Make needs to be case-sensitive to find files like BI and VERSION.
371 ENVSETUP=\
372 if test -f $(srcdir)/makefile.ccpg* && \
373 test -f $(srcdir)/Makefile.ccpg*; \
374 then FNCASE=y; export FNCASE; \
375 else :; \
378 do=all
379 dodirs=$(ALLDIRS) dot
380 # Default target for subdir_Makefile
381 subdir=src/roff/troff
384 $(TARGETS):
385 @$(ENVSETUP); $(MAKE) $(MDEFINES) do=$@ $(dodirs)
387 dot: FORCE
388 @$(ENVSETUP); \
389 $(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
390 -f $(top_srcdir)/Makefile.comm \
391 -f $(top_srcdir)/Makefile.sub $(do)
393 $(LIBDIRS): FORCE
394 @$(ENVSETUP); \
395 if test $(srcdir) = .; \
396 then srcdir=.; \
397 else srcdir=`cd $(srcdir); pwd`/$@; \
398 fi; \
399 test -d $@ || $(mkinstalldirs) $@; \
400 cd $@; \
401 test -f Makefile.dep || touch Makefile.dep; \
402 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
403 -f $(top_srcdir)/Makefile.comm \
404 -f $$srcdir/Makefile.sub \
405 -f $(top_srcdir)/Makefile.lib \
406 -f Makefile.dep $(do)
408 $(CPROGDIRS): FORCE
409 @$(ENVSETUP); \
410 if test $(srcdir) = .; \
411 then srcdir=.; \
412 else srcdir=`cd $(srcdir); pwd`/$@; \
413 fi; \
414 test -d $@ || $(mkinstalldirs) $@; \
415 cd $@; \
416 test -f Makefile.dep || touch Makefile.dep; \
417 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
418 -f $(top_srcdir)/Makefile.comm \
419 -f $$srcdir/Makefile.sub \
420 -f $(top_srcdir)/Makefile.cpg \
421 -f Makefile.dep $(do)
423 $(CCPROGDIRS): FORCE
424 @$(ENVSETUP); \
425 if test $(srcdir) = .; \
426 then srcdir=.; \
427 else srcdir=`cd $(srcdir); pwd`/$@; \
428 fi; \
429 test -d $@ || $(mkinstalldirs) $@; \
430 cd $@; \
431 test -f Makefile.dep || touch Makefile.dep; \
432 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
433 -f $(top_srcdir)/Makefile.comm \
434 -f $$srcdir/Makefile.sub \
435 -f $(top_srcdir)/Makefile.ccpg \
436 -f Makefile.dep $(do)
438 $(DEVDIRS) $(TTYDEVDIRS): FORCE
439 @$(ENVSETUP); \
440 if test $(srcdir) = .; \
441 then srcdir=.; \
442 else srcdir=`cd $(srcdir); pwd`/$@; \
443 fi; \
444 test -d $@ || $(mkinstalldirs) $@; \
445 cd $@; \
446 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
447 -f $(top_srcdir)/Makefile.comm \
448 -f $$srcdir/Makefile.sub \
449 -f $(top_srcdir)/Makefile.dev $(do)
451 $(INCDIRS) $(OTHERDIRS): FORCE
452 @$(ENVSETUP); \
453 if test $(srcdir) = .; \
454 then srcdir=.; \
455 else srcdir=`cd $(srcdir); pwd`/$@; \
456 fi; \
457 test -d $@ || $(mkinstalldirs) $@; \
458 cd $@; \
459 $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
460 -f $(top_srcdir)/Makefile.comm \
461 -f $$srcdir/Makefile.sub \
462 -f $(top_srcdir)/Makefile.man $(do)
464 version=`cat $(top_srcdir)/VERSION`
465 # No additional number for the groff archive if revision is zero
466 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
468 .PHONY: dist
469 dist:
470 -rm -fr tmp
471 rm -f groff-$(version)$(revision).tar.gz
472 mkdir tmp
473 for d in $(DISTDIRS); do \
474 $(mkinstalldirs) tmp/$$d; \
475 done
476 srcdir=`cd $(srcdir); pwd`; \
477 cd tmp; \
478 $(LN_S) ../Makefile .; \
479 $(LN_S) $$srcdir/* . 2>/dev/null || true; \
480 for d in $(DISTDIRS); do \
481 (cd $$d; $(LN_S) $$srcdir/$$d/* . 2>/dev/null || true); \
482 done; \
483 $(MAKE) srcdir=$$srcdir VPATH=$$srcdir extraclean; \
484 for d in $(EXTRADIRS); do \
485 (cd $$d; $(MAKE) extraclean); \
486 done; \
487 rm -f Makefile; \
488 $(LN_S) $$srcdir/Makefile.init Makefile
489 rm -f src/xditview/Imakefile;
490 mv tmp groff-$(version)$(revision)
491 tar cfh - groff-$(version)$(revision) | \
492 gzip -c >groff-$(version)$(revision).tar.gz
493 rm -fr groff-$(version)$(revision)
495 # $(PROGDIRS): libgroff
496 # grops grotty grodvi: libdriver
497 # refer lookbib indxbib lkbib: libbib
498 # $(LIBDIRS) $(PROGDIRS): include
500 .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
502 subdir_Makefile: Makefile.cfg
503 $(MAKE) do=Makefile $(subdir)
505 Makefile.cfg: Makefile
506 >Makefile.cfg
507 for var in $(MDEFINES); do \
508 echo "$$var" >>Makefile.cfg; \
509 done
511 Makefile: Makefile.in
512 $(SHELL) config.status
514 .PHONY: uninstall
515 uninstall: uninstall_sub uninstall_dirs
517 .PHONY: uninstall_dirs
518 uninstall_dirs:
519 # Use rmdir here so that the directories are only removed if they're empty
520 -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
521 $(tmacdir) $(fontdir) $(bindir) $(datasubdir) $(datadir)
524 .PHONY: check
525 check:
527 FORCE:
529 .NOEXPORT: