summaryrefslogtreecommitdiff
path: root/Makefile.bd
blob: 6b12397916a5cc658b0f85b63079d2f6639dfa3b (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
#Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc.
#     Written by James Clark (jjc@jclark.uucp)
#
#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 1, 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 LICENSE.  If not, write to the Free Software
#Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

# This is a Makefile for installing groff from a set of binaries and
# a source distribution.

# SRCDIR should point to the directory containing the groff
# source distribution.  You'll have to change this.
SRCDIR=/usr/jjc/groff

# Define PAGE to be letter if your PostScript printer uses 8.5x11 paper (USA);
# define it to be A4, if it uses A4 paper (rest of the world)
PAGE=A4
#PAGE=letter

# BINDIR says where to install the binaries.
BINDIR=/usr/local/bin

# PSPRINT is the command to use for printing a PostScript file
PSPRINT=lpr

# DVIPRINT is the command to use for printing a TeX dvi file
DVIPRINT=lpr -d

MANROOT=/usr/local/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)

# FONTDIR is the directory in which device sub-directories are to be installed.
# If this is not in the path
# `@FONTPATH@',
# you must set the GROFF_FONT_PATH environment variable.
FONTDIR=@FONTDIR@

# MACRODIR is the directory in which macro files should be installed.
# If this is not in the path `@MACROPATH@',
# you must set the GROFF_TMAC_PATH environment variable.
MACRODIR=@MACRODIR@

# HYPHENFILE is the file containing gtroff's hyphenation patterns.
# If you change it from `@HYPHENFILE@',
# you will need to set the GROFF_HYPHEN environment variable.
HYPHENFILE=@HYPHENFILE@

# If GROFFLIBDIR does not exist, then it will be created before MACRODIR,
# FONTDIR, or HYPHENFILE are created.
GROFFLIBDIR=@GROFFLIBDIR@

# DEVICE is the default device used by the groff shell script.
# If you want the binaries to use a default device other than `@DEVICE@'
# when not run using the groff shell script,
# you will need to set the GROFF_TYPESETTER environment variable.
DEVICE=@DEVICE@

# The groff ms macros will be available as -m$(TMAC_S).
# If you use `TMAC_S=s', you can use the Unix ms macros by using
# groff -ms -M/usr/lib/tmac.
TMAC_S=gs

GROFF=

# Comment this line out if you would rather use the shell version of the
# groff command.
GROFF=@GROFF@

STRIP=strip
BINARIES=gtroff gtbl gpic geqn gsoelim grodvi grotty grops psbb pfbtops \
	grefer gindxbib glookbib lkbib addftinfo tfmtodit $(GROFF)

INSTALLFLAGS="PAGE=$(PAGE)" "BINDIR=$(BINDIR)" "PSPRINT=$(PSPRINT)" \
        "DVIPRINT=$(DVIPRINT)" "MANROOT=$(MANROOT)" "MAN1EXT=$(MAN1EXT)" \
	"MAN1DIR=$(MAN1DIR)" "MAN5EXT=$(MAN5EXT)" "MAN5DIR=$(MAN5DIR)" \
	"MAN7EXT=$(MAN7EXT)" "MAN7DIR=$(MAN7DIR)" "FONTDIR=$(FONTDIR)" \
	"GROFFLIBDIR=$(GROFFLIBDIR)" "MACRODIR=$(MACRODIR)" \
	"HYPHENFILE=$(HYPHENFILE)" "DEVICE=$(DEVICE)" "GROFF=$(GROFF)" \
	"TMAC_S=$(TMAC_S)"

install: $(BINARIES) checkversions FORCE
	@echo Making install.nobin in $(SRCDIR)
	@(cd $(SRCDIR); $(MAKE) $(INSTALLFLAGS) install.nobin)
	cp $(BINARIES) $(BINDIR)

install.mm: FORCE
	@echo Making install.mm in $(SRCDIR)
	@(cd $(SRCDIR); $(MAKE) $(INSTALLFLAGS) install.mm) 

strip: FORCE
	$(STRIP) $(BINARIES)

checkversions: VERSION $(SRCDIR)/VERSION FORCE
	@echo Checking that the source and binary distributions \
	have the same version...
	cmp VERSION $(SRCDIR)/VERSION

FORCE: