Net2/usr/src/usr.bin/groff/grot/Makefile.bd

#Copyright (C) 1989, 1990 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 \
	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: