#
# Makefile for Utah Raster Toolkit documentation directory
#

# Destination directories for manual pages
# SUFF1 is suffix to put on program man pages when installed

DESTDIR=/usr/site/man

DEST1 = $(DESTDIR)/man1
SUFF1 = 1
DEST3 = $(DESTDIR)/man3
DEST5 = $(DESTDIR)/man5

# Control of formatting.  If your "roff" program needs to be piped to 
# something to print, set ROFFPIPE to (e.g.) "| lpr"
ROFF = psroff
ROFFOPT = -man
ROFFPIPE =

# SYS V make pays attention to environment, so be sure to override
SHELL = /bin/sh

# Default action is to print all man pages
all:
	for i in *.1 ; do $(ROFF) $(ROFFOPT) $$i $(ROFFPIPE) ; done
	for i in *.3 ; do $(ROFF) $(ROFFOPT) $$i $(ROFFPIPE) ; done
	for i in *.5 ; do $(ROFF) $(ROFFOPT) $$i $(ROFFPIPE) ; done

# Put the manual pages into a global location
install: install-1 install-3 install-5
	touch install

install-1: *.1
	for i in $? ; do cp $$i $(DEST1)/`basename $$i .1`.$(SUFF1) ; done
	touch install-1

install-3: *.3
	cp $? $(DEST3)
	touch install-3

install-5: *.5
	cp $? $(DEST5)
	touch install-5

# Clean up installed man pages
pristine:
	-rm -f install*
	-for i in *.1 do ; rm $(DEST1)/`basename $$i .1`.$(SUFF1) ; done
	-for i in *.3 do ; rm $(DEST3)/$$i ; done
	-for i in *.5 do ; rm $(DEST5)/$$i ; done

# No other actions
clean makefile depend:

