##--------------------------------------------------------------------------## ## File: ## $Id: Makefile,v 1.37 2007/02/22 21:07:02 ehood Exp $ ## Description: ## Administrative makefile for mailing list archives. ##--------------------------------------------------------------------------## ## Copyright (C) 2001-2002 Earl Hood ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA ##--------------------------------------------------------------------------## .PHONY: default editidx rebuild rootidx enable disable readmail \ help editidxonly configure mhonarc-check include vars.mk INSTALL_PL = ./install.pl APPLY_CONFIG = ./bin/apply-config COMPRESS_FILES = ./bin/compress-files COMPRESS_MBOXES = ./bin/compress-mboxes CONFIG_CHECK = ./bin/config-check FILTER_SPOOL = ./bin/filter-spool LOG_CMD = ./bin/logcmd MBOX_MONTH_PACK = ./bin/mbox-month-pack MHA_CHECK = ./bin/mhonarc-check MH_MONTH_PACK = ./bin/mh-month-pack MK_PROCMAILRC = ./bin/mk-procmailrc READ_MAIL = ./bin/read-mail WEB_ARCHIVE = ./bin/web-archive PRGS = \ $(INSTALL_PL) \ $(LOG_CMD) \ $(MH_MONTH_PACK) \ $(MBOX_MONTH_PACK) \ $(FILTER_SPOOL) \ $(APPLY_CONFIG) \ $(COMPRESS_FILES) \ $(COMPRESS_MBOXES) \ $(CONFIG_CHECK) \ $(MHA_CHECK) \ $(MK_PROCMAILRC) \ $(READ_MAIL) \ $(WEB_ARCHIVE) \ # End PRGS CONFIG_SH = ./lib/config.sh LIST_DEF = ./lib/lists.def NO_ARCHIVE = .noarchive PROCMAIL_RC = procmailrc.mharc CHMOD = chmod CP = cp FIND = find GZIP = gzip MKDIR = mkdir MV = mv PERL = perl RM = rm TAR = tar TOUCH = touch ##--------------------------------------------------------------------------## default: procmailrc procmailrc: mhonarc-check $(MK_PROCMAILRC) editidx: disable -$(PERL) $(WEB_ARCHIVE) -verbose -editidx -nosearch $(MLISTS) -@echo "=============================================================" -@echo "!!! Auto-archive processing is DISABLED !!!" -@echo "=============================================================" editidxonly: disable -$(PERL) $(WEB_ARCHIVE) -verbose -editidxonly -nosearch $(MLISTS) -@echo "=============================================================" -@echo "!!! Auto-archive processing is DISABLED !!!" -@echo "=============================================================" editrootidx: disable -$(PERL) $(WEB_ARCHIVE) -verbose -editrootidx -nosearch $(MLISTS) -@echo "=============================================================" -@echo "!!! Auto-archive processing is DISABLED !!!" -@echo "=============================================================" rebuild: disable -$(PERL) $(WEB_ARCHIVE) -verbose -rebuild $(MLISTS) -@echo "=============================================================" -@echo "!!! Auto-archive processing is DISABLED !!!" -@echo "=============================================================" rootidx: _FORCE -$(PERL) $(WEB_ARCHIVE) -verbose -editrootidx $(MLISTS) enable: _FORCE @$(RM) -f $(NO_ARCHIVE) -@echo "=============================================================" -@echo "!!! Auto-archive processing is ENABLED !!!" -@echo "=============================================================" disable: _FORCE @$(TOUCH) $(NO_ARCHIVE) -@echo "=============================================================" -@echo "!!! Auto-archive processing is DISABLED !!!" -@echo "=============================================================" readmail: _FORCE $(READ_MAIL) -verbose -force configure: _FORCE -@$(MKDIR) -p log mbox html @if [ ! -f $(CONFIG_SH) ]; then \ $(CP) $(CONFIG_SH).dist $(CONFIG_SH); \ $(CHMOD) u+w $(CONFIG_SH); \ fi @if [ ! -f $(LIST_DEF) ]; then \ $(CP) $(LIST_DEF).dist $(LIST_DEF); \ $(CHMOD) u+w $(LIST_DEF); \ fi $(APPLY_CONFIG) -verbose -$(MHA_CHECK) -@echo "=============================================================" -@echo "* Make sure to rerun 'make configure' when you change" -@echo "* lib/config.sh or change a .in template file." -@echo "=============================================================" mhonarc-check: _FORCE @$(MHA_CHECK) help: _FORCE -@echo "Targets available:" -@echo " (default) Generate $(PROCMAIL_RC) from $(LIST_DEF)." -@echo " configure: Apply $(CONFIG_SH) settings." -@echo " disable: Disable automated processing of new messages." -@echo " editidx: Edit all mhonarc archive pages." -@echo " editidxonly: Edit only mhonarc archive index pages." -@echo " editrootidx: Edit only top period index pages." -@echo " enable: Enable automated processing of new messages." -@echo " help: This message." -@echo " readmail: Process mail spool." -@echo " rebuild: Rebuild archives from raw message data." -@echo " rootidx: Regenerated top index for archives." -@echo "" -@echo "NOTE: Targets that modify archives run with debugging enabled." -@echo "NOTE: 'editidx', 'editidxonly', and 'rebuild' automatically" -@echo " disable auto-processing. Execute 'enable' target to" -@echo " reenable." -@echo "NOTE: Some targets support defining the MLISTS variable when" -@echo " when invoked to only apply operations on the space" -@echo " separated archive/list names specified." -@echo "NOTE: For more advanced processing options on the archives," -@echo " invoke $(WEB_ARCHIVE) directly." -@echo " See web-archive documentation for information." # Dummy target to force building of other targets _FORCE: