summaryrefslogtreecommitdiffstats
path: root/contrib/groff/Makefile.in
blob: dd0ef84a97386b06284404b2051896c2b5fa56d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
#      Written by James Clark (jjc@jclark.com)
# 
# This file is part of groff.
# 
# groff is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
# 
# groff is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License along
# with groff; see the file COPYING.  If not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# Define `page' to be letter if your PostScript printer uses 8.5x11
# paper (USA) and define it to be A4, if it uses A4 paper (rest of the
# world).
PAGE=@PAGE@

# Normally the Postscript driver, grops, produces output that conforms
# to version 3.0 of the Adobe Document Structuring Conventions.
# Unfortunately some spoolers and previewers can't handle such output.
# The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
# make its output acceptable to such programs.  This variable controls
# only the default behaviour of grops; the behaviour can be changed at
# runtime by the grops -b option (and so by groff -P-b).
# Use a value of 0 if your spoolers and previewers are able to handle
# conforming PostScript correctly.
# Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
# this is needed for early versions of TranScript that get confused by
# anything between the %%EndProlog line and the first %%Page: comment.
# Add 2 if lines in included files beginning with %! should be
# stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
# Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
# stripped out of included files; this is needed for spoolers that
# don't understand the %%{Begin,End}Document comments. I suspect this
# includes early versions of TranScript.
# Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
# rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
# with a printer that requires page reversal.
BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@

# DEVICE is the default device.
DEVICE=ps

# PSPRINT is the command to use for printing a PostScript file,
# for example `lpr'.
PSPRINT=@PSPRINT@

# DVIPRINT is the command to use for printing a TeX dvi file,
# for example `lpr -d'.
DVIPRINT=@DVIPRINT@

# Prefix for names of programs that have Unix counterparts.
# For example, if `g' is `g' then troff will be installed as
# gtroff.  This doesn't affect programs like grops or groff that have
# no Unix counterparts.  Note that the groff versions of eqn and tbl
# will not work with Unix troff.
g=@g@

# Common prefix for installation directories.
# Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
# This must already exist when you do make install.
prefix=@prefix@

exec_prefix=@exec_prefix@

# bindir says where to install executables.
bindir=$(exec_prefix)/bin

# datasubdir says where to install data files
datadir=$(prefix)/share
datasubdir=$(datadir)/groff

# fontdir says where to install dev*/*.
fontdir=$(datasubdir)/font

# fontpath says where to look for dev*/*.
fontpath=.:$(fontdir):/usr/lib/font

# tmacdir says where to install macros.
tmacdir=$(datasubdir)/tmac

# tmacpath says where to look for macro files.
tmacpath=.:$(tmacdir)

# sys_tmac_prefix is prefix (if any) for system macro packages
sys_tmac_prefix=@sys_tmac_prefix@

# tmac_wrap is list of system macro packages that should be made
# available to groff by creating a corresponding macro package
# in the groff macro directory that references the system macro
# package.
tmac_wrap=@tmac_wrap@

# If there is a groff version of a macro package listed in $(tmac_wrap),
# then the groff version will be installed with a prefix of this.
# Don't make this empty.
tmac_prefix=g

# The groff -mm macros will be available as -m($(tmac_m_prefix)m.
tmac_m_prefix=\
 `for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
# The groff -ms macros will be available as -m($(tmac_m_prefix)s.
tmac_s_prefix=\
 `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
# The groff -man macros will be available as -m($(tmac_m_prefix)an.
tmac_an_prefix=\
 `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`

# Extension to be used for refer index files.  Index files are not
# sharable between different architectures, so you might want to use
# different suffixes for different architectures.  Choose an extension
# that doesn't conflict with refer or any other indexing program.
indexext=.i

# Directory containing the default index for refer.
indexdir=/usr/dict/papers

# The filename (without suffix) of the default index for refer.
indexname=Ind

# common_words_file is a file containing a list of common words.
# If your system provides /usr/lib/eign it will be copied onto this,
# otherwise the supplied eign file will be used.
common_words_file=$(datasubdir)/eign

