.PHONY:	all clean start stop restart

maybe_dbsources := aliases genericstable domaintable
cf_files := sendmail.cf submit.cf
db_files := $(patsubst %,%.db,$(wildcard $(maybe_dbsources)))

all:	$(cf_files) $(db_files)

%.cf:	%.mc
	m4 $< > $@

%.db:	%
	makemap hash $@ < $<

clean: ;	rm -f $(cf_files) $(db_files)

start: ;	@/etc/init.d/sendmail start
stop: ;		@/etc/init.d/sendmail stop
restart: ;	@/etc/init.d/sendmail restart
