SHELL	= /bin/sh

# For now, just hard-coded rules.

CONFIG	= ../conf/access ../conf/aliases ../conf/canonical ../conf/relocated \
	../conf/transport ../conf/virtual ../conf/pcre_table \
	../conf/regexp_table

AWK	= awk '{ print; if (NR == 1) print ".pl 9999" }'

update:	$(CONFIG)

Makefile: Makefile.in
	(set -e; echo "# DO NOT EDIT"; $(OPTS) $(SHELL) ../makedefs; cat $?) >$@

clean:
	:

tidy:	clean

clobber:
	rm -f $(CONFIG)

../conf/access: access
	../mantools/srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@

../conf/aliases: aliases0 aliases
	(cat aliases0; ../mantools/srctoman - aliases | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /') >$@

../conf/canonical: canonical
	../mantools/srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@

../conf/pcre_table: pcre_table
	../mantools/srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@

../conf/regexp_table: regexp_table
	../mantools/srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@

../conf/relocated: relocated
	../mantools/srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@

../conf/transport: transport
	../mantools/srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@

../conf/virtual: virtual
	../mantools/srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
