File: Makefile.am

package info (click to toggle)
amanda 1%3A3.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 22,360 kB
  • sloc: ansic: 214,899; perl: 58,075; sh: 16,954; xml: 13,853; makefile: 2,228; awk: 431; lex: 405; yacc: 343; tcl: 118; sql: 19; sed: 16; php: 2
file content (292 lines) | stat: -rw-r--r-- 6,465 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# Makefile for Amanda library.

include $(top_srcdir)/config/automake/vars.am
include $(top_srcdir)/config/automake/scripts.am
include $(top_srcdir)/config/automake/installperms.am
include $(top_srcdir)/config/automake/precompile.am

INCLUDES =      -I$(top_srcdir)/gnulib   

AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) $(AS_NEEDED_FLAGS)

amlib_LTLIBRARIES =	libamanda.la

sbin_PROGRAMS = amservice

LINT=$(AMLINT)
LINTFLAGS=$(AMLINTFLAGS)

libamanda_la_SOURCES =		\
	alloc.c			\
	amfeatures.c		\
	amflock.c		\
	ipc-binary.c		\
	amxml.c			\
	clock.c			\
	columnar.c		\
	conffile.c		\
	debug.c			\
	dgram.c			\
	event.c			\
	file.c			\
	fileheader.c		\
	glib-util.c		\
	match.c			\
	packet.c		\
	pipespawn.c		\
	protocol.c		\
	amsemaphore.c		\
	security.c		\
	security-util.c		\
	simpleprng.c		\
	sl.c			\
	sockaddr-util.c		\
	stream.c		\
	tapelist.c		\
	timestamp.c		\
	util.c
# version.c is generated; see below
nodist_libamanda_la_SOURCES = version.c

INSTALLPERMS_exec = \
	dest=$(sbindir) chown=root:setuid chmod=04750 \
		amservice

LDADD = libamanda.la

libamanda_la_LIBADD =		\
	../gnulib/libgnu.la

if WANT_AMFLOCK_POSIX
libamanda_la_SOURCES += amflock-posix.c
endif

if WANT_AMFLOCK_FLOCK
libamanda_la_SOURCES += amflock-flock.c
endif

if WANT_AMFLOCK_LOCKF
libamanda_la_SOURCES += amflock-lockf.c
endif

if WANT_AMFLOCK_LNLOCK
libamanda_la_SOURCES += amflock-lnlock.c
endif


if WANT_RSH_SECURITY
libamanda_la_SOURCES += rsh-security.c
endif
if WANT_SSH_SECURITY
libamanda_la_SOURCES += ssh-security.c
endif
if WANT_BSD_SECURITY
libamanda_la_SOURCES += bsd-security.c
endif
if WANT_BSDTCP_SECURITY
libamanda_la_SOURCES += bsdtcp-security.c
endif
if WANT_BSDUDP_SECURITY
libamanda_la_SOURCES += bsdudp-security.c
endif
if WANT_KRB5_SECURITY
libamanda_la_SOURCES += krb5-security.c
endif

libamanda_la_SOURCES += local-security.c

libamanda_la_LDFLAGS =  -release $(VERSION) $(AS_NEEDED_FLAGS)

noinst_HEADERS =		\
	amanda.h		\
	amfeatures.h		\
	ipc-binary.h		\
	amxml.h			\
	arglist.h		\
	clock.h			\
	columnar.h		\
	directtcp.h		\
	amflock.h		\
	conffile.h		\
	debug.h			\
	dgram.h			\
	event.h			\
	file.h			\
	fileheader.h		\
	glib-util.h		\
	match.h			\
	packet.h		\
	pipespawn.h		\
	protocol.h		\
	amsemaphore.h		\
	security.h		\
	security-util.h		\
	simpleprng.h		\
	sl.h			\
	sockaddr-util.h		\
	stream.h		\
	tapelist.h		\
	timestamp.h		\
	util.h			\
	version.h

EXTRA_PROGRAMS = genversion $(TEST_PROGS)

# Version-building steps:
#
# 1. configure builds svn-info.h, if svn info is available; this
#    file is included in distribution tarballs
# 2. Makefile creates genversion.h with build-time information
# 3. Makefile builds genversion
# 4. Makefile runs genversion to create version.c
# 5. version.c is compiled into libamanda normally

genversion_SOURCES = genversion.c svn-info.h
genversion_LDADD = $(libamanda_la_LIBADD)	\
	../gnulib/libgnu.la

genversion.h: $(top_builddir)/config.status
	-rm -f $@ $@.new
	echo '#define CC "$(CC)"' > $@.new
	echo '#define BUILT_DATE "'`date`'"' >> $@.new
	echo '#define BUILT_MACH "$(target)"' >> $@.new
	mv $@.new $@

version.c: genversion$(EXEEXT)
	-rm -f version.c
	./genversion$(EXEEXT) > version.c

BUILT_SOURCES += genversion.h version.c

# these are used for testing only:
TEST_PROGS = file bsdsecurity

CLEANFILES += *.test.c
DISTCLEANFILES += version.c genversion genversion.h

# used for testing only

STANDARD_COMMON_STUFF_NOT_FILE = \
	alloc.lo \
	clock.lo \
	conffile.lo \
	debug.lo \
	glib-util.lo \
	util.lo \
	match.lo \
	sl.lo \
	sockaddr-util.lo \
	timestamp.lo

STANDARD_COMMON_STUFF = \
	$(STANDARD_COMMON_STUFF_NOT_FILE) \
	file.lo

file_SOURCES = file.test.c
file_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF_NOT_FILE)

bsdsecurity_SOURCES = bsd-security.test.c
bsdsecurity_LDADD = $(libamanda_a_LIBADD) \
		    alloc.lo \
		    clock.lo \
		    debug.lo \
		    dgram.lo \
		    event.lo \
		    file.lo \
		    packet.lo \
		    security.lo \
		    ssh-security.lo

# libtestutils.la
#
# Convenience library (never installed) for 'make check'-based tests.

noinst_LTLIBRARIES = libtestutils.la
libtestutils_la_SOURCES = \
	testutils.c \
	testutils.h

# automake-style tests

# automake-style tests

TESTS = amflock-test event-test amsemaphore-test quoting-test \
	ipc-binary-test hexencode-test fileheader-test match-test
noinst_PROGRAMS = $(TESTS)

amflock_test_SOURCES = amflock-test.c
amflock_test_LDADD = libamanda.la libtestutils.la

event_test_SOURCES = event-test.c
event_test_LDADD = libamanda.la libtestutils.la

amsemaphore_test_SOURCES = amsemaphore-test.c
amsemaphore_test_LDADD = libamanda.la libtestutils.la

quoting_test_SOURCES = quoting-test.c
quoting_test_LDADD = libamanda.la libtestutils.la

ipc_binary_test_SOURCES = ipc-binary-test.c
ipc_binary_test_LDADD = libamanda.la libtestutils.la

hexencode_test_SOURCES = hexencode-test.c
hexencode_test_LDADD = libamanda.la libtestutils.la

fileheader_test_SOURCES = fileheader-test.c
fileheader_test_LDADD = libamanda.la libtestutils.la

match_test_SOURCES = match-test.c
match_test_LDADD = libamanda.la libtestutils.la

# scripts

# divide scripts up both by language and destination directory
sbin_SCRIPTS_PERL = \
	    amgpgcrypt \
	    amcryptsimple \
	    amgetconf

amlibexec_SCRIPTS_PERL =

sbin_SCRIPTS_SHELL = \
	    amcrypt \
	    amaespipe \
	    amcrypt-ossl \
	    amcrypt-ossl-asym

amlibexec_SCRIPTS_SHELL = 

SCRIPTS_INCLUDE = \
	    amanda-sh-lib.sh

EXTRA_DIST += amanda-sh-lib.sh.in

SCRIPTS_PERL = $(sbin_SCRIPTS_PERL) $(amlibexec_SCRIPTS_PERL)
SCRIPTS_SHELL = $(sbin_SCRIPTS_SHELL) $(amlibexec_SCRIPTS_SHELL)

amlibexec_DATA = $(SCRIPTS_INCLUDE)
amlibexec_SCRIPTS = $(amlibexec_SCRIPTS_PERL) $(amlibexec_SCRIPTS_SHELL)
sbin_SCRIPTS = $(sbin_SCRIPTS_PERL) $(sbin_SCRIPTS_SHELL)

# installation

lint:
	@echo $(LINT) $(libamanda_la_SOURCES)
	@$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $(libamanda_la_SOURCES)
	@echo $(LINT) $(genversion_SOURCES)
	@$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $(genversion_SOURCES)

listlibsrc:
	@ for p in $(libamanda_la_SOURCES) $(REGEXCSRC); do	\
		listlibsrcs="$$listlibsrcs `pwd`/$$p";		\
	done;							\
	echo $$listlibsrcs >listlibsrc.output

%.test.c: $(srcdir)/%.c
	echo '#define TEST' >$@
	echo '#include "$<"' >>$@

distclean-local:
	if test `cd $(srcdir) && pwd` != `pwd`; then rm -f svn-info.h; fi
MAINTAINERCLEANFILES+=svn-info.h