xref: /386bsd/usr/src/usr.bin/groff/grot/Makefile (revision a2142627)
1# Generated automatically from Makefile.in by configure.
2# Copyright (C) 1989, 1990, 1991, 1992, 1993 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.
11#
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.
16#
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, 675 Mass Ave, Cambridge, MA 02139, USA.
20
21# Define `page' to be letter if your PostScript printer uses 8.5x11
22# paper (USA) and define it to be A4, if it uses A4 paper (rest of the
23# world).
24PAGE=letter
25
26# Normally the Postscript driver, grops, produces output that conforms
27# to version 3.0 of the Adobe Document Structuring Conventions.
28# Unfortunately some spoolers and previewers can't handle such output.
29# The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
30# make its output acceptable to such programs.  This variable controls
31# only the default behaviour of grops; the behaviour can be changed at
32# runtime by the grops -b option (and so by groff -P-b).
33# Use a value of 0 if your spoolers and previewers are able to handle
34# conforming PostScript correctly.
35# Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
36# this is needed for early versions of TranScript that get confused by
37# anything between the %%EndProlog line and the first %%Page: comment.
38# Add 2 if lines in included files beginning with %! should be
39# stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
40# Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
41# stripped out of included files; this is needed for spoolers that
42# don't understand the %%{Begin,End}Document comments. I suspect this
43# includes early versions of TranScript.
44# Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
45# rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
46# with a printer that requires page reversal.
47BROKEN_SPOOLER_FLAGS=7
48
49# DEVICE is the default device.
50DEVICE=ps
51
52# PSPRINT is the command to use for printing a PostScript file,
53# for example `lpr'.
54PSPRINT=lpr
55
56# DVIPRINT is the command to use for printing a TeX dvi file,
57# for example `lpr -d'.
58DVIPRINT=lpr -d
59
60# Prefix for names of programs that have Unix counterparts.
61# For example, if `g' is `g' then troff will be installed as
62# gtroff.  This doesn't affect programs like grops or groff that have
63# no Unix counterparts.  Note that the groff versions of eqn and tbl
64# will not work with Unix troff.  This is also use in the definitions
65# of tmac_s and tmac_m.
66g=g
67
68# The groff ms macros will be available as -m$(tmac_s).
69# If you use `tmac_s=s', you can use the Unix ms macros by using
70# groff -ms -M/usr/lib/tmac.
71tmac_s=$(g)s
72
73# Similarily, the groff mm macros will be available as -m$(tmac_m).
74tmac_m=$(g)m
75
76# Common prefix for installation directories.
77# Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
78# This must already exist when you do make install.
79#prefix=/usr
80
81#exec_prefix=${prefix}
82
83# bindir says where to install executables.
84#bindir=$(exec_prefix)/bin
85
86# datasubdir says where to install data files
87#datadir=$(prefix)/lib
88#datasubdir=$(datadir)/groff
89
90# fontdir says where to install dev*/*.
91fontdir=$(datasubdir)/font
92
93# fontpath says where to look for dev*/*.
94fontpath=.:$(fontdir):$(prefix)/lib/font:/usr/lib/font
95
96# tmacdir says where to install macros.
97tmacdir=$(datasubdir)/tmac
98
99# tmacpath says where to look for macro files.
100tmacpath=.:$(tmacdir):/usr/lib/tmac
101
102# Extension to be used for refer index files.  Index files are not
103# shareable between different architectures, so you might want to use
104# different suffixes for different architectures.  Choose an extension
105# that doesn't conflict with refer or any other indexing program.
106indexext=.i
107
108# Directory containing the default index for refer.
109indexdir=/usr/dict/papers
110
111# The filename (without suffix) of the default index for refer.
112indexname=Ind
113
114# common_words_file is a file containing a list of common words.
115# If your system provides /usr/lib/eign it will be copied onto this,
116# otherwise the supplied eign file will be used.
117common_words_file=$(datasubdir)/eign
118
119# manroot is the root of the man page directory tree.
120manroot=$(prefix)/man
121
122# man1ext is the man section for user commands.
123man1ext=1
124man1dir=$(manroot)/man$(man1ext)
125
126# man5ext is the man section for file formats.
127man5ext=5
128man5dir=$(manroot)/man$(man5ext)
129
130# man7ext is the man section for macros.
131man7ext=7
132man7dir=$(manroot)/man$(man7ext)
133
134# DEFINES should include the following:
135# -DHAVE_MMAP			if you have mmap() and <sys/mman.h>
136# -DCFRONT_ANSI_BUG		if you're using cfront 2.0 (or later?) with
137#				an ANSI C compiler
138# -DCOOKIE_BUG			if you're using gcc/g++ 2.[012] (you should
139#				upgrade to 2.3).
140# -DARRAY_DELETE_NEEDS_SIZE	if your C++ doesn't understand `delete []'
141# -DHAVE_SYS_SIGLIST		if you have sys_siglist[]
142# -DWCOREFLAG=0200		if the 0200 bit of the status returned by
143#				wait() indicates whether a core image was
144#				produced for a process that was terminated
145#				by a signal
146# -DHAVE_UNISTD_H		if you have <unistd.h>
147# -DHAVE_CC_UNISTD_H		if you have a C++ <unistd.h>
148# -DHAVE_DIRENT_H		if you have <dirent.h>
149# -DHAVE_LIMITS_H		if you have <limits.h>
150# -DHAVE_CC_LIMITS_H		if you have a C++ <limits.h>
151# -DHAVE_SYS_DIR_H		if you have <sys/dir.h>
152# -DHAVE_STDLIB_H		if you have <stdlib.h>
153# -DHAVE_VFORK_H		if you have <vfork.h>
154# -Dvfork=fork			if you don't have a working vfork()
155# -DHAVE_RENAME			if you have rename()
156# -DHAVE_MKSTEMP		if you have mkstemp()
157# -DSTDLIB_H_DECLARES_GETOPT	if your C++ <stdlib.h> declares getopt()
158# -DUNISTD_H_DECLARES_GETOPT	if your C++ <unistd.h> declares getopt()
159# -DSTDLIB_H_DECLARES_PUTENV	if your C++ <stdlib.h> declares putenv()
160# -DTRADITIONAL_CPP		if your C++ compiler uses a traditional
161#				(Reiser) preprocessor.
162# -DLONG_FOR_TIME_T		if localtime() takes a long * not a time_t *
163# -DHAVE_STRUCT_EXCEPTION	if <math.h> defines struct exception
164# -DRETSIGTYPE=int		if signal handlers return int not void
165DEFINES= -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_STDLIB_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1 -DSTDLIB_H_DECLARES_GETOPT=1 -DUNISTD_H_DECLARES_GETOPT=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DRETSIGTYPE=int
166
167# Include fmod.o, strtol.o, getcwd.o, strerror.o, putenv.o  in LIBOBJS if
168# your C library is missing the corresponding function.
169LIBOBJS= fmod.o strtol.o strerror.o
170
171# CCC is the compiler for C++ (.cc) files.
172CCC=g++
173CC=gcc
174# CCDEFINES are definitions for C++ compilations.
175CCDEFINES=$(DEFINES)
176# CDEFINES are definitions for C compilations.
177CDEFINES=$(DEFINES)
178
179DEBUG=
180OPTIMIZE=-O
181CCFLAGS=$(DEBUG) $(OPTIMIZE)
182CFLAGS=$(DEBUG) $(OPTIMIZE)
183YACC=yacc
184YACCFLAGS=-v
185
186LIBS=
187CCLIBS=
188RANLIB=ranlib
189INSTALL=/usr/bin/install -c
190INSTALL_PROGRAM=$(INSTALL)
191INSTALL_DATA=$(INSTALL) -m 644
192LN_S=ln -s
193AR=ar
194ETAGS=etags
195ETAGSFLAGS=
196# Flag that tells etags to assume C++.
197ETAGSCCFLAG=
198# Full path to perl.
199PERLPATH=
200# Sed command with which to edit sh scripts.
201SH_SCRIPT_SED_CMD=1s/.*/:/
202srcdir = .
203#VPATH = .
204
205PURIFY=purify
206GCCVERSION=2.3.3
207GCCPREFIX=/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/$(GCCVERSION)/
208PURIFYCCFLAGS=-g++=yes -collector=$(GCCPREFIX)ld
209
210MDEFINES="PAGE=$(PAGE)" "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
211  "DEVICE=$(DEVICE)" "PSPRINT=$(PSPRINT)" "DVIPRINT=$(DVIPRINT)" \
212  "prefix=$(prefix)" "exec_prefix=$(exec_prefix)" "bindir=$(bindir)" \
213  "g=$(g)" "datadir=$(datadir)" "datasubdir=$(datasubdir)" \
214  "fontdir=$(fontdir)" "fontpath=$(fontpath)" \
215  "tmacdir=$(tmacdir)" "tmacpath=$(tmacpath)" \
216  "indexext=$(indexext)" "indexdir=$(indexdir)" \
217  "indexname=$(indexname)" "common_words_file=$(common_words_file)" \
218  "manroot=$(manroot)" "man1ext=$(man1ext)" "man1dir=$(man1dir)" \
219  "man5ext=$(man5ext)" "man5dir=$(man5dir)" \
220  "man7ext=$(man7ext)" "man7dir=$(man7dir)" \
221  "tmac_s=$(tmac_s)" "tmac_m=$(tmac_m)" \
222  "CCC=$(CCC)" "CC=$(CC)" "CCDEFINES=$(CCDEFINES)" "CDEFINES=$(CDEFINES)" \
223  "CCFLAGS=$(CCFLAGS)" "CFLAGS=$(CFLAGS)" \
224  "YACC=$(YACC)" "YACCFLAGS=$(YACCFLAGS)" \
225  "LIBS=$(LIBS)" "CCLIBS=$(CCLIBS)" "LIBOBJS=$(LIBOBJS)" \
226  "RANLIB=$(RANLIB)" "AR=$(AR)" \
227  "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_DATA=$(INSTALL_DATA)" \
228  "ETAGS=$(ETAGS)" "ETAGSFLAGS=$(ETAGSFLAGS)" "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
229  "PERLPATH=$(PERLPATH)" "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
230  "PURIFY=$(PURIFY)" "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
231
232SHELL=/bin/sh
233INCDIRS=include
234LIBDIRS=libgroff libdriver libbib
235CCPROGDIRS=groff troff tbl pic eqn grops grotty grodvi tfmtodit \
236  refer lookbib indxbib lkbib soelim addftinfo
237CPROGDIRS=pfbtops psbb
238PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
239DEVDIRS=devps devdvi devascii devlatin1 devX75 devX75-12 devX100 devX100-12
240OTHERDIRS=man tmac afmtodit grog nroff mm
241ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDIRS)
242EXTRADIRS=devps/generate devdvi/generate xditview doc
243DISTDIRS=$(ALLDIRS) $(EXTRADIRS)
244TARGETS=all install install_bin install_data clean distclean mostlyclean \
245  realclean extraclean distfiles TAGS depend uninstall_sub
246
247#do=all
248#dodirs=$(ALLDIRS) dot
249## Default target for subdir_Makefile
250subdir=troff
251
252
253$(TARGETS):
254	@$(MAKE) $(MDEFINES) do=$@ $(dodirs)
255
256dot:
257	@$(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
258		-f $(srcdir)/Makefile.comm -f $(srcdir)/Makefile.sub $(do)
259
260$(LIBDIRS): FORCE
261	@if test $(srcdir) = .; \
262	then srcdir=.; \
263	else srcdir=`cd $(srcdir); pwd`/$@; \
264	fi; \
265	echo Making $(do) in $@; \
266	test -d $@ || mkdir $@; \
267	cd $@; \
268	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
269		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
270	        -f $$srcdir/../Makefile.lib -f $$srcdir/Makefile.dep $(do)
271
272$(CPROGDIRS): FORCE
273	@if test $(srcdir) = .; \
274	then srcdir=.; \
275	else srcdir=`cd $(srcdir); pwd`/$@; \
276	fi; \
277	echo Making $(do) in $@; \
278	test -d $@ || mkdir $@; \
279	cd $@; \
280	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
281		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
282	        -f $$srcdir/../Makefile.cpg -f $$srcdir/Makefile.dep $(do)
283
284$(CCPROGDIRS): FORCE
285	@if test $(srcdir) = .; \
286	then srcdir=.; \
287	else srcdir=`cd $(srcdir); pwd`/$@; \
288	fi; \
289	echo Making $(do) in $@; \
290	test -d $@ || mkdir $@; \
291	cd $@; \
292	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
293		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
294	        -f $$srcdir/../Makefile.ccpg -f $$srcdir/Makefile.dep $(do)
295
296$(DEVDIRS): FORCE
297	@if test $(srcdir) = .; \
298	then srcdir=.; \
299	else srcdir=`cd $(srcdir); pwd`/$@; \
300	fi; \
301	echo Making $(do) in $@; \
302	test -d $@ || mkdir $@; \
303	cd $@; \
304	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
305		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
306		-f $$srcdir/../Makefile.dev $(do)
307
308$(INCDIRS) $(OTHERDIRS): FORCE
309	@if test $(srcdir) = .; \
310	then srcdir=.; \
311	else srcdir=`cd $(srcdir); pwd`/$@; \
312	fi; \
313	echo Making $(do) in $@; \
314	test -d $@ || mkdir $@; \
315	cd $@; \
316	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
317		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
318	        -f $$srcdir/../Makefile.man $(do)
319
320version=`cat $(srcdir)/VERSION`
321
322.PHONY: dist
323dist:
324	-rm -fr tmp
325	mkdir tmp
326	for d in $(DISTDIRS); do \
327	  mkdir	tmp/$$d; \
328	done
329	srcdir=`cd $(srcdir); pwd`; \
330	cd tmp; \
331	$(LN_S) ../Makefile .; \
332	$(LN_S) $$srcdir/* . 2>/dev/null || true; \
333	for d in $(DISTDIRS); do \
334	  (cd $$d; $(LN_S) $$srcdir/$$d/* . 2>/dev/null || true); \
335	done; \
336	$(MAKE) srcdir=$$srcdir VPATH=$$srcdir extraclean; \
337	for d in $(EXTRADIRS); do \
338	  (cd $$d; $(MAKE) extraclean); \
339	done; \
340	rm -f Makefile; \
341	$(LN_S) $$srcdir/Makefile.init Makefile
342	mv tmp groff-$(version)
343	tar cfh - groff-$(version) | gzip -c >groff-$(version).tar.z
344	rm -fr groff-$(version)
345
346# $(PROGDIRS): libgroff
347# grops grotty grodvi: libdriver
348# refer lookbib indxbib lkbib: libbib
349# $(LIBDIRS) $(PROGDIRS): include
350
351.PHONY: $(ALLDIRS) dot $(TARGETS) FORCE
352
353subdir_Makefile: Makefile.cfg
354	$(MAKE) do=Makefile $(subdir)
355
356Makefile.cfg: Makefile
357	>Makefile.cfg
358	for var in $(MDEFINES); do \
359	  echo "$$var" >>Makefile.cfg; \
360	done
361
362depend: srcdir_must_be_dot
363
364.PHONY: srcdir_must_be_dot
365srcdir_must_be_dot:
366	@test "X$(srcdir)" = "X." \
367	  || (echo This target can only be made in the source directory; \
368	      exit 1)
369
370Makefile: Makefile.in
371	$(SHELL) config.status
372
373.PHONY: uninstall
374uninstall: uninstall_sub uninstall_dirs
375
376.PHONY: uninstall_dirs
377uninstall_dirs:
378# Use rmdir here so that the directories are only removed if they're empty
379	-rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
380	  $(tmacdir) $(fontdir) $(bindir) $(datasubdir) $(datadir)
381
382
383.PHONY: check
384check:
385
386FORCE:
387
388.NOEXPORT:
389