aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 73e92b1..b5b4909 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -93,16 +93,19 @@ config:
fi
@mv .config.tmp .config
-listarchive:
- @if [ -z "$(MAILMANSRC)" ]; then \
+define build_cgi_rule =
+$(1):; @if [ -z "$(MAILMANSRC)" ]; then \
echo >&2 "Please set MAILMANSRC to point to the mailman-2.x tree"; \
exit 1; \
elif ! test -w $(MAILMANSRC)/src; then \
echo >&2 "$(MAILMANSRC)/src must be writable"; \
exit 1; \
else \
- make -C $(MAILMANSRC)/src CGI_PROGS=listarchive listarchive; \
+ make -C $(MAILMANSRC)/src CGI_PROGS=$(1) $(1); \
fi
+endef
+
+$(foreach tgt,listarchive findmail,$(eval $(call build_cgi_rule,$(tgt))))
define geninstall
install-$(1):;
@@ -126,9 +129,10 @@ TARGETS=\
$(foreach tgt,$(TARGETS),$(eval $(call geninstall,$(tgt))))
-install-cgi: listarchive
+install-cgi: listarchive findmail
install -d $(DESTDIR)$(CGIDIR)
install -o root -g mailman -m 2755 $(MAILMANSRC)/src/listarchive $(DESTDIR)$(CGIDIR)
+ install -o root -g mailman -m 2755 $(MAILMANSRC)/src/findmail $(DESTDIR)$(CGIDIR)
install: install-cgi $(foreach tgt,$(TARGETS), install-$(tgt))

Return to:

Send suggestions and report system problems to the System administrator.