#Residence of perl
PERL = /usr/local/bin/perl
#PERL = /usr/bin/perl
#PERL = /bin/perl

#Residence of pod2man
POD2MAN = /usr/local/bin/pod2man
#POD2MAN = /usr/bin/pod2man
#POD2MAN = /bin/pod2man

#Residence of date
DATE = /usr/local/bin/date
#DATE = /usr/bin/date
#DATE = /bin/date

#Residence of gzip or compress & compression flags
COMPRESS = /usr/local/bin/gzip -9f
#COMPRESS = /usr/bin/gzip -9f
#COMPRESS = /bin/gzip -9f
#COMPRESS = /usr/bin/compress -f
#COMPRESS = /bin/compress -f

#Suffix of compressed files
SUFFIX = "gz"
#SUFFIX = "z"
#SUFFIX = "Z"

#Location where file_shift should be installed
BINDIR = /usr/local/bin
#BINDIR = /usr/bin
#BINDIR = /bin

#Location where the man page should be installed
#MANDIR = /usr/local/share/man/man1
MANDIR = /usr/local/man/man1
#MANDIR = /usr/share/man/man1
#MANDIR = /usr/man/man1

#You don't have to change any thing below this line.

all:
	( \
		cp file_shift file_shift.$$$$ ; \
		sed -e "1s@PERL@$(PERL)@" \
			-e "s@DATE@$(DATE)@" \
			-e "s@COMPRESS@$(COMPRESS)@" \
			-e "s/SUFFIX/$(SUFFIX)/g" \
			< file_shift.$$$$ > file_shift ; \
		rm -f file_shift.$$$$ ; \
		chmod a+x file_shift ; \
		pod2man file_shift > file_shift.1 \
	)

install:
	install file_shift $(BINDIR)
	install file_shift.1 $(MANDIR)
