# Makefile for p4checkpoint
PERL = /usr/local/bin/perl
P4 = /usr/local/bin/p4
P4D = /usr/local/bin/p4d
# Installation targets:
PREFIX = /usr/local
INSTALLBIN = $(PREFIX)/bin
INSTALLMAN = $(PREFIX)/man
INSTALLMAN1DIR = $(INSTALLMAN)/man1
# Identity:
NAME = p4checkpoint
VERSION = 0.06
DISTNAME = $(NAME)
DIST = README Makefile p4checkpoint.in
all: $(NAME) $(NAME).1
$(NAME): $(NAME).in
sed -e 's|@@Perl@@|$(PERL)|g' -e 's|@@Name@@|$(NAME)|g' \
-e 's|@@Version@@|$(VERSION)|g' -e 's|@@P4@@|$(P4)|g' \
-e 's|@@P4d@@|$(P4D)|g' $< > $@
chmod +x $@
$(NAME).1: $(NAME)
pod2man $< $(NAME).1
install:
$(MAKE) all
install -d $(INSTALLBIN)
install -c $(NAME) $(INSTALLBIN)
install -d $(INSTALLMAN1DIR)
install -c $(NAME).1 $(INSTALLMAN1DIR)
dist:
ln -s . $(DISTNAME)-$(VERSION)
tar cvf $(DISTNAME)-$(VERSION).tar $(DIST:%=$(DISTNAME)-$(VERSION)/%)
$(RM) $(DISTNAME)-$(VERSION)
gzip $(DISTNAME)-$(VERSION).tar
clean:
$(RM) $(NAME) $(NAME).1