#
#
# $Id: Makefile,v 1.3 2003/07/18 10:58:10 redhead Exp $ 

include ../Makefile.guess
include ../Makefile.rules

DOCSRC=sigit.pod sigitdb.pod 

DOCOBJ=$(DOCSRC:.pod=.1)

all: $(DOCSRC) doc

doc: 
ifeq ($(DOC), yes)
	$(MAKE) $(DOCOBJ)
	pod2man --section=5 --release="Amusements" \
	--center="By Kenneth 'Redhead' Nielsen" \
	--official sigit.rc.pod > sigit.rc.5
endif

clean:
	rm -f  *.1 *.5 *.o *~ core \#*\# .\#* *.save

distclean: clean


install: all
ifeq ($(DOC), yes)
	$(INSTALL) -d $(INSTALLROOT)$(MANDIR)/man1
	$(INSTALL) -d $(INSTALLROOT)$(MANDIR)/man5
	$(INSTALL) -m $(MANMODE) sigit.1 $(INSTALLROOT)$(MANDIR)/man1
	$(INSTALL) -m $(MANMODE) sigitdb.1 $(INSTALLROOT)$(MANDIR)/man1
	$(INSTALL) -m $(MANMODE) sigit.rc.5 $(INSTALLROOT)$(MANDIR)/man5
endif

uninstall:
	rm -f $(INSTALLROOT)$(MANDIR)/man1/sigit.*
	rm -f $(INSTALLROOT)$(MANDIR)/man1/sigitdb.*
	rm -f $(INSTALLROOT)$(MANDIR)/man5/sigit.*

