# This file is automatically generated, do not edit.
SHELL=/bin/sh
default: it

all: \
it installer mysql pgsql sqlite3 man

alloc.0: \
alloc.3
	nroff -man alloc.3 > alloc.0

alloc.a: \
makelib alloc.lo alloc_re.lo
	./makelib alloc.a alloc.lo alloc_re.lo

alloc.lo: \
libcompile alloc.c alloc.h error.h
	./libcompile alloc.c

alloc_re.lo: \
libcompile alloc_re.c alloc.h byte.h
	./libcompile alloc_re.c

altpath.lo: \
libcompile altpath.c stralloc.h gen_alloc.h config.h stralloc.h gen_alloc.h die.h hasattribute.h env.h error.h open.h slurp.h altpath.h idx.h auto_etc.h
	./libcompile altpath.c

author.lo: \
libcompile author.c die.h hasattribute.h mime.h stralloc.h gen_alloc.h
	./libcompile author.c

auto_bin.c: \
auto-str conf-bin
	./auto-str auto_bin EZMLM_BIN <conf-bin >auto_bin.c

auto_bin.lo: \
libcompile auto_bin.c
	./libcompile auto_bin.c

auto-ccld.sh: \
conf-cc conf-cclo conf-ld conf-ldso warn-auto.sh
	( cat warn-auto.sh; \
	echo CC=\'`head -n 1 conf-cc`\'; \
	echo CCLO=\'`head -n 1 conf-cclo`\'; \
	echo LD=\'`head -n 1 conf-ld`\'; \
	echo LDSO=\'`head -n 1 conf-ldso`\'; \
	) > auto-ccld.sh

auto_cron.c: \
auto-str conf-cron
	./auto-str auto_cron <conf-cron >auto_cron.c

auto_cron.lo: \
libcompile auto_cron.c
	./libcompile auto_cron.c

auto_etc.c: \
auto-str conf-etc
	./auto-str auto_etc EZMLM_ETC <conf-etc >auto_etc.c

auto_etc.lo: \
libcompile auto_etc.c
	./libcompile auto_etc.c

auto_lib.c: \
auto-str conf-lib
	./auto-str auto_lib EZMLM_LIB <conf-lib >auto_lib.c

auto_lib.lo: \
libcompile auto_lib.c
	./libcompile auto_lib.c

auto_qmail.c: \
auto-str conf-qmail
	./auto-str auto_qmail <conf-qmail >auto_qmail.c

auto_qmail.lo: \
libcompile auto_qmail.c
	./libcompile auto_qmail.c

auto-str: \
load auto-str.o substdio.a error.a str.a
	./load auto-str substdio.a error.a str.a 

auto-str.o: \
compile auto-str.c str.h subfd.h substdio.h readwrite.h exit.h
	./compile auto-str.c

auto_version.c: \
auto-str VERSION
	./auto-str auto_version < VERSION > auto_version.c

auto_version.lo: \
libcompile auto_version.c
	./libcompile auto_version.c

byte_chr.lo: \
libcompile byte_chr.c byte.h
	./libcompile byte_chr.c

byte_copy.lo: \
libcompile byte_copy.c byte.h
	./libcompile byte_copy.c

byte_cr.lo: \
libcompile byte_cr.c byte.h
	./libcompile byte_cr.c

byte_diff.lo: \
libcompile byte_diff.c byte.h
	./libcompile byte_diff.c

byte_rchr.lo: \
libcompile byte_rchr.c byte.h
	./libcompile byte_rchr.c

byte_zero.lo: \
libcompile byte_zero.c byte.h
	./libcompile byte_zero.c

case.0: \
case.3
	nroff -man case.3 > case.0

case_diffb.lo: \
libcompile case_diffb.c case.h
	./libcompile case_diffb.c

case_diffs.lo: \
libcompile case_diffs.c case.h
	./libcompile case_diffs.c

case_lowerb.lo: \
libcompile case_lowerb.c case.h
	./libcompile case_lowerb.c

case_startb.lo: \
libcompile case_startb.c case.h
	./libcompile case_startb.c

case_starts.lo: \
libcompile case_starts.c case.h
	./libcompile case_starts.c

choose: \
warn-auto.sh choose.sh
	cat warn-auto.sh choose.sh > choose
	chmod 755 choose

clean: \
TARGETS
	rm -f `cat TARGETS`

compile: \
make-compile warn-auto.sh systype
	( cat warn-auto.sh; ./make-compile "`cat systype`" ) > compile
	chmod 755 compile

concatHDR.lo: \
libcompile concatHDR.c stralloc.h gen_alloc.h strerr.h hasattribute.h case.h byte.h mime.h stralloc.h gen_alloc.h messages.h die.h hasattribute.h idx.h
	./libcompile concatHDR.c

config.lo: \
libcompile config.c byte.h config.h stralloc.h gen_alloc.h die.h hasattribute.h messages.h getconf.h idx.h slurp.h str.h strerr.h hasattribute.h wrap.h
	./libcompile config.c

constmap.lo: \
libcompile constmap.c constmap.h alloc.h case.h
	./libcompile constmap.c

cookie.lo: \
libcompile cookie.c cookie.h str.h uint32.h surfpcs.h uint32.h
	./libcompile cookie.c

copy.lo: \
libcompile copy.c stralloc.h gen_alloc.h substdio.h strerr.h hasattribute.h str.h getln.h case.h readwrite.h qmail.h substdio.h stralloc.h gen_alloc.h messages.h error.h quote.h copy.h cookie.h datetime.h mime.h stralloc.h gen_alloc.h altpath.h byte.h cookie.h datetime.h die.h hasattribute.h fmt.h idx.h config.h stralloc.h gen_alloc.h
	./libcompile copy.c

crypt.lib: \
compile load trylib.c
	( ( ./compile trylib.c && ./load trylib -lcrypt ) >/dev/null 2>&1 && echo -lcrypt || exit 0 ) >crypt.lib
	rm -f trylib.o trylib

date2yyyymm.lo: \
libcompile date2yyyymm.c yyyymm.h stralloc.h gen_alloc.h
	./libcompile date2yyyymm.c

date822fmt.lo: \
libcompile date822fmt.c datetime.h fmt.h date822fmt.h
	./libcompile date822fmt.c

dateline.lo: \
libcompile dateline.c fmt.h yyyymm.h stralloc.h gen_alloc.h stralloc.h gen_alloc.h cgi.h hasattribute.h
	./libcompile dateline.c

datetime.0: \
datetime.3
	nroff -man datetime.3 > datetime.0

datetime.lo: \
libcompile datetime.c datetime.h
	./libcompile datetime.c

decodeB.lo: \
libcompile decodeB.c stralloc.h gen_alloc.h strerr.h hasattribute.h uint32.h messages.h die.h hasattribute.h idx.h
	./libcompile decodeB.c

decodeHDR.lo: \
libcompile decodeHDR.c stralloc.h gen_alloc.h strerr.h hasattribute.h error.h case.h byte.h uint32.h mime.h stralloc.h gen_alloc.h messages.h die.h hasattribute.h idx.h
	./libcompile decodeHDR.c

decodeQ.lo: \
libcompile decodeQ.c stralloc.h gen_alloc.h strerr.h hasattribute.h messages.h mime.h stralloc.h gen_alloc.h die.h hasattribute.h idx.h
	./libcompile decodeQ.c

die_badaddr.lo: \
libcompile die_badaddr.c strerr.h hasattribute.h messages.h die.h hasattribute.h
	./libcompile die_badaddr.c

die_badformat.lo: \
libcompile die_badformat.c strerr.h hasattribute.h messages.h die.h hasattribute.h
	./libcompile die_badformat.c

die_dow.lo: \
libcompile die_dow.c strerr.h hasattribute.h messages.h die.h hasattribute.h
	./libcompile die_dow.c

die_nomem.lo: \
libcompile die_nomem.c strerr.h hasattribute.h messages.h die.h hasattribute.h
	./libcompile die_nomem.c

die_sender.lo: \
libcompile die_sender.c strerr.h hasattribute.h messages.h die.h hasattribute.h
	./libcompile die_sender.c

die_usage.lo: \
libcompile die_usage.c strerr.h hasattribute.h messages.h die.h hasattribute.h
	./libcompile die_usage.c

direntry.0: \
direntry.3
	nroff -man direntry.3 > direntry.0

direntry.h: \
compile trydrent.c direntry.h1 direntry.h2
	( ./compile trydrent.c >/dev/null 2>&1 \
	&& cat direntry.h2 || cat direntry.h1 ) > direntry.h
	rm -f trydrent.o

dl.lib: \
compile load trylib.c
	( ( ./compile trylib.c && ./load trylib -ldl ) >/dev/null 2>&1 && echo -ldl || exit 0 ) >dl.lib
	rm -f trylib.o trylib

dmarc.lo: \
libcompile dmarc.c byte.h die.h hasattribute.h dmarc.h stralloc.h gen_alloc.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h str.h
	./libcompile dmarc.c

dns_dfd.lo: \
libcompile dns_dfd.c error.h alloc.h byte.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_dfd.c

dns_domain.lo: \
libcompile dns_domain.c error.h alloc.h case.h byte.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_domain.c

dns_dtda.lo: \
libcompile dns_dtda.c stralloc.h gen_alloc.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_dtda.c

dns_ip.lo: \
libcompile dns_ip.c stralloc.h gen_alloc.h uint16.h byte.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_ip.c

dns_ipq.lo: \
libcompile dns_ipq.c stralloc.h gen_alloc.h case.h byte.h str.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_ipq.c

dns_mx.lo: \
libcompile dns_mx.c stralloc.h gen_alloc.h byte.h uint16.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_mx.c

dns_name.lo: \
libcompile dns_name.c stralloc.h gen_alloc.h uint16.h byte.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_name.c

dns_nd.lo: \
libcompile dns_nd.c byte.h fmt.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_nd.c

dns_packet.lo: \
libcompile dns_packet.c error.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_packet.c

dns_random.lo: \
libcompile dns_random.c dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h taia.h tai.h uint64.h uint32.h
	./libcompile dns_random.c

dns_rcip.lo: \
libcompile dns_rcip.c taia.h tai.h uint64.h openreadclose.h stralloc.h gen_alloc.h byte.h ip4.h env.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_rcip.c

dns_rcrw.lo: \
libcompile dns_rcrw.c taia.h tai.h uint64.h env.h byte.h str.h openreadclose.h stralloc.h gen_alloc.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_rcrw.c

dns_resolve.lo: \
libcompile dns_resolve.c iopause.h taia.h tai.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_resolve.c

dns_sortip.lo: \
libcompile dns_sortip.c byte.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_sortip.c

dns_transmit.lo: \
libcompile dns_transmit.c socket.h uint16.h alloc.h error.h byte.h uint16.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_transmit.c

dns_txt.lo: \
libcompile dns_txt.c stralloc.h gen_alloc.h uint16.h byte.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h
	./libcompile dns_txt.c

encodeB.lo: \
libcompile encodeB.c stralloc.h gen_alloc.h uint32.h mime.h stralloc.h gen_alloc.h strerr.h hasattribute.h messages.h die.h hasattribute.h idx.h
	./libcompile encodeB.c

encodeQ.lo: \
libcompile encodeQ.c messages.h mime.h stralloc.h gen_alloc.h stralloc.h gen_alloc.h strerr.h hasattribute.h die.h hasattribute.h idx.h
	./libcompile encodeQ.c

env.0: \
env.3
	nroff -man env.3 > env.0

env.lo: \
libcompile env.c str.h alloc.h env.h
	./libcompile env.c

envread.lo: \
libcompile envread.c env.h str.h
	./libcompile envread.c

error.0: \
error.3
	nroff -man error.3 > error.0

error.a: \
makelib error.lo error_str.lo
	./makelib error.a error.lo error_str.lo

error.lo: \
libcompile error.c error.h
	./libcompile error.c

error_str.0: \
error_str.3
	nroff -man error_str.3 > error_str.0

error_str.lo: \
libcompile error_str.c error.h
	./libcompile error_str.c

error_temp.0: \
error_temp.3
	nroff -man error_temp.3 > error_temp.0

ezmlm.0: \
ezmlm.5
	nroff -man ezmlm.5 > ezmlm.0

ezmlm-accept.0: \
ezmlm-accept.1
	nroff -man ezmlm-accept.1 > ezmlm-accept.0

ezmlm-accept: \
warn-auto.sh ezmlm-accept.sh
	cat warn-auto.sh ezmlm-accept.sh > ezmlm-accept
	chmod 755 ezmlm-accept

ezmlm-archive.0: \
ezmlm-archive.1
	nroff -man ezmlm-archive.1 > ezmlm-archive.0

ezmlm-archive: \
load ezmlm-archive.o libezmlm.a
	./load ezmlm-archive -lezmlm 

ezmlm-archive.o: \
compile ezmlm-archive.c alloc.h byte.h error.h stralloc.h gen_alloc.h str.h sig.h getconf.h strerr.h hasattribute.h getln.h substdio.h readwrite.h fmt.h getconfopt.h idxthread.h idx.h makehash.h lock.h open.h scan.h die.h hasattribute.h wrap.h idx.h messages.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-archive.c

ezmlm-cgi.0: \
ezmlm-cgi.1
	nroff -man ezmlm-cgi.1 > ezmlm-cgi.0

ezmlm-cgi: \
load ezmlm-cgi.o libezmlm.a
	./load ezmlm-cgi -lezmlm 

ezmlm-cgi.o: \
compile ezmlm-cgi.c alloc.h direntry.h datetime.h now.h datetime.h stralloc.h gen_alloc.h strerr.h hasattribute.h error.h env.h sig.h open.h getln.h case.h scan.h str.h fmt.h readwrite.h fork.h wait.h exit.h substdio.h getconf.h gen_alloc.h gen_allocdefs.h constmap.h byte.h subdb.h stralloc.h gen_alloc.h messages.h makehash.h mime.h stralloc.h gen_alloc.h wrap.h die.h hasattribute.h idx.h yyyymm.h stralloc.h gen_alloc.h cgi.h hasattribute.h auto_etc.h
	./compile ezmlm-cgi.c

ezmlm-check.0: \
ezmlm-check.1
	nroff -man ezmlm-check.1 > ezmlm-check.0

ezmlm-check: \
warn-auto.sh ezmlm-check.sh
	cat warn-auto.sh ezmlm-check.sh > ezmlm-check
	chmod 755 ezmlm-check

ezmlm-checksub.0: \
ezmlm-checksub.1
	nroff -man ezmlm-checksub.1 > ezmlm-checksub.0

ezmlm-checksub: \
load ezmlm-checksub.o libezmlm.a dl.lib
	./load ezmlm-checksub -lezmlm  `cat dl.lib`

ezmlm-checksub.o: \
compile ezmlm-checksub.c strerr.h hasattribute.h env.h sender.h str.h subdb.h stralloc.h gen_alloc.h subfd.h substdio.h getconfopt.h messages.h die.h hasattribute.h idx.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-checksub.c

ezmlm-clean.0: \
ezmlm-clean.1
	nroff -man ezmlm-clean.1 > ezmlm-clean.0

ezmlm-clean: \
load ezmlm-clean.o libezmlm.a
	./load ezmlm-clean -lezmlm 

ezmlm-clean.o: \
compile ezmlm-clean.c error.h stralloc.h gen_alloc.h str.h env.h sig.h getconf.h getconfopt.h strerr.h hasattribute.h byte.h getln.h case.h qmail.h substdio.h stralloc.h gen_alloc.h substdio.h readwrite.h seek.h quote.h datetime.h now.h datetime.h direntry.h cookie.h fmt.h messages.h copy.h cookie.h datetime.h open.h scan.h lock.h hdr.h die.h hasattribute.h idx.h mime.h stralloc.h gen_alloc.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-clean.c

ezmlm-confirm.0: \
ezmlm-confirm.1
	nroff -man ezmlm-confirm.1 > ezmlm-confirm.0

ezmlm-confirm: \
load ezmlm-confirm.o libezmlm.a
	./load ezmlm-confirm -lezmlm 

ezmlm-confirm.o: \
compile ezmlm-confirm.c error.h case.h stralloc.h gen_alloc.h str.h env.h sender.h error.h sig.h fork.h wait.h strerr.h hasattribute.h byte.h getln.h qmail.h substdio.h stralloc.h gen_alloc.h substdio.h readwrite.h seek.h quote.h datetime.h now.h datetime.h fmt.h getconfopt.h cookie.h messages.h copy.h cookie.h datetime.h open.h lock.h wrap.h die.h hasattribute.h idx.h mime.h stralloc.h gen_alloc.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-confirm.c

ezmlm-cron.0: \
ezmlm-cron.1
	nroff -man ezmlm-cron.1 > ezmlm-cron.0

ezmlm-cron: \
load ezmlm-cron.o libezmlm.a
	./load ezmlm-cron -lezmlm 

ezmlm-cron.o: \
compile ezmlm-cron.c strerr.h hasattribute.h stralloc.h gen_alloc.h getconfopt.h substdio.h error.h str.h fmt.h wait.h readwrite.h sig.h case.h scan.h open.h lock.h byte.h getln.h auto_qmail.h auto_cron.h auto_version.h messages.h die.h hasattribute.h idx.h wrap.h
	./compile ezmlm-cron.c

ezmlm-dispatch.0: \
ezmlm-dispatch.1
	nroff -man ezmlm-dispatch.1 > ezmlm-dispatch.0

ezmlm-dispatch: \
load ezmlm-dispatch.o libezmlm.a
	./load ezmlm-dispatch -lezmlm 

ezmlm-dispatch.o: \
compile ezmlm-dispatch.c env.h sender.h strerr.h hasattribute.h getconfopt.h substdio.h subfd.h substdio.h messages.h error.h byte.h fmt.h str.h stralloc.h gen_alloc.h qmail.h substdio.h stralloc.h gen_alloc.h seek.h wrap.h slurp.h die.h hasattribute.h auto_version.h
	./compile ezmlm-dispatch.c

ezmlm-gate.0: \
ezmlm-gate.1
	nroff -man ezmlm-gate.1 > ezmlm-gate.0

ezmlm-gate: \
load ezmlm-gate.o libezmlm.a dl.lib
	./load ezmlm-gate -lezmlm  `cat dl.lib`

ezmlm-gate.o: \
compile ezmlm-gate.c substdio.h subfd.h substdio.h stralloc.h gen_alloc.h strerr.h hasattribute.h error.h env.h sender.h sig.h str.h seek.h wait.h exit.h getconf.h auto_bin.h getconfopt.h messages.h die.h hasattribute.h idx.h subdb.h stralloc.h gen_alloc.h wrap.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-gate.c

ezmlm-get.0: \
ezmlm-get.1
	nroff -man ezmlm-get.1 > ezmlm-get.0

ezmlm-get: \
load ezmlm-get.o libezmlm.a dl.lib
	./load ezmlm-get -lezmlm  `cat dl.lib`

ezmlm-get.o: \
compile ezmlm-get.c alloc.h error.h stralloc.h gen_alloc.h str.h env.h sender.h sig.h getconf.h strerr.h hasattribute.h byte.h getln.h case.h qmail.h substdio.h stralloc.h gen_alloc.h substdio.h readwrite.h seek.h quote.h datetime.h now.h datetime.h date822fmt.h fmt.h getconfopt.h cookie.h makehash.h copy.h cookie.h datetime.h constmap.h subdb.h stralloc.h gen_alloc.h hdr.h open.h lock.h scan.h idxthread.h idx.h die.h hasattribute.h wrap.h idx.h mime.h stralloc.h gen_alloc.h messages.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-get.c

ezmlm-glconf.0: \
ezmlm-glconf.1
	nroff -man ezmlm-glconf.1 > ezmlm-glconf.0

ezmlm-glconf: \
warn-auto.sh ezmlm-glconf.sh
	cat warn-auto.sh ezmlm-glconf.sh > ezmlm-glconf
	chmod 755 ezmlm-glconf

ezmlmglrc.0: \
ezmlmglrc.5
	nroff -man ezmlmglrc.5 > ezmlmglrc.0

ezmlm-idx.0: \
ezmlm-idx.1
	nroff -man ezmlm-idx.1 > ezmlm-idx.0

ezmlm-idx: \
load ezmlm-idx.o libezmlm.a
	./load ezmlm-idx -lezmlm 

ezmlm-idx.o: \
compile ezmlm-idx.c stralloc.h gen_alloc.h subfd.h substdio.h strerr.h hasattribute.h error.h lock.h slurp.h open.h getln.h getconfopt.h case.h scan.h str.h fmt.h readwrite.h exit.h substdio.h sig.h byte.h die.h hasattribute.h idx.h mime.h stralloc.h gen_alloc.h wrap.h messages.h getconf.h makehash.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-idx.c

ezmlm-idx.spec: \
ezmlm-idx.spec.template VERSION fill-template
	./fill-template ezmlm-idx.spec

ezmlm-import.0: \
ezmlm-import.1
	nroff -man ezmlm-import.1 > ezmlm-import.0

ezmlm-import: \
load ezmlm-import.o libezmlm.a
	./load ezmlm-import -lezmlm 

ezmlm-import.o: \
compile ezmlm-import.c stralloc.h gen_alloc.h getconf.h config.h stralloc.h gen_alloc.h error.h strerr.h hasattribute.h substdio.h lock.h open.h messages.h die.h hasattribute.h wrap.h fmt.h getln.h byte.h idx.h getconfopt.h auto_version.h
	./compile ezmlm-import.c

ezmlm-issubn.0: \
ezmlm-issubn.1
	nroff -man ezmlm-issubn.1 > ezmlm-issubn.0

ezmlm-issubn: \
load ezmlm-issubn.o libezmlm.a dl.lib
	./load ezmlm-issubn -lezmlm  `cat dl.lib`

ezmlm-issubn.o: \
compile ezmlm-issubn.c strerr.h hasattribute.h env.h sender.h subdb.h stralloc.h gen_alloc.h getconfopt.h messages.h die.h hasattribute.h idx.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-issubn.c

ezmlm-limit.0: \
ezmlm-limit.1
	nroff -man ezmlm-limit.1 > ezmlm-limit.0

ezmlm-limit: \
load ezmlm-limit.o libezmlm.a
	./load ezmlm-limit -lezmlm 

ezmlm-limit.o: \
compile ezmlm-limit.c stralloc.h gen_alloc.h substdio.h readwrite.h strerr.h hasattribute.h sig.h lock.h getconf.h fmt.h now.h datetime.h getconfopt.h error.h scan.h open.h messages.h die.h hasattribute.h config.h stralloc.h gen_alloc.h idx.h
	./compile ezmlm-limit.c

ezmlm-list.0: \
ezmlm-list.1
	nroff -man ezmlm-list.1 > ezmlm-list.0

ezmlm-list: \
load ezmlm-list.o libezmlm.a dl.lib
	./load ezmlm-list -lezmlm  `cat dl.lib`

ezmlm-list.o: \
compile ezmlm-list.c strerr.h hasattribute.h readwrite.h substdio.h subfd.h substdio.h subdb.h stralloc.h gen_alloc.h exit.h fmt.h getconfopt.h messages.h die.h hasattribute.h idx.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-list.c

ezmlm-make.0: \
ezmlm-make.1
	nroff -man ezmlm-make.1 > ezmlm-make.0

ezmlm-make: \
load ezmlm-make.o libezmlm.a dl.lib
	./load ezmlm-make -lezmlm  `cat dl.lib`

ezmlm-make.o: \
compile ezmlm-make.c sgetopt.h subgetopt.h stralloc.h gen_alloc.h strerr.h hasattribute.h exit.h readwrite.h byte.h open.h substdio.h subdb.h stralloc.h gen_alloc.h str.h wrap.h auto_bin.h getln.h error.h lock.h messages.h die.h hasattribute.h idx.h auto_etc.h auto_version.h
	./compile ezmlm-make.c

ezmlm-manage.0: \
ezmlm-manage.1
	nroff -man ezmlm-manage.1 > ezmlm-manage.0

ezmlm-manage: \
load ezmlm-manage.o libezmlm.a dl.lib
	./load ezmlm-manage -lezmlm  `cat dl.lib`

ezmlm-manage.o: \
compile ezmlm-manage.c error.h stralloc.h gen_alloc.h str.h env.h sender.h sig.h slurp.h getconf.h strerr.h hasattribute.h byte.h getln.h case.h qmail.h substdio.h stralloc.h gen_alloc.h substdio.h readwrite.h seek.h quote.h datetime.h now.h datetime.h fmt.h subdb.h stralloc.h gen_alloc.h cookie.h getconfopt.h copy.h cookie.h datetime.h messages.h open.h lock.h scan.h mime.h stralloc.h gen_alloc.h hdr.h die.h hasattribute.h wrap.h idx.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-manage.c

ezmlm-moderate.0: \
ezmlm-moderate.1
	nroff -man ezmlm-moderate.1 > ezmlm-moderate.0

ezmlm-moderate: \
load ezmlm-moderate.o libezmlm.a
	./load ezmlm-moderate -lezmlm 

ezmlm-moderate.o: \
compile ezmlm-moderate.c error.h case.h stralloc.h gen_alloc.h str.h env.h sender.h error.h sig.h wait.h strerr.h hasattribute.h byte.h getln.h qmail.h substdio.h stralloc.h gen_alloc.h substdio.h subfd.h substdio.h readwrite.h seek.h quote.h datetime.h now.h datetime.h fmt.h getconfopt.h cookie.h messages.h copy.h cookie.h datetime.h hdr.h mime.h stralloc.h gen_alloc.h open.h lock.h die.h hasattribute.h idx.h wrap.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-moderate.c

ezmlmrc.0: \
ezmlmrc.5
	nroff -man ezmlmrc.5 > ezmlmrc.0

ezmlmrc.all: \
lang/ch_GB/ezmlmrc lang/cs/ezmlmrc lang/da/ezmlmrc lang/de/ezmlmrc lang/en_US/ezmlmrc lang/es/ezmlmrc lang/fr/ezmlmrc lang/hu/ezmlmrc lang/id/ezmlmrc lang/it/ezmlmrc lang/ja/ezmlmrc lang/nl/ezmlmrc lang/pl/ezmlmrc lang/pt/ezmlmrc lang/pt_BR/ezmlmrc lang/ru/ezmlmrc lang/sv/ezmlmrc

ezmlmrc: \
ezmlmrc.template VERSION fill-template
	./fill-template ezmlmrc

ezmlm-receipt.0: \
ezmlm-receipt.1
	nroff -man ezmlm-receipt.1 > ezmlm-receipt.0

ezmlm-reject.0: \
ezmlm-reject.1
	nroff -man ezmlm-reject.1 > ezmlm-reject.0

ezmlm-reject: \
load ezmlm-reject.o libezmlm.a
	./load ezmlm-reject -lezmlm 

ezmlm-reject.o: \
compile ezmlm-reject.c strerr.h hasattribute.h substdio.h byte.h case.h str.h readwrite.h stralloc.h gen_alloc.h getln.h getconfopt.h getconf.h constmap.h fmt.h qmail.h substdio.h stralloc.h gen_alloc.h seek.h scan.h env.h sender.h messages.h mime.h stralloc.h gen_alloc.h die.h hasattribute.h idx.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-reject.c

ezmlm-request.0: \
ezmlm-request.1
	nroff -man ezmlm-request.1 > ezmlm-request.0

ezmlm-request: \
load ezmlm-request.o libezmlm.a dl.lib
	./load ezmlm-request -lezmlm  `cat dl.lib`

ezmlm-request.o: \
compile ezmlm-request.c stralloc.h gen_alloc.h subfd.h substdio.h strerr.h hasattribute.h error.h qmail.h substdio.h stralloc.h gen_alloc.h env.h sender.h sig.h open.h getln.h case.h str.h datetime.h now.h datetime.h quote.h readwrite.h exit.h substdio.h getconf.h constmap.h fmt.h getconfopt.h byte.h seek.h messages.h copy.h cookie.h datetime.h cookie.h subdb.h stralloc.h gen_alloc.h mime.h stralloc.h gen_alloc.h hdr.h die.h hasattribute.h idx.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-request.c

ezmlm-return.0: \
ezmlm-return.1
	nroff -man ezmlm-return.1 > ezmlm-return.0

ezmlm-return: \
load ezmlm-return.o libezmlm.a dl.lib
	./load ezmlm-return -lezmlm  `cat dl.lib`

ezmlm-return.o: \
compile ezmlm-return.c direntry.h stralloc.h gen_alloc.h str.h env.h sender.h sig.h strerr.h hasattribute.h byte.h case.h open.h scan.h lock.h slurpclose.h getln.h substdio.h error.h quote.h readwrite.h fmt.h now.h datetime.h cookie.h getconfopt.h subdb.h stralloc.h gen_alloc.h messages.h die.h hasattribute.h wrap.h config.h stralloc.h gen_alloc.h idx.h auto_version.h
	./compile ezmlm-return.c

ezmlm-rmtab.0: \
ezmlm-rmtab.1
	nroff -man ezmlm-rmtab.1 > ezmlm-rmtab.0

ezmlm-rmtab: \
load ezmlm-rmtab.o libezmlm.a dl.lib
	./load ezmlm-rmtab -lezmlm  `cat dl.lib`

ezmlm-rmtab.o: \
compile ezmlm-rmtab.c strerr.h hasattribute.h readwrite.h substdio.h subfd.h substdio.h subdb.h stralloc.h gen_alloc.h exit.h fmt.h getconfopt.h messages.h die.h hasattribute.h idx.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-rmtab.c

ezmlm-send.0: \
ezmlm-send.1
	nroff -man ezmlm-send.1 > ezmlm-send.0

ezmlm-send: \
load ezmlm-send.o libezmlm.a dl.lib
	./load ezmlm-send -lezmlm  `cat dl.lib`

ezmlm-send.o: \
compile ezmlm-send.c stralloc.h gen_alloc.h subfd.h substdio.h strerr.h hasattribute.h error.h qmail.h substdio.h stralloc.h gen_alloc.h env.h sender.h lock.h sig.h open.h getln.h case.h scan.h str.h fmt.h readwrite.h exit.h substdio.h getconf.h constmap.h byte.h getconfopt.h quote.h subdb.h stralloc.h gen_alloc.h mime.h stralloc.h gen_alloc.h messages.h makehash.h cookie.h dmarc.h stralloc.h gen_alloc.h hdr.h die.h hasattribute.h wrap.h idx.h copy.h cookie.h datetime.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-send.c

ezmlm-split.0: \
ezmlm-split.1
	nroff -man ezmlm-split.1 > ezmlm-split.0

ezmlm-split: \
load ezmlm-split.o libezmlm.a
	./load ezmlm-split -lezmlm 

ezmlm-split.o: \
compile ezmlm-split.c error.h stralloc.h gen_alloc.h str.h env.h sender.h sig.h open.h scan.h strerr.h hasattribute.h byte.h getln.h case.h qmail.h substdio.h stralloc.h gen_alloc.h getconfopt.h subfd.h substdio.h readwrite.h quote.h now.h datetime.h uint32.h subhash.h fmt.h messages.h die.h hasattribute.h config.h stralloc.h gen_alloc.h idx.h auto_version.h
	./compile ezmlm-split.c

ezmlm-store.0: \
ezmlm-store.1
	nroff -man ezmlm-store.1 > ezmlm-store.0

ezmlm-store: \
load ezmlm-store.o libezmlm.a dl.lib
	./load ezmlm-store -lezmlm  `cat dl.lib`

ezmlm-store.o: \
compile ezmlm-store.c stralloc.h gen_alloc.h subfd.h substdio.h strerr.h hasattribute.h error.h qmail.h substdio.h stralloc.h gen_alloc.h env.h sender.h lock.h sig.h open.h getln.h str.h fmt.h readwrite.h wait.h exit.h substdio.h getconf.h datetime.h now.h datetime.h cookie.h getconfopt.h messages.h byte.h case.h quote.h hdr.h die.h hasattribute.h idx.h copy.h cookie.h datetime.h subdb.h stralloc.h gen_alloc.h mime.h stralloc.h gen_alloc.h wrap.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-store.c

ezmlm-sub.0: \
ezmlm-sub.1
	nroff -man ezmlm-sub.1 > ezmlm-sub.0

ezmlm-sub: \
load ezmlm-sub.o ezmlm-subunsub.o libezmlm.a dl.lib
	./load ezmlm-sub ezmlm-subunsub.o -lezmlm  `cat dl.lib`

ezmlm-sub.o: \
compile ezmlm-sub.c hasattribute.h
	./compile ezmlm-sub.c

ezmlmsubrc.0: \
ezmlmsubrc.5
	nroff -man ezmlmsubrc.5 > ezmlmsubrc.0

ezmlm-subunsub.o: \
compile ezmlm-subunsub.c strerr.h hasattribute.h subdb.h stralloc.h gen_alloc.h getconfopt.h str.h stralloc.h gen_alloc.h substdio.h subfd.h substdio.h readwrite.h getln.h scan.h messages.h die.h hasattribute.h idx.h config.h stralloc.h gen_alloc.h auto_version.h
	./compile ezmlm-subunsub.c

ezmlm-test.0: \
ezmlm-test.1
	nroff -man ezmlm-test.1 > ezmlm-test.0

ezmlm-test: \
warn-auto.sh conf-qmail VERSION Makefile tests/00-config tests/01-misc tests/02-functions tests/09-getconfopt tests/100-ezmlm-make tests/110-ezmlm-reject tests/115-ezmlm-sub tests/116-ezmlm-checksub tests/119-ezmlm-nosql tests/119-ezmlm-sql tests/120-ezmlm-send tests/125-ezmlm-tstdig tests/130-ezmlm-weed tests/135-ezmlmrc tests/140-ezmlm-clean tests/145-ezmlm-store tests/150-ezmlm-return tests/155-ezmlm-warn tests/160-ezmlm-manage tests/165-ezmlm-request tests/170-ezmlm-split tests/180-ezmlm-gate tests/210-ezmlm-idx tests/221-ezmlm-get-index tests/222-ezmlm-get-get tests/223-ezmlm-get-thread tests/225-ezmlm-get-digest tests/260-ezmlm-manage tests/270-ezmlm-moderate tests/280-ezmlm-warn tests/290-ezmlm-archive tests/300-ezmlm-dispatch tests/310-dispatch-editor tests/400-decode-sender tests/500-export tests/504-flags tests/505-substs tests/506-messages tests/510-ezmlm-manage-subnop tests/510-ezmlm-manage-unsubnop tests/511-ezmlm-manage-subprobe tests/511-ezmlm-manage-unsubprobe tests/512-ezmlm-manage-subscribe tests/512-ezmlm-manage-unsubscribe tests/513-ezmlm-manage-modsub tests/513-ezmlm-manage-modunsub tests/514-ezmlm-manage-subbymod tests/514-ezmlm-manage-unsubbymod tests/519-ezmlm-manage-copylines tests/550-ezmlm-send tests/551-ezmlm-send-rewritefrom tests/560-addtrailer tests/570-omitbottom tests/90-cleanup tests/99-bugs
	(cat warn-auto.sh; \
	echo VER=\"`head -n 1 VERSION`\"; \
	cat tests/*-* ) >ezmlm-test;
	chmod 755 ezmlm-test

ezmlm-tstdig.0: \
ezmlm-tstdig.1
	nroff -man ezmlm-tstdig.1 > ezmlm-tstdig.0

ezmlm-tstdig: \
load ezmlm-tstdig.o libezmlm.a
	./load ezmlm-tstdig -lezmlm 

ezmlm-tstdig.o: \
compile ezmlm-tstdig.c stralloc.h gen_alloc.h substdio.h readwrite.h strerr.h hasattribute.h sig.h getconf.h env.h fmt.h now.h datetime.h lock.h getconfopt.h messages.h scan.h case.h str.h open.h die.h hasattribute.h wrap.h idx.h config.h stralloc.h gen_alloc.h
	./compile ezmlm-tstdig.c

ezmlm-unsub.0: \
ezmlm-unsub.1
	nroff -man ezmlm-unsub.1 > ezmlm-unsub.0

ezmlm-unsub: \
load ezmlm-unsub.o ezmlm-subunsub.o libezmlm.a dl.lib
	./load ezmlm-unsub ezmlm-subunsub.o -lezmlm  `cat dl.lib`

ezmlm-unsub.o: \
compile ezmlm-unsub.c hasattribute.h
	./compile ezmlm-unsub.c

ezmlm-warn.0: \
ezmlm-warn.1
	nroff -man ezmlm-warn.1 > ezmlm-warn.0

ezmlm-warn: \
load ezmlm-warn.o libezmlm.a dl.lib
	./load ezmlm-warn -lezmlm  `cat dl.lib`

ezmlm-warn.o: \
compile ezmlm-warn.c direntry.h readwrite.h getln.h substdio.h stralloc.h gen_alloc.h slurp.h getconfopt.h getconf.h byte.h error.h str.h strerr.h hasattribute.h sig.h now.h datetime.h fmt.h cookie.h qmail.h substdio.h stralloc.h gen_alloc.h messages.h quote.h open.h scan.h lock.h copy.h cookie.h datetime.h mime.h stralloc.h gen_alloc.h hdr.h die.h hasattribute.h wrap.h idx.h config.h stralloc.h gen_alloc.h subdb.h stralloc.h gen_alloc.h
	./compile ezmlm-warn.c

ezmlm-weed.0: \
ezmlm-weed.1
	nroff -man ezmlm-weed.1 > ezmlm-weed.0

ezmlm-weed: \
load ezmlm-weed.o libezmlm.a
	./load ezmlm-weed -lezmlm 

ezmlm-weed.o: \
compile ezmlm-weed.c stralloc.h gen_alloc.h str.h byte.h case.h readwrite.h substdio.h subfd.h substdio.h getln.h strerr.h hasattribute.h messages.h mime.h stralloc.h gen_alloc.h die.h hasattribute.h
	./compile ezmlm-weed.c

fd_copy.0: \
fd_copy.3
	nroff -man fd_copy.3 > fd_copy.0

fd_copy.lo: \
libcompile fd_copy.c fd.h
	./libcompile fd_copy.c

fd_move.0: \
fd_move.3
	nroff -man fd_move.3 > fd_move.0

fd_move.lo: \
libcompile fd_move.c fd.h
	./libcompile fd_move.c

fill-template: \
warn-auto.sh fill-template.sh
	cat warn-auto.sh fill-template.sh > fill-template
	chmod 755 fill-template

find-systype: \
find-systype.sh auto-ccld.sh
	cat auto-ccld.sh find-systype.sh > find-systype
	chmod 755 find-systype

fmt_str.lo: \
libcompile fmt_str.c fmt.h
	./libcompile fmt_str.c

fmt_uint0.lo: \
libcompile fmt_uint0.c fmt.h
	./libcompile fmt_uint0.c

fmt_uint.lo: \
libcompile fmt_uint.c fmt.h
	./libcompile fmt_uint.c

fmt_ulong.lo: \
libcompile fmt_ulong.c fmt.h
	./libcompile fmt_ulong.c

fs.a: \
makelib fmt_str.lo fmt_uint.lo fmt_uint0.lo fmt_ulong.lo scan_ulong.lo scan_8long.lo
	./makelib fs.a fmt_str.lo fmt_uint.lo fmt_uint0.lo fmt_ulong.lo scan_ulong.lo scan_8long.lo

getconf.lo: \
libcompile getconf.c stralloc.h gen_alloc.h byte.h slurp.h strerr.h hasattribute.h getconf.h altpath.h die.h hasattribute.h config.h stralloc.h gen_alloc.h copy.h cookie.h datetime.h idx.h wrap.h messages.h
	./libcompile getconf.c

getconfopt_copy.lo: \
libcompile getconfopt_copy.c die.h hasattribute.h getconfopt.h stralloc.h gen_alloc.h
	./libcompile getconfopt_copy.c

getconfopt_cstr_flag.lo: \
libcompile getconfopt_cstr_flag.c getconf.h getconfopt.h
	./libcompile getconfopt_cstr_flag.c

getconfopt_cstr.lo: \
libcompile getconfopt_cstr.c getconf.h getconfopt.h stralloc.h gen_alloc.h
	./libcompile getconfopt_cstr.c

getconfopt_flag.lo: \
libcompile getconfopt_flag.c getconf.h getconfopt.h
	./libcompile getconfopt_flag.c

getconfopt.lo: \
libcompile getconfopt.c config.h stralloc.h gen_alloc.h die.h hasattribute.h getconf.h getconfopt.h str.h
	./libcompile getconfopt.c

getconfopt_str.lo: \
libcompile getconfopt_str.c die.h hasattribute.h getconf.h getconfopt.h stralloc.h gen_alloc.h
	./libcompile getconfopt_str.c

getconfopt_ulong_flag.lo: \
libcompile getconfopt_ulong_flag.c getconf.h getconfopt.h
	./libcompile getconfopt_ulong_flag.c

getconfopt_ulong.lo: \
libcompile getconfopt_ulong.c die.h hasattribute.h getconf.h getconfopt.h scan.h
	./libcompile getconfopt_ulong.c

getconfopt_version.lo: \
libcompile getconfopt_version.c auto_version.h getconfopt.h strerr.h hasattribute.h
	./libcompile getconfopt_version.c

getconf_ulong.lo: \
libcompile getconf_ulong.c stralloc.h gen_alloc.h getconf.h die.h hasattribute.h scan.h
	./libcompile getconf_ulong.c

gethdrln.lo: \
libcompile gethdrln.c substdio.h byte.h stralloc.h gen_alloc.h getln.h
	./libcompile gethdrln.c

getln.0: \
getln.3
	nroff -man getln.3 > getln.0

getln2.0: \
getln2.3
	nroff -man getln2.3 > getln2.0

getln2.lo: \
libcompile getln2.c substdio.h stralloc.h gen_alloc.h byte.h getln.h
	./libcompile getln2.c

getln.a: \
makelib getln.lo getln2.lo
	./makelib getln.a getln.lo getln2.lo

getln.lo: \
libcompile getln.c substdio.h byte.h stralloc.h gen_alloc.h getln.h
	./libcompile getln.c

getopt.0: \
getopt.3
	nroff -man getopt.3 > getopt.0

hasattribute.h: \
choose compile hasattribute.h1 hasattribute.h2 tryattribute.c
	./choose c tryattribute hasattribute.h1 hasattribute.h2 > hasattribute.h

hasflock.h: \
tryflock.c compile load
	( ( ./compile tryflock.c && ./load tryflock ) >/dev/null 2>&1 \
	&& echo \#define HASFLOCK 1 || exit 0 ) > hasflock.h
	rm -f tryflock.o tryflock

hassgact.h: \
trysgact.c compile load
	( ( ./compile trysgact.c && ./load trysgact ) >/dev/null 2>&1 \
	&& echo \#define HASSIGACTION 1 || exit 0 ) > hassgact.h
	rm -f trysgact.o trysgact

haswaitp.h: \
choose compile haswaitp.h1 haswaitp.h2 load trywaitp.c
	./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h

hdr_add.lo: \
libcompile hdr_add.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h
	./libcompile hdr_add.c

hdr_boundary.lo: \
libcompile hdr_boundary.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h makehash.h
	./libcompile hdr_boundary.c

hdr_ctboundary.lo: \
libcompile hdr_ctboundary.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h
	./libcompile hdr_ctboundary.c

hdr_datemsgid.lo: \
libcompile hdr_datemsgid.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h stralloc.h gen_alloc.h datetime.h fmt.h date822fmt.h makehash.h die.h hasattribute.h idx.h
	./libcompile hdr_datemsgid.c

hdr_from.lo: \
libcompile hdr_from.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h stralloc.h gen_alloc.h quote.h die.h hasattribute.h idx.h
	./libcompile hdr_from.c

hdr_listsubject.lo: \
libcompile hdr_listsubject.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h stralloc.h gen_alloc.h quote.h die.h hasattribute.h
	./libcompile hdr_listsubject.c

hdr_mime.lo: \
libcompile hdr_mime.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h makehash.h stralloc.h gen_alloc.h str.h
	./libcompile hdr_mime.c

hdr_subject.lo: \
libcompile hdr_subject.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h
	./libcompile hdr_subject.c

hdr_transferenc.lo: \
libcompile hdr_transferenc.c hdr.h qmail.h substdio.h stralloc.h gen_alloc.h
	./libcompile hdr_transferenc.c

idxthread.lo: \
libcompile idxthread.c error.h alloc.h str.h stralloc.h gen_alloc.h strerr.h hasattribute.h lock.h open.h getln.h scan.h byte.h die.h hasattribute.h idx.h messages.h substdio.h fmt.h readwrite.h makehash.h yyyymm.h stralloc.h gen_alloc.h
	./libcompile idxthread.c

install: \
it man installer conf-bin conf-etc conf-lang conf-lib conf-man BIN ETC LIB MAN
	./installer "`head -n 1 conf-bin`" < BIN
	./installer "`head -n 1 conf-etc`" < ETC
	./installer "`head -n 1 conf-man`" < MAN
	./installer "`head -n 1 conf-lib`" < LIB
	rm -f "`head -n 1 conf-etc`"/default
	ln -sf "`head -n 1 conf-lang`" "`head -n 1 conf-etc`"/default

installer: \
load installer.o getln.a strerr.a substdio.a stralloc.a alloc.a open.a error.a str.a fs.a
	./load installer getln.a strerr.a substdio.a stralloc.a alloc.a open.a error.a str.a fs.a 

installer.o: \
compile installer.c substdio.h stralloc.h gen_alloc.h getln.h readwrite.h exit.h open.h error.h strerr.h hasattribute.h byte.h scan.h
	./compile installer.c

iopause.h: \
choose compile load trypoll.c iopause.h1 iopause.h2
	./choose clr trypoll iopause.h1 iopause.h2 > iopause.h

iopause.lo: \
libcompile iopause.c taia.h tai.h uint64.h select.h iopause.h
	./libcompile iopause.c

ip4_scan.lo: \
libcompile ip4_scan.c scan.h ip4.h
	./libcompile ip4_scan.c

it: \
ezmlm-accept ezmlm-archive ezmlm-check ezmlm-checksub ezmlm-cgi ezmlm-clean ezmlm-confirm ezmlm-cron ezmlm-dispatch ezmlm-gate ezmlm-get ezmlm-glconf ezmlm-idx ezmlm-import ezmlm-issubn ezmlm-limit ezmlm-list ezmlm-make ezmlm-manage ezmlm-moderate ezmlm-reject ezmlm-request ezmlm-return ezmlm-rmtab ezmlm-send ezmlm-split ezmlm-store ezmlm-sub ezmlm-tstdig ezmlm-unsub ezmlm-warn ezmlm-weed ezmlm-test sub-std.so ezmlmrc.all messages.all ezmlm-idx.spec test-getconfopt

lang/ch_GB/ezmlmrc: \
makelang ezmlmrc
	./makelang ch_GB

lang/cs/ezmlmrc: \
makelang ezmlmrc
	./makelang cs

lang/cs/text/messages: \
make-messages lang/cs/messages
	./make-messages < lang/cs/messages > lang/cs/text/messages

lang/da/ezmlmrc: \
makelang ezmlmrc
	./makelang da

lang/da/text/messages: \
make-messages lang/da/messages
	./make-messages < lang/da/messages > lang/da/text/messages

lang/de/ezmlmrc: \
makelang ezmlmrc
	./makelang de

lang/de/text/messages: \
make-messages lang/de/messages
	./make-messages < lang/de/messages > lang/de/text/messages

lang/en_US/ezmlmrc: \
makelang ezmlmrc
	./makelang en_US

lang/en_US/text/messages: \
make-messages lang/en_US/messages
	./make-messages < lang/en_US/messages > lang/en_US/text/messages

lang/es/ezmlmrc: \
makelang ezmlmrc
	./makelang es

lang/fr/ezmlmrc: \
makelang ezmlmrc
	./makelang fr

lang/fr/text/messages: \
make-messages lang/fr/messages
	./make-messages < lang/fr/messages > lang/fr/text/messages

lang/hu/ezmlmrc: \
makelang ezmlmrc
	./makelang hu

lang/hu/text/messages: \
make-messages lang/hu/messages
	./make-messages < lang/hu/messages > lang/hu/text/messages

lang/id/ezmlmrc: \
makelang ezmlmrc
	./makelang id

lang/id/text/messages: \
make-messages lang/id/messages
	./make-messages < lang/id/messages > lang/id/text/messages

lang/it/ezmlmrc: \
makelang ezmlmrc
	./makelang it

lang/it/text/messages: \
make-messages lang/it/messages
	./make-messages < lang/it/messages > lang/it/text/messages

lang/ja/ezmlmrc: \
makelang ezmlmrc
	./makelang ja

lang/nl/ezmlmrc: \
makelang ezmlmrc
	./makelang nl

lang/nl/text/messages: \
make-messages lang/nl/messages
	./make-messages < lang/nl/messages > lang/nl/text/messages

lang/pl/ezmlmrc: \
makelang ezmlmrc
	./makelang pl

lang/pl/text/messages: \
make-messages lang/pl/messages
	./make-messages < lang/pl/messages > lang/pl/text/messages

lang/pt_BR/ezmlmrc: \
makelang ezmlmrc
	./makelang pt_BR

lang/pt_BR/text/messages: \
make-messages lang/pt_BR/messages
	./make-messages < lang/pt_BR/messages > lang/pt_BR/text/messages

lang/pt/ezmlmrc: \
makelang ezmlmrc
	./makelang pt

lang/pt/text/messages: \
make-messages lang/pt/messages
	./make-messages < lang/pt/messages > lang/pt/text/messages

lang/ru/ezmlmrc: \
makelang ezmlmrc
	./makelang ru

lang/sv/ezmlmrc: \
makelang ezmlmrc
	./makelang sv

lang/sv/text/messages: \
make-messages lang/sv/messages
	./make-messages < lang/sv/messages > lang/sv/text/messages

libcompile: \
make-libcompile warn-auto.sh systype
	( cat warn-auto.sh; ./make-libcompile "`cat systype`" ) > libcompile
	chmod 755 libcompile

libezmlm.a: \
makelib alloc.lo alloc_re.lo altpath.lo author.lo auto_bin.lo auto_cron.lo auto_etc.lo auto_lib.lo auto_qmail.lo auto_version.lo byte_chr.lo byte_copy.lo byte_cr.lo byte_diff.lo byte_rchr.lo byte_zero.lo case_diffb.lo case_diffs.lo case_lowerb.lo case_startb.lo case_starts.lo concatHDR.lo config.lo constmap.lo cookie.lo copy.lo date2yyyymm.lo date822fmt.lo dateline.lo datetime.lo decodeB.lo decodeHDR.lo decodeQ.lo die_badaddr.lo die_badformat.lo die_dow.lo die_nomem.lo die_sender.lo die_usage.lo dmarc.lo dns_dfd.lo dns_domain.lo dns_dtda.lo dns_ip.lo dns_ipq.lo dns_mx.lo dns_name.lo dns_nd.lo dns_packet.lo dns_random.lo dns_rcip.lo dns_rcrw.lo dns_resolve.lo dns_sortip.lo dns_transmit.lo dns_txt.lo encodeB.lo encodeQ.lo env.lo envread.lo error.lo error_str.lo fd_copy.lo fd_move.lo fmt_str.lo fmt_uint.lo fmt_uint0.lo fmt_ulong.lo getconf.lo getconf_ulong.lo gethdrln.lo getln.lo getln2.lo getconfopt.lo getconfopt_copy.lo getconfopt_cstr.lo getconfopt_cstr_flag.lo getconfopt_flag.lo getconfopt_str.lo getconfopt_ulong.lo getconfopt_ulong_flag.lo getconfopt_version.lo hdr_add.lo hdr_boundary.lo hdr_ctboundary.lo hdr_datemsgid.lo hdr_from.lo hdr_listsubject.lo hdr_mime.lo hdr_subject.lo hdr_transferenc.lo idxthread.lo iopause.lo ip4_scan.lo lock_ex.lo lockfile.lo log.lo makehash.lo makepath.lo messages.lo ndelay_on.lo now.lo open_append.lo openreadclose.lo open_read.lo open_trunc.lo qmail.lo qmail_copy.lo quote.lo readclose.lo scan_8long.lo scan_ulong.lo seek_set.lo sender.lo sgetopt.lo sig_catch.lo sig_pipe.lo slurp.lo slurpclose.lo str_chr.lo str_cpy.lo str_diff.lo str_diffn.lo str_len.lo str_rchr.lo str_start.lo socket_bind.lo socket_conn.lo socket_tcp.lo socket_udp.lo stralloc_arts.lo stralloc_cat.lo stralloc_catb.lo stralloc_cats.lo stralloc_copy.lo stralloc_eady.lo stralloc_num.lo stralloc_opyb.lo stralloc_opys.lo stralloc_pend.lo strerr.lo subdb.lo subfderr.lo subfdin.lo subfdout.lo subgetopt.lo subhash.lo substdi.lo substdio.lo substdio_copy.lo substdo.lo surf.lo surfpcs.lo taia_add.lo taia_approx.lo taia_frac.lo taia_less.lo taia_now.lo taia_pack.lo taia_sub.lo taia_uint.lo tai_pack.lo uint16_pack.lo uint16_unpack.lo uint32_unpack.lo unfoldHDR.lo wait_pid.lo wrap_chdir.lo wrap_execbin.lo wrap_execsh.lo wrap_execv.lo wrap_exitcode.lo wrap_fork.lo wrap_rename.lo wrap_stat.lo wrap_waitpid.lo
	./makelib libezmlm.a alloc.lo alloc_re.lo altpath.lo author.lo auto_bin.lo auto_cron.lo auto_etc.lo auto_lib.lo auto_qmail.lo auto_version.lo byte_chr.lo byte_copy.lo byte_cr.lo byte_diff.lo byte_rchr.lo byte_zero.lo case_diffb.lo case_diffs.lo case_lowerb.lo case_startb.lo case_starts.lo concatHDR.lo config.lo constmap.lo cookie.lo copy.lo date2yyyymm.lo date822fmt.lo dateline.lo datetime.lo decodeB.lo decodeHDR.lo decodeQ.lo die_badaddr.lo die_badformat.lo die_dow.lo die_nomem.lo die_sender.lo die_usage.lo dmarc.lo dns_dfd.lo dns_domain.lo dns_dtda.lo dns_ip.lo dns_ipq.lo dns_mx.lo dns_name.lo dns_nd.lo dns_packet.lo dns_random.lo dns_rcip.lo dns_rcrw.lo dns_resolve.lo dns_sortip.lo dns_transmit.lo dns_txt.lo encodeB.lo encodeQ.lo env.lo envread.lo error.lo error_str.lo fd_copy.lo fd_move.lo fmt_str.lo fmt_uint.lo fmt_uint0.lo fmt_ulong.lo getconf.lo getconf_ulong.lo gethdrln.lo getln.lo getln2.lo getconfopt.lo getconfopt_copy.lo getconfopt_cstr.lo getconfopt_cstr_flag.lo getconfopt_flag.lo getconfopt_str.lo getconfopt_ulong.lo getconfopt_ulong_flag.lo getconfopt_version.lo hdr_add.lo hdr_boundary.lo hdr_ctboundary.lo hdr_datemsgid.lo hdr_from.lo hdr_listsubject.lo hdr_mime.lo hdr_subject.lo hdr_transferenc.lo idxthread.lo iopause.lo ip4_scan.lo lock_ex.lo lockfile.lo log.lo makehash.lo makepath.lo messages.lo ndelay_on.lo now.lo open_append.lo openreadclose.lo open_read.lo open_trunc.lo qmail.lo qmail_copy.lo quote.lo readclose.lo scan_8long.lo scan_ulong.lo seek_set.lo sender.lo sgetopt.lo sig_catch.lo sig_pipe.lo slurp.lo slurpclose.lo str_chr.lo str_cpy.lo str_diff.lo str_diffn.lo str_len.lo str_rchr.lo str_start.lo socket_bind.lo socket_conn.lo socket_tcp.lo socket_udp.lo stralloc_arts.lo stralloc_cat.lo stralloc_catb.lo stralloc_cats.lo stralloc_copy.lo stralloc_eady.lo stralloc_num.lo stralloc_opyb.lo stralloc_opys.lo stralloc_pend.lo strerr.lo subdb.lo subfderr.lo subfdin.lo subfdout.lo subgetopt.lo subhash.lo substdi.lo substdio.lo substdio_copy.lo substdo.lo surf.lo surfpcs.lo taia_add.lo taia_approx.lo taia_frac.lo taia_less.lo taia_now.lo taia_pack.lo taia_sub.lo taia_uint.lo tai_pack.lo uint16_pack.lo uint16_unpack.lo uint32_unpack.lo unfoldHDR.lo wait_pid.lo wrap_chdir.lo wrap_execbin.lo wrap_execsh.lo wrap_execv.lo wrap_exitcode.lo wrap_fork.lo wrap_rename.lo wrap_stat.lo wrap_waitpid.lo

load: \
make-load warn-auto.sh systype
	( cat warn-auto.sh; ./make-load "`cat systype`" ) > load
	chmod 755 load

lock_ex.lo: \
libcompile lock_ex.c hasflock.h lock.h
	./libcompile lock_ex.c

lockfile.lo: \
libcompile lockfile.c lock.h messages.h strerr.h hasattribute.h die.h hasattribute.h idx.h open.h
	./libcompile lockfile.c

log.lo: \
libcompile log.c substdio.h readwrite.h stralloc.h gen_alloc.h log.h now.h datetime.h fmt.h open.h sub_std.h stralloc.h gen_alloc.h
	./libcompile log.c

make-compile: \
make-compile.sh auto-ccld.sh
	cat auto-ccld.sh make-compile.sh > make-compile
	chmod 755 make-compile

makehash.lo: \
libcompile makehash.c stralloc.h gen_alloc.h byte.h surf.h uint32.h makehash.h die.h hasattribute.h idx.h surfpcs.h uint32.h
	./libcompile makehash.c

makelang: \
warn-auto.sh makelang.sh
	cat warn-auto.sh makelang.sh > makelang
	chmod 755 makelang

make-libcompile: \
make-libcompile.sh auto-ccld.sh
	cat auto-ccld.sh make-libcompile.sh > make-libcompile
	chmod 755 make-libcompile

makelib: \
make-makelib warn-auto.sh systype
	( cat warn-auto.sh; ./make-makelib "`cat systype`" ) > makelib
	chmod 755 makelib

make-load: \
make-load.sh auto-ccld.sh
	cat auto-ccld.sh make-load.sh > make-load
	chmod 755 make-load

make-makelib: \
make-makelib.sh auto-ccld.sh
	cat auto-ccld.sh make-makelib.sh > make-makelib
	chmod 755 make-makelib

make-makeso: \
make-makeso.sh auto-ccld.sh
	cat auto-ccld.sh make-makeso.sh > make-makeso
	chmod 755 make-makeso

make-messages-c: \
make-messages-c.sh auto-ccld.sh
	cat auto-ccld.sh make-messages-c.sh > make-messages-c
	chmod 755 make-messages-c

make-messages: \
make-messages.sh auto-ccld.sh
	cat auto-ccld.sh make-messages.sh > make-messages
	chmod 755 make-messages

makepath.lo: \
libcompile makepath.c die.h hasattribute.h stralloc.h gen_alloc.h sub_std.h stralloc.h gen_alloc.h
	./libcompile makepath.c

makeso: \
make-makeso warn-auto.sh systype
	( cat warn-auto.sh; ./make-makeso "`cat systype`" ) > makeso
	chmod 755 makeso

man: \
ezmlm.0 ezmlm-accept.0 ezmlm-archive.0 ezmlm-cgi.0 ezmlm-check.0 ezmlm-checksub.0 ezmlm-clean.0 ezmlm-confirm.0 ezmlm-cron.0 ezmlm-dispatch.0 ezmlm-gate.0 ezmlm-get.0 ezmlm-glconf.0 ezmlm-idx.0 ezmlm-import.0 ezmlm-issubn.0 ezmlm-limit.0 ezmlm-list.0 ezmlm-make.0 ezmlm-manage.0 ezmlm-moderate.0 ezmlm-receipt.0 ezmlm-reject.0 ezmlm-request.0 ezmlm-return.0 ezmlm-rmtab.0 ezmlm-send.0 ezmlm-split.0 ezmlm-store.0 ezmlm-sub.0 ezmlm-test.0 ezmlm-tstdig.0 ezmlm-unsub.0 ezmlm-warn.0 ezmlm-weed.0 alloc.0 case.0 datetime.0 direntry.0 env.0 error.0 error_str.0 error_temp.0 ezmlm.0 ezmlmglrc.0 ezmlmsubrc.0 ezmlmrc.0 fd_copy.0 fd_move.0 getln.0 getln2.0 getopt.0 now.0 sgetopt.0 stralloc.0 subfd.0 subgetopt.0 substdio.0 substdio_copy.0 substdio_in.0 substdio_out.0 surf.0 surfpcs.0 wait.0

messages.all: \
lang/cs/text/messages lang/da/text/messages lang/de/text/messages lang/en_US/text/messages lang/fr/text/messages lang/hu/text/messages lang/id/text/messages lang/it/text/messages lang/nl/text/messages lang/pl/text/messages lang/pt_BR/text/messages lang/pt/text/messages lang/sv/text/messages

messages.lo: \
libcompile messages.c error.h messages.h altpath.h config.h stralloc.h gen_alloc.h constmap.h copy.h cookie.h datetime.h die.h hasattribute.h slurp.h stralloc.h gen_alloc.h str.h strerr.h hasattribute.h messages-txt.c
	./libcompile messages.c

messages-txt.c: \
make-messages-c conf-lang Makefile lang/cs/messages lang/da/messages lang/de/messages lang/en_US/messages lang/fr/messages lang/hu/messages lang/id/messages lang/it/messages lang/nl/messages lang/pl/messages lang/pt_BR/messages lang/pt/messages lang/sv/messages
	./make-messages-c < lang/$$(head -n 1 conf-lang)/messages >messages-txt.c

m.lib: \
compile load trylib.c
	( ( ./compile trylib.c && ./load trylib -lm ) >/dev/null 2>&1 && echo -lm || exit 0 ) >m.lib
	rm -f trylib.o trylib

mysql: \
sub-mysql.so

ndelay_on.lo: \
libcompile ndelay_on.c ndelay.h
	./libcompile ndelay_on.c

now.0: \
now.3
	nroff -man now.3 > now.0

now.lo: \
libcompile now.c datetime.h now.h datetime.h
	./libcompile now.c

nsl.lib: \
compile load trylib.c
	( ( ./compile trylib.c && ./load trylib -lnsl ) >/dev/null 2>&1 && echo -lnsl || exit 0 ) >nsl.lib
	rm -f trylib.o trylib

open.a: \
makelib open_append.lo open_read.lo open_trunc.lo
	./makelib open.a open_append.lo open_read.lo open_trunc.lo

open_append.lo: \
libcompile open_append.c open.h
	./libcompile open_append.c

openreadclose.lo: \
libcompile openreadclose.c error.h open.h readclose.h stralloc.h gen_alloc.h openreadclose.h stralloc.h gen_alloc.h
	./libcompile openreadclose.c

open_read.lo: \
libcompile open_read.c open.h
	./libcompile open_read.c

open_trunc.lo: \
libcompile open_trunc.c open.h
	./libcompile open_trunc.c

pgsql: \
sub-pgsql.so

qmail_copy.lo: \
libcompile qmail_copy.c qmail.h substdio.h stralloc.h gen_alloc.h substdio.h
	./libcompile qmail_copy.c

qmail.lo: \
libcompile qmail.c substdio.h readwrite.h wait.h die.h hasattribute.h env.h stralloc.h gen_alloc.h getconf.h str.h exit.h fork.h fd.h qmail.h substdio.h stralloc.h gen_alloc.h auto_qmail.h alloc.h stralloc.h gen_alloc.h idx.h
	./libcompile qmail.c

quote.lo: \
libcompile quote.c stralloc.h gen_alloc.h str.h quote.h
	./libcompile quote.c

readclose.lo: \
libcompile readclose.c error.h readclose.h stralloc.h gen_alloc.h
	./libcompile readclose.c

scan_8long.lo: \
libcompile scan_8long.c scan.h
	./libcompile scan_8long.c

scan_ulong.lo: \
libcompile scan_ulong.c scan.h
	./libcompile scan_ulong.c

seek_set.lo: \
libcompile seek_set.c seek.h
	./libcompile seek_set.c

select.h: \
choose compile trysysel.c select.h1 select.h2
	./choose c trysysel select.h1 select.h2 > select.h

sender.lo: \
libcompile sender.c die.h hasattribute.h env.h str.h stralloc.h gen_alloc.h
	./libcompile sender.c

sgetopt.0: \
sgetopt.3
	nroff -man sgetopt.3 > sgetopt.0

sgetopt.lo: \
libcompile sgetopt.c substdio.h subfd.h substdio.h sgetopt.h subgetopt.h
	./libcompile sgetopt.c

sig_catch.lo: \
libcompile sig_catch.c sig.h hassgact.h
	./libcompile sig_catch.c

sig_pipe.lo: \
libcompile sig_pipe.c sig.h
	./libcompile sig_pipe.c

slurpclose.lo: \
libcompile slurpclose.c stralloc.h gen_alloc.h readwrite.h slurpclose.h error.h
	./libcompile slurpclose.c

slurp.lo: \
libcompile slurp.c stralloc.h gen_alloc.h slurp.h slurpclose.h error.h open.h
	./libcompile slurp.c

socket_bind.lo: \
libcompile socket_bind.c byte.h socket.h uint16.h
	./libcompile socket_bind.c

socket_conn.lo: \
libcompile socket_conn.c byte.h socket.h uint16.h
	./libcompile socket_conn.c

socket_tcp.lo: \
libcompile socket_tcp.c ndelay.h socket.h uint16.h
	./libcompile socket_tcp.c

socket_udp.lo: \
libcompile socket_udp.c ndelay.h socket.h uint16.h
	./libcompile socket_udp.c

sqlite3: \
sub-sqlite3.so

str.a: \
makelib str_len.lo str_diff.lo str_diffn.lo str_cpy.lo str_chr.lo str_rchr.lo str_start.lo byte_chr.lo byte_rchr.lo byte_diff.lo byte_copy.lo byte_cr.lo byte_zero.lo
	./makelib str.a str_len.lo str_diff.lo str_diffn.lo str_cpy.lo str_chr.lo str_rchr.lo str_start.lo byte_chr.lo byte_rchr.lo byte_diff.lo byte_copy.lo byte_cr.lo byte_zero.lo

stralloc.0: \
stralloc.3
	nroff -man stralloc.3 > stralloc.0

stralloc.a: \
makelib stralloc_eady.lo stralloc_pend.lo stralloc_copy.lo stralloc_opys.lo stralloc_opyb.lo stralloc_cat.lo stralloc_cats.lo stralloc_catb.o stralloc_arts.lo stralloc_num.lo
	./makelib stralloc.a stralloc_eady.lo stralloc_pend.lo stralloc_copy.lo stralloc_opys.lo stralloc_opyb.lo stralloc_cat.lo stralloc_cats.lo stralloc_catb.o stralloc_arts.lo stralloc_num.lo

stralloc_arts.lo: \
libcompile stralloc_arts.c byte.h str.h stralloc.h gen_alloc.h
	./libcompile stralloc_arts.c

stralloc_catb.lo: \
libcompile stralloc_catb.c stralloc.h gen_alloc.h byte.h
	./libcompile stralloc_catb.c

stralloc_catb.o: \
compile stralloc_catb.c stralloc.h gen_alloc.h byte.h
	./compile stralloc_catb.c

stralloc_cat.lo: \
libcompile stralloc_cat.c byte.h stralloc.h gen_alloc.h
	./libcompile stralloc_cat.c

stralloc_cats.lo: \
libcompile stralloc_cats.c byte.h str.h stralloc.h gen_alloc.h
	./libcompile stralloc_cats.c

stralloc_copy.lo: \
libcompile stralloc_copy.c byte.h stralloc.h gen_alloc.h
	./libcompile stralloc_copy.c

stralloc_eady.lo: \
libcompile stralloc_eady.c alloc.h stralloc.h gen_alloc.h gen_allocdefs.h
	./libcompile stralloc_eady.c

stralloc_num.lo: \
libcompile stralloc_num.c stralloc.h gen_alloc.h
	./libcompile stralloc_num.c

stralloc_opyb.lo: \
libcompile stralloc_opyb.c stralloc.h gen_alloc.h byte.h
	./libcompile stralloc_opyb.c

stralloc_opys.lo: \
libcompile stralloc_opys.c byte.h str.h stralloc.h gen_alloc.h
	./libcompile stralloc_opys.c

stralloc_pend.lo: \
libcompile stralloc_pend.c alloc.h stralloc.h gen_alloc.h gen_allocdefs.h
	./libcompile stralloc_pend.c

str_chr.lo: \
libcompile str_chr.c str.h
	./libcompile str_chr.c

str_cpy.lo: \
libcompile str_cpy.c str.h
	./libcompile str_cpy.c

str_diff.lo: \
libcompile str_diff.c str.h
	./libcompile str_diff.c

str_diffn.lo: \
libcompile str_diffn.c str.h
	./libcompile str_diffn.c

strerr.a: \
makelib strerr.lo
	./makelib strerr.a strerr.lo

strerr.lo: \
libcompile strerr.c error.h exit.h substdio.h subfd.h substdio.h strerr.h hasattribute.h
	./libcompile strerr.c

str_len.lo: \
libcompile str_len.c str.h
	./libcompile str_len.c

str_rchr.lo: \
libcompile str_rchr.c str.h
	./libcompile str_rchr.c

str_start.lo: \
libcompile str_start.c str.h
	./libcompile str_start.c

subdb.lo: \
libcompile subdb.c case.h config.h stralloc.h gen_alloc.h cookie.h die.h hasattribute.h env.h messages.h fmt.h scan.h slurp.h stralloc.h gen_alloc.h str.h strerr.h hasattribute.h subdb.h stralloc.h gen_alloc.h auto_lib.h
	./libcompile subdb.c

subfd.0: \
subfd.3
	nroff -man subfd.3 > subfd.0

subfderr.lo: \
libcompile subfderr.c readwrite.h substdio.h subfd.h substdio.h
	./libcompile subfderr.c

subfdin.lo: \
libcompile subfdin.c readwrite.h substdio.h subfd.h substdio.h
	./libcompile subfdin.c

subfdout.lo: \
libcompile subfdout.c readwrite.h substdio.h subfd.h substdio.h
	./libcompile subfdout.c

subgetopt.0: \
subgetopt.3
	nroff -man subgetopt.3 > subgetopt.0

subgetopt.lo: \
libcompile subgetopt.c subgetopt.h
	./libcompile subgetopt.c

subhash.lo: \
libcompile subhash.c subhash.h str.h
	./libcompile subhash.c

sub-mysql.lo: \
libcompile sub-mysql.c byte.h die.h hasattribute.h str.h strerr.h hasattribute.h sub_sql.h subdb.h stralloc.h gen_alloc.h subdb.h stralloc.h gen_alloc.h
	./libcompile sub-mysql.c

sub-mysql.so: \
makeso sub-mysql.lo sub_sql.lo libezmlm.a nsl.lib m.lib
	./makeso sub-mysql.so sub-mysql.lo sub_sql.lo -lezmlm -lmysqlclient  `cat nsl.lib` `cat m.lib`

sub-pgsql.lo: \
libcompile sub-pgsql.c die.h hasattribute.h fmt.h scan.h strerr.h hasattribute.h sub_sql.h subdb.h stralloc.h gen_alloc.h
	./libcompile sub-pgsql.c

sub-pgsql.so: \
makeso sub-pgsql.lo sub_sql.lo libezmlm.a crypt.lib
	./makeso sub-pgsql.so sub-pgsql.lo sub_sql.lo -lezmlm -lpq  `cat crypt.lib`

sub-sqlite3.lo: \
libcompile sub-sqlite3.c die.h hasattribute.h strerr.h hasattribute.h sub_sql.h subdb.h stralloc.h gen_alloc.h subdb.h stralloc.h gen_alloc.h
	./libcompile sub-sqlite3.c

sub-sqlite3.so: \
makeso sub-sqlite3.lo sub_sql.lo libezmlm.a crypt.lib
	./makeso sub-sqlite3.so sub-sqlite3.lo sub_sql.lo -lezmlm -lsqlite3  `cat crypt.lib`

sub_sql.lo: \
libcompile sub_sql.c byte.h case.h cookie.h date822fmt.h datetime.h die.h hasattribute.h fmt.h log.h messages.h scan.h stralloc.h gen_alloc.h strerr.h hasattribute.h sub_sql.h subdb.h stralloc.h gen_alloc.h subdb.h stralloc.h gen_alloc.h subhash.h
	./libcompile sub_sql.c

substdi.lo: \
libcompile substdi.c substdio.h byte.h error.h
	./libcompile substdi.c

substdio.0: \
substdio.3
	nroff -man substdio.3 > substdio.0

substdio.a: \
makelib substdio.lo substdi.lo substdo.lo subfderr.lo subfdin.lo subfdout.lo substdio_copy.lo
	./makelib substdio.a substdio.lo substdi.lo substdo.lo subfderr.lo subfdin.lo subfdout.lo substdio_copy.lo

substdio_copy.0: \
substdio_copy.3
	nroff -man substdio_copy.3 > substdio_copy.0

substdio_copy.lo: \
libcompile substdio_copy.c substdio.h
	./libcompile substdio_copy.c

substdio_in.0: \
substdio_in.3
	nroff -man substdio_in.3 > substdio_in.0

substdio.lo: \
libcompile substdio.c substdio.h
	./libcompile substdio.c

substdio_out.0: \
substdio_out.3
	nroff -man substdio_out.3 > substdio_out.0

sub-std.lo: \
libcompile sub-std.c byte.h case.h config.h stralloc.h gen_alloc.h cookie.h date822fmt.h datetime.h die.h hasattribute.h error.h messages.h fmt.h getln.h idx.h lock.h log.h makehash.h open.h qmail.h substdio.h stralloc.h gen_alloc.h readwrite.h scan.h slurp.h str.h stralloc.h gen_alloc.h strerr.h hasattribute.h sub_std.h stralloc.h gen_alloc.h subhash.h substdio.h subdb.h stralloc.h gen_alloc.h uint32.h wrap.h
	./libcompile sub-std.c

substdo.lo: \
libcompile substdo.c substdio.h str.h byte.h error.h
	./libcompile substdo.c

sub-std.so: \
makeso sub-std.lo libezmlm.a
	./makeso sub-std.so sub-std.lo -lezmlm 

surf.0: \
surf.3
	nroff -man surf.3 > surf.0

surf.lo: \
libcompile surf.c surf.h uint32.h
	./libcompile surf.c

surfpcs.0: \
surfpcs.3
	nroff -man surfpcs.3 > surfpcs.0

surfpcs.lo: \
libcompile surfpcs.c surf.h uint32.h surfpcs.h uint32.h
	./libcompile surfpcs.c

systype: \
find-systype trycpp.c
	./find-systype > systype

taia_add.lo: \
libcompile taia_add.c taia.h tai.h uint64.h
	./libcompile taia_add.c

taia_approx.lo: \
libcompile taia_approx.c taia.h tai.h uint64.h
	./libcompile taia_approx.c

taia_frac.lo: \
libcompile taia_frac.c taia.h tai.h uint64.h
	./libcompile taia_frac.c

taia_less.lo: \
libcompile taia_less.c taia.h tai.h uint64.h
	./libcompile taia_less.c

taia_now.lo: \
libcompile taia_now.c taia.h tai.h uint64.h
	./libcompile taia_now.c

taia_pack.lo: \
libcompile taia_pack.c taia.h tai.h uint64.h
	./libcompile taia_pack.c

taia_sub.lo: \
libcompile taia_sub.c taia.h tai.h uint64.h
	./libcompile taia_sub.c

taia_uint.lo: \
libcompile taia_uint.c taia.h tai.h uint64.h
	./libcompile taia_uint.c

tai_pack.lo: \
libcompile tai_pack.c tai.h uint64.h
	./libcompile tai_pack.c

targets: \
all install

test-getconfopt: \
load test-getconfopt.o libezmlm.a
	./load test-getconfopt -lezmlm 

test-getconfopt.o: \
compile test-getconfopt.c fmt.h getconfopt.h stralloc.h gen_alloc.h substdio.h
	./compile test-getconfopt.c

uint16_pack.lo: \
libcompile uint16_pack.c uint16.h
	./libcompile uint16_pack.c

uint16_unpack.lo: \
libcompile uint16_unpack.c uint16.h
	./libcompile uint16_unpack.c

uint32.h: \
tryulong32.c compile load uint32.h1 uint32.h2
	( ( ./compile tryulong32.c && ./load tryulong32 && ./tryulong32 ) >/dev/null 2>&1 \
	&& cat uint32.h2 || cat uint32.h1 ) > uint32.h
	rm -f tryulong32.o tryulong32

uint32_unpack.lo: \
libcompile uint32_unpack.c uint32.h
	./libcompile uint32_unpack.c

uint64.h: \
choose compile load tryulong64.c uint64.h1 uint64.h2
	./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h

unfoldHDR.lo: \
libcompile unfoldHDR.c stralloc.h gen_alloc.h strerr.h hasattribute.h case.h byte.h messages.h mime.h stralloc.h gen_alloc.h die.h hasattribute.h idx.h
	./libcompile unfoldHDR.c

wait.0: \
wait.3
	nroff -man wait.3 > wait.0

wait_pid.lo: \
libcompile wait_pid.c error.h haswaitp.h
	./libcompile wait_pid.c

wrap_chdir.lo: \
libcompile wrap_chdir.c messages.h strerr.h hasattribute.h wrap.h die.h hasattribute.h
	./libcompile wrap_chdir.c

wrap_execbin.lo: \
libcompile wrap_execbin.c auto_bin.h stralloc.h gen_alloc.h wrap.h die.h hasattribute.h idx.h
	./libcompile wrap_execbin.c

wrap_execsh.lo: \
libcompile wrap_execsh.c wrap.h
	./libcompile wrap_execsh.c

wrap_execv.lo: \
libcompile wrap_execv.c error.h messages.h strerr.h hasattribute.h wrap.h die.h hasattribute.h idx.h
	./libcompile wrap_execv.c

wrap_exitcode.lo: \
libcompile wrap_exitcode.c messages.h strerr.h hasattribute.h wrap.h die.h hasattribute.h idx.h
	./libcompile wrap_exitcode.c

wrap_fork.lo: \
libcompile wrap_fork.c fork.h messages.h strerr.h hasattribute.h wrap.h die.h hasattribute.h idx.h
	./libcompile wrap_fork.c

wrap_rename.lo: \
libcompile wrap_rename.c die.h hasattribute.h messages.h strerr.h hasattribute.h wrap.h
	./libcompile wrap_rename.c

wrap_stat.lo: \
libcompile wrap_stat.c error.h messages.h strerr.h hasattribute.h wrap.h die.h hasattribute.h idx.h
	./libcompile wrap_stat.c

wrap_waitpid.lo: \
libcompile wrap_waitpid.c wait.h messages.h strerr.h hasattribute.h wrap.h die.h hasattribute.h idx.h
	./libcompile wrap_waitpid.c
