# Makefile for release team locker

# This is the location of the perl locker.  We substitute this path
# for /usr/athena/bin/perl at the top of perl scripts.  

LOCKER		= /mit/release
PERLDIR 	= /usr/athena/bin

BININSTALL 	= install -m 555
MANINSTALL 	= install -m 644

#
# Destination directories for files.
#
SCRIPTDIR	= $(LOCKER)/arch/share/bin
MANDIR		= $(LOCKER)/man
BINDIR		= `/usr/athena/bin/athdir $(LOCKER)`
WEBDIR		= $(LOCKER)/www

# Files to install.  Assumed file extensions are .perl, and .sh
# PERL should be set to the list of perl scripts to be installed
# in bin directories, minus the .pl extension.  e.g. PERL = autocad
MAN		= releasemail.1
WEB		= 
PERL		= releasemail copy_contacts
SH		= 
LIB		= 

all: install

install: perl man 

installperl: force
	$(BININSTALL) $(SCRIPT).pl $(SCRIPTDIR)/$(SCRIPT)

installman: $(MAN)
	$(MANINSTALL) $(MAN) $(MANDIR)/man1
	catman -M $(MANDIR)

installweb: $(WEB)
	$(MANINSTALL) $(WEB) $(WEBDIR)

$(PERL): $$@.pl
	@$(MAKE) SCRIPT=$@ installperl

man: installman

perl: $(PERL)

force:

clean:
	rm -f *~

