#################################################
# Change the following to suit your needs	#
#################################################

# CONFIG defines the parameters file in the ./config directory. If
# you're lucky, your system will already have an appropriate file.
# Otherwise, have a look at config/TEMPLATE for ideas and when you get
# a working version for your system, please mail a copy back to the
# author so that others may benefit from your effort.

CONFIG		= vanilla

# Destination directories for the executable and man page. Note that
# the executable is only used in a .forward so /usr/local/bin may
# not be the most appropriate place - though it doesn't hurt.

BINDIR		= /usr/local/bin
MANDIR		= /usr/local/man/man1


#########################################################
# The following parameters can be defined at run-time	#
# if that is how you prefer to operate, alternatively	#
# set them here and forget about them at run-time.	#
# If you don't set them here or as as run-time option	#
# gup will not run.					#
#########################################################

# ACTIVE_PATH is the full pathname for your news active file. This
# file is used to validate newgroup names.
ACTIVE_PATH	=


# NEWSGROUPS_PATH is the fill pathname for your newsgroups file. This
# file is used to provide descriptions for each newsgroup.
NEWSGROUPS_PATH	=

# BACKSTOP_MAILID is used if gup cannot find a FROM: or a REPLY-TO: or
# a valid site command, this is where the mail goes to.
BACKSTOP_MAILID	=	news

# MAIL_COMMAND is the mailer that accepts a mail with rfc822 headers and
# body from stdin.
MAIL_COMMAND	=	"/usr/lib/sendmail -t"

# With a command like "include alt.*" the resultant list is, long.
# LOG_MATCH_LIMIT, defines the upper bound on the number of pattern
# matches that will be printed out for the include, exclude and delete
# commands.
LOG_MATCH_LIMIT	=	28

# The UMASK to use when creating files and directories.
UMASK	=	022


#################################################
# DO NOT CHANGE ANYTHING AFTER THIS COMMENT	#
#################################################


SHELL	=	/bin/sh

# The idea is to construct the real makefile from ./config/$(CONFIG)
# and main.mk Why? To avoid using include in the makefile - sigh.


all install kit lint:		xmakefile
	make -f xmakefile $@


xmakefile:	Makefile main.mk ./config/$(CONFIG)
	@echo
	@echo	Constructing xmakefile with ./config/$(CONFIG)
	(						\
	cat	./config/$(CONFIG)			;\
	echo	CONFIG=$(CONFIG)			;\
	echo 	BINDIR=$(BINDIR)			;\
	echo 	MANDIR=$(MANDIR)			;\
	echo 	ACTIVE_PATH=$(ACTIVE_PATH)	 	;\
	echo 	NEWSGROUPS_PATH=$(NEWSGROUPS_PATH)	;\
	echo 	BACKSTOP_MAILID=$(BACKSTOP_MAILID) 	;\
	echo 	MAIL_COMMAND=$(MAIL_COMMAND)	 	;\
	echo 	LOG_MATCH_LIMIT=$(LOG_MATCH_LIMIT) 	;\
	echo 	UMASK=$(UMASK)			 	;\
	cat	main.mk					;\
	) >xmakefile
	@echo

clean:	xmakefile
	make -f xmakefile clean
	rm -f xmakefile