# manroot is the root of the man page directory tree.
manroot=$(prefix)/man

# man1ext is the man section for user commands.
man1ext=1
man1dir=$(manroot)/man$(man1ext)

# man5ext is the man section for file formats.
man5ext=5
man5dir=$(manroot)/man$(man5ext)

# man7ext is the man section for macros.
man7ext=7
man7dir=$(manroot)/man$(man7ext)

# DEFINES should include the following:
# -DHAVE_MMAP			if you have mmap() and <sys/mman.h>
# -DARRAY_DELETE_NEEDS_SIZE	if your C++ doesn't understand `delete []'
# -DHAVE_SYS_SIGLIST		if you have sys_siglist[]
# -DWCOREFLAG=0200		if the 0200 bit of the status returned by
#				wait() indicates whether a core image was
#				produced for a process that was terminated
#				by a signal
# -DHAVE_UNISTD_H		if you have <unistd.h>
# -DHAVE_CC_OSFCN_H		if you have a C++ <osfcn.h>
# -DHAVE_DIRENT_H		if you have <dirent.h>
# -DHAVE_LIMITS_H		if you have <limits.h>
# -DHAVE_CC_LIMITS_H		if you have a C++ <limits.h>
# -DHAVE_SYS_DIR_H		if you have <sys/dir.h>
# -DHAVE_STDLIB_H		if you have <stdlib.h>
# -DHAVE_RENAME			if you have rename()
# -DHAVE_MKSTEMP		if you have mkstemp()
# -DSTDLIB_H_DECLARES_GETOPT	if your C++ <stdlib.h> declares getopt()
# -DUNISTD_H_DECLARES_GETOPT	if your C++ <unistd.h> declares getopt()
# -DSTDLIB_H_DECLARES_PUTENV	if your C++ <stdlib.h> declares putenv()
# -DSTDIO_H_DECLARES_POPEN	if your C++ <stdio.h> declares popen()
# -DSTDIO_H_DECLARES_PCLOSE	if your C++ <stdio.h> declares pclose()
# -DHAVE_SYS_NERR		if you have sysnerr in <errno.h> or <stdio.h>
# -DHAVE_SYS_ERRLIST		if you have sys_errlist in <errno.h> or
#				<stdio.h>
# -DMATH_H_DECLARES_HYPOT	if you have hypot() in <math.h>
# -DTRADITIONAL_CPP		if your C++ compiler uses a traditional
#				(Reiser) preprocessor
# -DLONG_FOR_TIME_T		if localtime() takes a long * not a time_t *
# -DHAVE_STRUCT_EXCEPTION	if <math.h> defines struct exception
# -DRETSIGTYPE=int		if signal handlers return int not void	
DEFINES=@DEFS@

# Include fmod.o, strtol.o, getcwd.o, strerror.o, putenv.o  in LIBOBJS if
# your C library is missing the corresponding function.
LIBOBJS=@LIBOBJS@

# CCC is the compiler for C++ (.cc) files.
CCC=@CXX@
CC=@CC@
# CCDEFINES are definitions for C++ compilations.
CCDEFINES=$(DEFINES)
# CDEFINES are definitions for C compilations.
CDEFINES=$(DEFINES)

CCFLAGS=@CXXFLAGS@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
YACC=@YACC@
YACCFLAGS=-v

LIBS=@LIBS@
LIBM=@LIBM@
RANLIB=@RANLIB@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
LN_S=@LN_S@
AR=ar
ETAGS=etags
ETAGSFLAGS=
# Flag that tells etags to assume C++.
ETAGSCCFLAG=-C
# Full path to perl.
PERLPATH=@PERLPATH@
# Sed command with which to edit sh scripts.
SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@
srcdir = @srcdir@
VPATH = @srcdir@

PURIFY=purify
PURIFYCCFLAGS=
#PURIFYCCFLAGS=-g++=yes \
#  -collector=`dirname \`$(CCC) -print-libgcc-file-name\``/ld

