Makefile.am 7.86 KB
Newer Older
1
2
3
4
5
6
7
# $Id$

# Sympa - SYsteme de Multi-Postage Automatique
#
# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
8
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
9
10
11
# Copyright 2017 The Sympa Community. See the AUTHORS.md file at the top-level
# directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# 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, see <http://www.gnu.org/licenses/>.

26
27
28
nobase_nodist_modules_DATA = \
	Sympa/Constants.pm
nobase_dist_modules_DATA = \
29
30
	Sympa/Internals.pod \
	Sympa/Internals/Workflow.pod
31
nobase_modules_DATA = \
32
	Sympa.pm \
33
	Sympa/Admin.pm \
34
	Sympa/Alarm.pm \
35
36
37
	Sympa/Archive.pm \
	Sympa/Auth.pm \
	Sympa/Bulk.pm \
38
	Sympa/CommandDef.pm \
39
	Conf.pm \
40
41
	Sympa/ConfDef.pm \
	Sympa/Config_XML.pm \
42
	Sympa/Crash.pm \
43
	Sympa/Database.pm \
44
	Sympa/DatabaseDescription.pm \
45
	Sympa/DatabaseDriver.pm \
46
	Sympa/DatabaseDriver/CSV.pm \
47
	Sympa/DatabaseDriver/LDAP.pm \
48
49
50
51
52
	Sympa/DatabaseDriver/MySQL.pm \
	Sympa/DatabaseDriver/ODBC.pm \
	Sympa/DatabaseDriver/Oracle.pm \
	Sympa/DatabaseDriver/Oracle/St.pm \
	Sympa/DatabaseDriver/PostgreSQL.pm \
53
	Sympa/DatabaseDriver/SQLite.pm \
54
	Sympa/DatabaseDriver/Sybase.pm \
sikeda's avatar
sikeda committed
55
	Sympa/DatabaseManager.pm \
56
57
58
59
	Sympa/Datasource.pm \
	Sympa/Family.pm \
	Sympa/Fetch.pm \
	Sympa/HTML/FormatText.pm \
60
	Sympa/HTMLDecorator.pm \
61
	Sympa/HTMLSanitizer.pm \
62
	Sympa/Language.pm \
63
	Sympa/List.pm \
64
	Sympa/List/Config.pm \
65
	Sympa/ListDef.pm \
66
	Sympa/ListOpt.pm \
67
	Sympa/LockedFile.pm \
68
	Sympa/Log.pm \
69
	Sympa/Mailer.pm \
70
71
72
	Sympa/Marc.pm \
	Sympa/Marc/Search.pm \
	Sympa/Message.pm \
73
74
	Sympa/Message/Plugin.pm \
	Sympa/Message/Plugin/FixEncoding.pm \
75
	Sympa/Message/Template.pm \
76
	Sympa/ModDef.pm \
77
	Sympa/Process.pm \
78
	Sympa/Regexps.pm \
79
	Sympa/Report.pm \
80
	Sympa/Request.pm \
81
	Sympa/Request/Collection.pm \
82
	Sympa/Request/Handler.pm \
83
	Sympa/Request/Handler/add.pm \
84
	Sympa/Request/Handler/auth.pm \
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
	Sympa/Request/Handler/confirm.pm \
	Sympa/Request/Handler/del.pm \
	Sympa/Request/Handler/distribute.pm \
	Sympa/Request/Handler/finished.pm \
	Sympa/Request/Handler/get.pm \
	Sympa/Request/Handler/global_remind.pm \
	Sympa/Request/Handler/global_set.pm \
	Sympa/Request/Handler/global_signoff.pm \
	Sympa/Request/Handler/help.pm \
	Sympa/Request/Handler/index.pm \
	Sympa/Request/Handler/info.pm \
	Sympa/Request/Handler/invite.pm \
	Sympa/Request/Handler/last.pm \
	Sympa/Request/Handler/lists.pm \
	Sympa/Request/Handler/modindex.pm \
	Sympa/Request/Handler/reject.pm \
	Sympa/Request/Handler/remind.pm \
	Sympa/Request/Handler/review.pm \
	Sympa/Request/Handler/set.pm \
	Sympa/Request/Handler/signoff.pm \
	Sympa/Request/Handler/stats.pm \
	Sympa/Request/Handler/subscribe.pm \
	Sympa/Request/Handler/unknown.pm \
	Sympa/Request/Handler/verify.pm \
	Sympa/Request/Handler/which.pm \
110
	Sympa/Request/Message.pm \
111
112
113
114
115
116
	Sympa/Robot.pm \
	Sympa/Scenario.pm \
	Sympa/SharedDocument.pm \
	Sympa/Session.pm \
	Sympa/SOAP.pm \
	Sympa/SOAP/Transport.pm \
117
	Sympa/Spindle.pm \
118
	Sympa/Spindle/AuthorizeMessage.pm \
119
120
	Sympa/Spindle/AuthorizeRequest.pm \
	Sympa/Spindle/DispatchRequest.pm \
121
	Sympa/Spindle/DistributeMessage.pm \
122
123
124
	Sympa/Spindle/DoCommand.pm \
	Sympa/Spindle/DoForward.pm \
	Sympa/Spindle/DoMessage.pm \
125
	Sympa/Spindle/ProcessArchive.pm \
126
	Sympa/Spindle/ProcessAuth.pm \
127
	Sympa/Spindle/ProcessAutomatic.pm \
128
	Sympa/Spindle/ProcessBounce.pm \
129
	Sympa/Spindle/ProcessDigest.pm \
130
	Sympa/Spindle/ProcessHeld.pm \
131
	Sympa/Spindle/ProcessIncoming.pm \
132
	Sympa/Spindle/ProcessMessage.pm \
133
	Sympa/Spindle/ProcessModeration.pm \
134
	Sympa/Spindle/ProcessOutgoing.pm \
135
	Sympa/Spindle/ProcessRequest.pm \
136
	Sympa/Spindle/ProcessTemplate.pm \
137
	Sympa/Spindle/ResendArchive.pm \
138
	Sympa/Spindle/ToAlarm.pm \
139
	Sympa/Spindle/ToArchive.pm \
140
	Sympa/Spindle/ToAuth.pm \
141
	Sympa/Spindle/ToAuthOwner.pm \
142
	Sympa/Spindle/ToDigest.pm \
143
144
	Sympa/Spindle/ToEditor.pm \
	Sympa/Spindle/ToHeld.pm \
145
	Sympa/Spindle/ToList.pm \
146
	Sympa/Spindle/ToMailer.pm \
147
	Sympa/Spindle/ToModeration.pm \
148
	Sympa/Spindle/ToOutgoing.pm \
149
	Sympa/Spindle/TransformDigestFinal.pm \
150
151
	Sympa/Spindle/TransformIncoming.pm \
	Sympa/Spindle/TransformOutgoing.pm \
152
	Sympa/Spool.pm \
153
	Sympa/Spool/Archive.pm \
154
	Sympa/Spool/Auth.pm \
155
	Sympa/Spool/Automatic.pm \
156
	Sympa/Spool/Bounce.pm \
157
158
	Sympa/Spool/Digest.pm \
	Sympa/Spool/Digest/Collection.pm \
159
	Sympa/Spool/Held.pm \
160
	Sympa/Spool/Incoming.pm \
161
	Sympa/Spool/Moderation.pm \
162
	Sympa/Task.pm \
163
	Sympa/Template.pm \
164
	Sympa/Ticket.pm \
165
	Sympa/Tools/Data.pm \
166
	Sympa/Tools/DKIM.pm \
167
	Sympa/Tools/File.pm \
168
	Sympa/Tools/Password.pm \
169
	Sympa/Tools/SMIME.pm \
170
171
172
	Sympa/Tools/Text.pm \
	Sympa/Tools/Time.pm \
	Sympa/Tools/WWW.pm \
173
	Sympa/Topic.pm \
174
175
	Sympa/Tracking.pm \
	Sympa/Upgrade.pm \
176
	Sympa/User.pm
177

178
179
man3dir = $(mandir)/man3
man3ext = 3Sympa
180
181
182
183
MAN3POD = \
	$(nobase_nodist_modules_DATA) \
	$(nobase_dist_modules_DATA) \
	$(nobase_modules_DATA)
184

185
186
187
188
EXTRA_DIST = \
	Sympa/Constants.pm.in \
	Sympa/Internals.podpl \
	$(nobase_modules_DATA)
189
190

CLEANFILES = Sympa/Constants.pm *.$(man3ext)
191
192

Sympa/Constants.pm: Sympa/Constants.pm.in Makefile
193
194
195
196
197
198
199
200
	if [ -f $(DESTDIR)$(modulesdir)/Sympa/Constants.pm ]; then \
		PREVIOUS=`$(PERL) -Mlib=$(DESTDIR)$(modulesdir) -MSympa::Constants -e 'print Sympa::Constants::VERSION'`; \
	elif [ -f $(DESTDIR)$(bindir)/Version.pm ]; then \
		PREVIOUS=`$(PERL) -Mlib=$(DESTDIR)$(bindir) -MVersion -e 'print $$Version::Version'`; \
	else \
		PREVIOUS=$(VERSION); \
	fi; \
	echo $${PREVIOUS} > $(top_srcdir)/previous_sympa_version;
201
	[ -d Sympa ] || mkdir Sympa
202
	@rm -f $@
203
	$(AM_V_GEN)$(SED) \
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
		-e 's|--VERSION--|$(VERSION)|' \
		-e 's|--USER--|$(USER)|' \
		-e 's|--GROUP--|$(GROUP)|' \
		-e 's|--CONFIG--|$(CONFIG)|' \
		-e 's|--WWSCONFIG--|$(WWSCONFIG)|' \
		-e 's|--SENDMAIL_ALIASES--|$(SENDMAIL_ALIASES)|' \
		-e 's|--piddir--|$(piddir)|' \
		-e 's|--expldir--|$(expldir)|' \
		-e 's|--spooldir--|$(spooldir)|' \
		-e 's|--sysconfdir--|$(sysconfdir)|' \
		-e 's|--localedir--|$(localedir)|' \
		-e 's|--libexecdir--|$(libexecdir)|' \
		-e 's|--sbindir--|$(sbindir)|' \
		-e 's|--scriptdir--|$(scriptdir)|' \
		-e 's|--modulesdir--|$(modulesdir)|' \
		-e 's|--defaultdir--|$(defaultdir)|' \
		-e 's|--staticdir--|$(staticdir)|' \
		-e 's|--arcdir--|$(arcdir)|' \
		-e 's|--bouncedir--|$(bouncedir)|' \
223
		< $(srcdir)/$@.in > $@
224

225
226
227
Sympa/Internals.pod: Sympa/Internals.podpl Sympa/Constants.pm.in $(nobase_modules_DATA)
	@rm -f $@
	$(AM_V_GEN)$(PERL) $< Sympa/Constants.pm.in $(nobase_modules_DATA) > $@
228

229
man3pm: $(MAN3POD) Makefile
230
	@test -n "$(man3ext)" || exit 0; \
231
232
233
	for pm in $(MAN3POD); do \
		echo "$$pm" \
		| $(SED) -e 's/\.pm$$//' -e 's/\.pod$$//' -e 's/\//::/g' \
234
		| while read pod; do \
235
236
			rm -f $$pod.$(man3ext); \
			if grep '^=head1 NAME$$' $$pm > /dev/null; then \
237
				echo "  GEN   " $$pod.$(man3ext); \
238
239
240
241
242
				$(POD2MAN) --section=$(man3ext) \
					--center="sympa $(VERSION)" \
					--lax --release="$(VERSION)" \
					$$pm $$pod.$(man3ext); \
			fi; \
243
244
245
246
247
248
		done; \
	done

install-data-hook: man3pm
	@test -n "$(man3ext)" || exit 0; \
	test -n "$(man3dir)" || exit 0; \
249
	$(INSTALL) -d "$(DESTDIR)$(man3dir)" || exit 1; \
250
251
252
	for pm in $(MAN3POD); do \
		echo "$$pm" \
		| $(SED) -e 's/\.pm$$//' -e 's/\.pod$$//' -e 's/\//::/g' \
253
		| while read pod; do \
254
255
256
257
258
			if grep '^=head1 NAME$$' $$pm > /dev/null; then \
				echo "installing $$pod.$(man3ext)"; \
				$(INSTALL_DATA) "$$pod.$(man3ext)" "$(DESTDIR)$(man3dir)" \
				|| exit $$?; \
			fi; \
259
260
261
		done; \
	done