1# $Id$
2
3# Sympa - SYsteme de Multi-Postage Automatique
4#
5# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
6# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
7# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
8# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
9#
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23sbin_SCRIPTS = archived.pl \
24	       bounced.pl \
25	       bulk.pl \
26	       sympa.pl \
27	       sympa_automatic.pl \
28	       sympa_msg.pl \
29	       sympa_newaliases.pl \
30	       sympa_wizard.pl \
31	       task_manager.pl
32
33man1_MANS = \
34	sympa.1 \
35	sympa_newaliases.1 \
36	sympa_wizard.1
37man8_MANS = \
38	archived.8 \
39	bounced.8 \
40	bulk.8 \
41	sympa_automatic.8 \
42	sympa_msg.8 \
43	task_manager.8
44
45EXTRA_DIST = \
46	archived.pl.in \
47	bounced.pl.in \
48	bulk.pl.in \
49	sympa.pl.in \
50	sympa_automatic.pl.in \
51	sympa_msg.pl.in \
52	sympa_newaliases.pl.in \
53	sympa_wizard.pl.in \
54	task_manager.pl.in
55
56CLEANFILES = $(sbin_SCRIPTS) $(man1_MANS) $(man8_MANS)
57
58archived.pl bounced.pl bulk.pl sympa.pl sympa_automatic.pl sympa_msg.pl task_manager.pl: Makefile
59	@rm -f $@
60	$(AM_V_GEN)$(SED) \
61		-e 's|--PERL--|$(PERL)|' \
62		-e 's|--defaultdir--|$(defaultdir)|' \
63		-e 's|--docdir--|$(docdir)|' \
64		-e 's|--libexecdir--|$(libexecdir)|' \
65		-e 's|--localedir--|$(localedir)|' \
66		-e 's|--modulesdir--|$(modulesdir)|' \
67		-e 's|--piddir--|$(piddir)|' \
68		-e 's|--sbindir--|$(sbindir)|' \
69		-e 's|--spooldir--|$(spooldir)|' \
70		-e 's|--CONFIG--|$(CONFIG)|' \
71		< $(srcdir)/$@.in > $@
72	@chmod +x $@
73
74archived.pl: $(srcdir)/archived.pl.in
75bounced.pl: $(srcdir)/bounced.pl.in
76bulk.pl: $(srcdir)/bulk.pl.in
77sympa.pl: $(srcdir)/sympa.pl.in
78sympa_automatic.pl: $(srcdir)/sympa_automatic.pl.in
79sympa_msg.pl: $(srcdir)/sympa_msg.pl.in
80task_manager.pl: $(srcdir)/task_manager.pl.in
81
82sympa_newaliases.pl sympa_wizard.pl: Makefile
83	@rm -f $@
84	$(AM_V_GEN)$(SED) \
85		-e 's|--PERL--|$(PERL)|' \
86		-e 's|--defaultdir--|$(defaultdir)|' \
87		-e 's|--docdir--|$(docdir)|' \
88		-e 's|--libexecdir--|$(libexecdir)|' \
89		-e 's|--localedir--|$(localedir)|' \
90		-e 's|--modulesdir--|$(modulesdir)|' \
91		-e 's|--piddir--|$(piddir)|' \
92		-e 's|--spooldir--|$(spooldir)|' \
93		-e 's|--sysconfdir--|$(sysconfdir)|' \
94		-e 's|--CONFIG--|$(CONFIG)|' \
95		-e 's|--SENDMAIL_ALIASES--|$(SENDMAIL_ALIASES)|' \
96		-e 's|--MAKEMAP--|$(MAKEMAP)|' \
97		-e 's|--NEWALIASES--|$(NEWALIASES)|' \
98		-e 's|--NEWALIASES_ARG--|$(NEWALIASES_ARG)|' \
99		-e 's|--POSTALIAS--|$(POSTALIAS)|' \
100		-e 's|--POSTMAP--|$(POSTMAP)|' \
101		< $(srcdir)/$@.in > $@
102	@chmod +x $@
103
104sympa_newaliases.pl: $(srcdir)/sympa_newaliases.pl.in
105sympa_wizard.pl: $(srcdir)/sympa_wizard.pl.in
106
107.pl.1:
108	@rm -f $@
109	$(AM_V_GEN)$(POD2MAN) --section=1 --center="sympa $(VERSION)" \
110		--lax --release="$(VERSION)" $< $@
111.pl.8:
112	@rm -f $@
113	$(AM_V_GEN)$(POD2MAN) --section=8 --center="sympa $(VERSION)" \
114		--lax --release="$(VERSION)" $*.pl $@
115
116# Remove old sympa.8 manpage.
117install-data-hook:
118	@rm -f $(DESTDIR)$(man8dir)/sympa.8
119
120