# Passing down MAKEOVERRIDES prevents $(MAKE) from containing a second
# copy of $(MDEFINES) when making individual directories; this could
# cause the argument list to become too long on some systems.
MDEFINES="MAKEOVERRIDES=$(MAKEOVERRIDES)" \
  "PAGE=$(PAGE)" "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \
  "DEVICE=$(DEVICE)" "PSPRINT=$(PSPRINT)" "DVIPRINT=$(DVIPRINT)" \
  "prefix=$(prefix)" "exec_prefix=$(exec_prefix)" "bindir=$(bindir)" \
  "g=$(g)" "datadir=$(datadir)" "datasubdir=$(datasubdir)" \
  "fontdir=$(fontdir)" "fontpath=$(fontpath)" \
  "tmacdir=$(tmacdir)" "tmacpath=$(tmacpath)" \
  "indexext=$(indexext)" "indexdir=$(indexdir)" \
  "indexname=$(indexname)" "common_words_file=$(common_words_file)" \
  "manroot=$(manroot)" "man1ext=$(man1ext)" "man1dir=$(man1dir)" \
  "man5ext=$(man5ext)" "man5dir=$(man5dir)" \
  "man7ext=$(man7ext)" "man7dir=$(man7dir)" \
  "tmac_wrap=$(tmac_wrap)" "sys_tmac_prefix=$(sys_tmac_prefix)" \
  "tmac_an_prefix=$(tmac_an_prefix)" \
  "tmac_s_prefix=$(tmac_s_prefix)" "tmac_m_prefix=$(tmac_m_prefix)" \
  "CCC=$(CCC)" "CC=$(CC)" "CCDEFINES=$(CCDEFINES)" "CDEFINES=$(CDEFINES)" \
  "CCFLAGS=$(CCFLAGS)" "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)" \
  "YACC=$(YACC)" "YACCFLAGS=$(YACCFLAGS)" "LIBM=$(LIBM)" \
  "LIBS=$(LIBS)" "LIBOBJS=$(LIBOBJS)" "RANLIB=$(RANLIB)" "AR=$(AR)" \
  "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_DATA=$(INSTALL_DATA)" \
  "ETAGS=$(ETAGS)" "ETAGSFLAGS=$(ETAGSFLAGS)" "ETAGSCCFLAG=$(ETAGSCCFLAG)" \
  "PERLPATH=$(PERLPATH)" "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
  "PURIFY=$(PURIFY)" "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"

SHELL=/bin/sh
INCDIRS=include
LIBDIRS=libgroff libdriver libbib
CCPROGDIRS=groff troff tbl pic eqn grops grotty grodvi tfmtodit \
  grolj4 hpftodit refer lookbib indxbib lkbib soelim addftinfo \
  grohtml
CPROGDIRS=pfbtops psbb
PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
DEVDIRS=devps devdvi devascii devlatin1 devX75 devX75-12 devX100 devX100-12 \
  devlj4 devhtml
OTHERDIRS=man tmac afmtodit grog nroff mm
ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDIRS)
EXTRADIRS=devps/generate devdvi/generate xditview doc
DISTDIRS=$(ALLDIRS) $(EXTRADIRS)
TARGETS=all install install_bin install_data clean distclean mostlyclean \
  realclean extraclean distfiles TAGS depend uninstall_sub

do=all
dodirs=$(ALLDIRS) dot
# Default target for subdir_Makefile
subdir=troff


$(TARGETS):
	@$(MAKE) $(MDEFINES) do=$@ $(dodirs)

dot: FORCE
	@$(MAKE) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \
		-f $(srcdir)/Makefile.comm -f $(srcdir)/Makefile.sub $(do)

$(LIBDIRS): FORCE
	@if test $(srcdir) = .; \
	then srcdir=.; \
	else srcdir=`cd $(srcdir); pwd`/$@; \
	fi; \
	test -d $@ || mkdir $@; \
	cd $@; \
	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
	        -f $$srcdir/../Makefile.lib -f $$srcdir/Makefile.dep $(do)

$(CPROGDIRS): FORCE
	@if test $(srcdir) = .; \
	then srcdir=.; \
	else srcdir=`cd $(srcdir); pwd`/$@; \
	fi; \
	test -d $@ || mkdir $@; \
	cd $@; \
	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
	        -f $$srcdir/../Makefile.cpg -f $$srcdir/Makefile.dep $(do)

$(CCPROGDIRS): FORCE
	@if test $(srcdir) = .; \
	then srcdir=.; \
	else srcdir=`cd $(srcdir); pwd`/$@; \
	fi; \
	test -d $@ || mkdir $@; \
	cd $@; \
	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
	        -f $$srcdir/../Makefile.ccpg -f $$srcdir/Makefile.dep $(do)

$(DEVDIRS): FORCE
	@if test $(srcdir) = .; \
	then srcdir=.; \
	else srcdir=`cd $(srcdir); pwd`/$@; \
	fi; \
	test -d $@ || mkdir $@; \
	cd $@; \
	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
		-f $$srcdir/../Makefile.dev $(do)

$(INCDIRS) $(OTHERDIRS): FORCE
	@if test $(srcdir) = .; \
	then srcdir=.; \
	else srcdir=`cd $(srcdir); pwd`/$@; \
	fi; \
	test -d $@ || mkdir $@; \
	cd $@; \
	$(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
		-f $$srcdir/../Makefile.comm -f $$srcdir/Makefile.sub \
	        -f $$srcdir/../Makefile.man $(do)

version=`cat $(srcdir)/VERSION`

.PHONY: dist
dist:
	-rm -fr tmp
	mkdir tmp
	for d in $(DISTDIRS); do \
	  mkdir	tmp/$$d; \
	done
	srcdir=`cd $(srcdir); pwd`; \
	cd tmp; \
	$(LN_S) ../Makefile .; \
	$(LN_S) $$srcdir/* . 2>/dev/null || true; \
	for d in $(DISTDIRS); do \
	  (cd $$d; $(LN_S) $$srcdir/$$d/* . 2>/dev/null || true); \
	done; \
	$(MAKE) srcdir=$$srcdir VPATH=$$srcdir extraclean; \
	for d in $(EXTRADIRS); do \
	  (cd $$d; $(MAKE) extraclean); \
	done; \
	rm -f Makefile; \
	$(LN_S) $$srcdir/Makefile.init Makefile
	mv tmp groff-$(version)
	rm -f groff-$(version).tar.gz
	tar cfh - groff-$(version) | gzip -c >groff-$(version).tar.gz
	rm -fr groff-$(version)

# $(PROGDIRS): libgroff
# grops grotty grodvi: libdriver
# refer lookbib indxbib lkbib: libbib
# $(LIBDIRS) $(PROGDIRS): include

.PHONY: $(ALLDIRS) dot $(TARGETS) FORCE

subdir_Makefile: Makefile.cfg
	$(MAKE) do=Makefile $(subdir)

Makefile.cfg: Makefile
	>Makefile.cfg
	for var in $(MDEFINES); do \
	  echo "$$var" >>Makefile.cfg; \
	done

depend: srcdir_must_be_dot

.PHONY: srcdir_must_be_dot
srcdir_must_be_dot:
	@test "X$(srcdir)" = "X." \
	  || (echo This target can only be made in the source directory; \
	      exit 1)

Makefile: Makefile.in
	$(SHELL) config.status

.PHONY: uninstall
uninstall: uninstall_sub uninstall_dirs

.PHONY: uninstall_dirs
uninstall_dirs:
# Use rmdir here so that the directories are only removed if they're empty
	-rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
	  $(tmacdir) $(fontdir) $(bindir) $(datasubdir) $(datadir)


.PHONY: check
check:

FORCE:

.NOEXPORT:
OpenPOWER on IntegriCloud