#
# WebCopy v0.98b7 Site Configuration
#
# Copyright (C) 1994, 1995, 1996 by Victor Parada (vparada@inf.utfsm.cl)
#
# Copy files (recursively) via HTTP protocol.
#
# Syntax: webcopy [options] http://host:port/path/file";
#
# Please read this "License Agreement and Lack of Warranty":
# - The author of this program is Victor Parada <vparada@inf.utfsm.cl>.
# - This program is "Freeware", not "Public Domain".
# - This program must be distributed for free, and cannot be included in
#   commercial packages without prior written permisson from the autor.
# - This program cannot be distributed if modified in any way.
# - This program can be used by anyone if the copyright and this notice
#   remains intact in every file.
# - If you modify this program, please e-mail patches to the the author.
# - This is a Beta version of the program. You have been warned!
# - This program is provided ``AS IS'', without any warranty.
# - This program can cause huge file transfers and all the related effects.
# - This program can fill data disks without notice.
# - Neither the author nor UTFSM are responsible for the use of this program.
# - Bug reports, comments, questions and suggestions are welcome!  But
#   please check first that you have the latest version!
# - The latest version of this program is available at:
#   <URL:ftp://ftp.inf.utfsm.cl/pub/utfsm/perl/webcopy.tgz>
#
# If you use this program, please send e-mail to the author.
# He will try to notify you of any updates made to it.
#

# Select or change one of the following perl interpreters:

PERL=/usr/local/bin/perl
#PERL=/usr/local/ucb/perl
#PERL=/usr/bin/perl
#PERL=/usr/ucb/perl
#PERL=/bin/perl
#PERL=$(HOME)/bin/perl
#PERL=/usr/local/bin/perl4.036
#PERL=

# Select or change one of the following WebCopy destination:

DESTINATION=webcopy.test
#DESTINATION=/usr/local/bin/webcopy
#DESTINATION=/usr/local/ucb/webcopy
#DESTINATION=/usr/bin/webcopy
#DESTINATION=/usr/ucb/webcopy
#DESTINATION=/bin/webcopy
#DESTINATION=$(HOME)/bin/webcopy
#DESTINATION=

# Select default perl interpreter version:

# Use Perl 4:
IGNORE=P5
# Use Perl 5:
#IGNORE=P4

# Uncomment if something goes wrong when running WebCopy:

# Undefined routine:
#ROUTINE=__STDC__
#ROUTINE=_POSIX_C_SOURCE
#ROUTINE=

# Unable to find required lib files:
#INCDIR=/usr/local/lib/perl
#INCDIR=/usr/lib/perl
#INCDIR=/usr/include/perl
#INCDIR=

#
# End of Configuration Section.  Don't change bellow this line
#

SOURCE=webcopy.src

default: webcopy

perl4:
	-mv webcopy webcopy.old
	make webcopy IGNORE=P5

perl5:
	-mv webcopy webcopy.old
	make webcopy IGNORE=P4

webcopy: $(SOURCE) Makefile
	sed -e 's:%PERL%:$(PERL):' \
	  -e 's:%ROUTINE%:$(ROUTINE):g' \
	  -e 's:%INCDIR%:$(INCDIR):g' \
	  -e '/#UNDEFINED#/d' \
	  -e '/#$(IGNORE)/d' $(SOURCE) > webcopy
	chmod 755 webcopy

install: webcopy
	cp webcopy $(DESTINATION)
	chmod 755 $(DESTINATION)

clean:
	-rm webcopy
