~jamesodhunt/ubuntu/saucy/upstart/1.9.1

« back to all changes in this revision

Viewing changes to init/Makefile.am

  • Committer: James Hunt
  • Date: 2013-06-28 15:57:37 UTC
  • mfrom: (1436.2.1)
  • Revision ID: james.hunt@ubuntu.com-20130628155737-8bskclzrhmjvpm6e
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        -DCONFDIR="\"$(initconfdir)\"" \
18
18
        -DSBINDIR="\"$(sbindir)\"" \
19
19
        -I$(top_builddir) -I$(top_srcdir) -iquote$(builddir) -iquote$(srcdir) \
20
 
        -I$(top_srcdir)/intl
21
 
 
 
20
        -I$(top_srcdir)/intl \
 
21
        -I$(top_srcdir)/test -iquote$(top_srcdir)/test
22
22
 
23
23
dist_man_MANS = \
24
24
        man/init.8 \
60
60
        control.c control.h \
61
61
        xdg.c xdg.h \
62
62
        quiesce.c quiesce.h \
63
 
        errors.h
 
63
        errors.h \
 
64
        apparmor.c apparmor.h
64
65
nodist_init_SOURCES = \
65
66
        $(com_ubuntu_Upstart_OUTPUTS) \
66
67
        $(com_ubuntu_Upstart_Job_OUTPUTS) \
136
137
AM_CPPFLAGS += -DTEST_DATA_DIR="\"$(TEST_DATA_DIR)\""
137
138
 
138
139
TEST_DATA_FILES = \
139
 
        $(TEST_DATA_DIR)/upstart-1.6.json
140
 
 
141
 
EXTRA_DIST = init.supp $(TEST_DATA_FILES)
142
 
 
143
 
test_util_SOURCES = \
144
 
        tests/test_util.c tests/test_util.h
145
 
 
146
 
TESTS = \
 
140
        $(TEST_DATA_DIR)/upstart-1.6.json \
 
141
        $(TEST_DATA_DIR)/upstart-1.8.json \
 
142
        $(TEST_DATA_DIR)/upstart-pre-security.json \
 
143
        $(TEST_DATA_DIR)/upstart-1.8+full_serialisation-apparmor.json \
 
144
        $(TEST_DATA_DIR)/upstart-1.8+apparmor.json \
 
145
        $(TEST_DATA_DIR)/upstart-1.8+full_serialisation+apparmor.json
 
146
 
 
147
upstart_test_programs = \
147
148
        test_system \
148
149
        test_environ \
149
150
        test_process \
157
158
        test_blocked \
158
159
        test_parse_job \
159
160
        test_parse_conf \
160
 
        test_conf \
161
161
        test_conf_static \
162
162
        test_xdg \
163
 
        test_control
164
 
 
165
 
check_PROGRAMS = $(TESTS)
166
 
 
167
 
tests: $(BUILT_SOURCES) $(check_PROGRAMS)
 
163
        test_control \
 
164
        test_main
 
165
 
 
166
TESTS = \
 
167
        $(upstart_test_programs) \
 
168
        test_conf_preload.sh$(EXEEXT)
 
169
 
 
170
EXTRA_DIST = init.supp $(TEST_DATA_FILES) tests/test_conf_preload.sh.in
 
171
 
 
172
test_conf_preload.sh$(EXEEXT): tests/test_conf_preload.sh.in Makefile test_conf
 
173
        sed -e 's|[@]abs_builddir[@]|$(abs_builddir)|g' \
 
174
            -e 's|[@]inotify_preload_library[@]|$(check_LTLIBRARIES)|g' \
 
175
            $< > $@
 
176
        chmod +x $@
 
177
 
 
178
check_PROGRAMS = $(upstart_test_programs) test_conf
 
179
 
 
180
check_SCRIPTS = test_conf_preload.sh$(EXEEXT)
 
181
CLEANFILES += $(check_SCRIPTS)
 
182
 
 
183
tests: $(BUILT_SOURCES) $(check_PROGRAMS) $(check_LTLIBRARIES) $(top_builddir)/util/initctl $(top_builddir)/test/libtest_util_common.a
168
184
 
169
185
test_system_SOURCES = tests/test_system.c
170
186
test_system_LDADD = \
176
192
        environ.o \
177
193
        $(NIH_LIBS)
178
194
 
179
 
test_process_SOURCES = tests/test_process.c $(test_util_SOURCES)
 
195
test_process_SOURCES = tests/test_process.c
180
196
test_process_LDADD = \
181
197
        system.o environ.o process.o \
182
198
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
183
199
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
184
 
        session.o log.o state.o xdg.o \
 
200
        session.o log.o state.o xdg.o apparmor.o \
185
201
        com.ubuntu.Upstart.o \
186
202
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
 
203
        $(top_builddir)/test/libtest_util_common.a \
187
204
        $(NIH_LIBS) \
188
205
        $(NIH_DBUS_LIBS) \
189
206
        $(DBUS_LIBS) \
195
212
        system.o environ.o process.o \
196
213
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
197
214
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
198
 
        session.o log.o state.o xdg.o \
 
215
        session.o log.o state.o xdg.o apparmor.o \
199
216
        com.ubuntu.Upstart.o \
200
217
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
201
218
        $(NIH_LIBS) \
204
221
        $(JSON_LIBS) \
205
222
        -lrt
206
223
 
207
 
test_job_process_SOURCES = tests/test_job_process.c $(test_util_SOURCES)
 
224
test_job_process_SOURCES = tests/test_job_process.c
208
225
test_job_process_LDADD = \
209
226
        system.o environ.o process.o \
210
227
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
211
228
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
212
 
        session.o log.o state.o xdg.o \
 
229
        session.o log.o state.o xdg.o apparmor.o \
213
230
        com.ubuntu.Upstart.o \
214
231
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
 
232
        $(top_builddir)/test/libtest_util_common.a \
215
233
        $(NIH_LIBS) \
216
234
        $(NIH_DBUS_LIBS) \
217
235
        $(DBUS_LIBS) \
223
241
        system.o environ.o process.o \
224
242
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
225
243
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
226
 
        session.o log.o state.o xdg.o \
 
244
        session.o log.o state.o xdg.o apparmor.o \
227
245
        com.ubuntu.Upstart.o \
228
246
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
229
247
        $(NIH_LIBS) \
232
250
        $(JSON_LIBS) \
233
251
        -lrt
234
252
 
235
 
test_log_SOURCES = tests/test_log.c $(test_util_SOURCES)
 
253
test_log_SOURCES = tests/test_log.c
236
254
test_log_LDADD = \
237
255
        system.o environ.o process.o \
238
256
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
239
257
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
240
 
        session.o log.o state.o xdg.o \
 
258
        session.o log.o state.o xdg.o apparmor.o \
241
259
        com.ubuntu.Upstart.o \
242
260
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
 
261
        $(top_builddir)/test/libtest_util_common.a \
243
262
        $(NIH_LIBS) \
244
263
        $(NIH_DBUS_LIBS) \
245
264
        $(DBUS_LIBS) \
246
265
        $(JSON_LIBS) \
247
266
        -lrt -lutil
248
267
 
249
 
test_state_SOURCES = tests/test_state.c $(test_util_SOURCES)
 
268
test_state_SOURCES = tests/test_state.c tests/test_util.c tests/test_util.h
250
269
test_state_LDADD = \
251
270
        system.o environ.o process.o \
252
271
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
253
272
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
254
 
        session.o log.o state.o xdg.o \
 
273
        session.o log.o state.o xdg.o apparmor.o \
255
274
        com.ubuntu.Upstart.o \
256
275
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
 
276
        $(top_builddir)/test/libtest_util_common.a \
257
277
        $(NIH_LIBS) \
258
278
        $(NIH_DBUS_LIBS) \
259
279
        $(DBUS_LIBS) \
265
285
        system.o environ.o process.o \
266
286
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
267
287
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
268
 
        session.o log.o state.o xdg.o \
 
288
        session.o log.o state.o xdg.o apparmor.o \
269
289
        com.ubuntu.Upstart.o \
270
290
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
271
291
        $(NIH_LIBS) \
274
294
        $(JSON_LIBS) \
275
295
        -lrt
276
296
 
277
 
test_event_operator_SOURCES = tests/test_event_operator.c $(test_util_SOURCES)
 
297
test_event_operator_SOURCES = tests/test_event_operator.c tests/test_util.c tests/test_util.h
278
298
test_event_operator_LDADD = \
279
299
        system.o environ.o process.o \
280
300
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
281
301
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
282
 
        session.o log.o state.o xdg.o \
 
302
        session.o log.o state.o xdg.o apparmor.o \
283
303
        com.ubuntu.Upstart.o \
284
304
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
 
305
        $(top_builddir)/test/libtest_util_common.a \
285
306
        $(NIH_LIBS) \
286
307
        $(NIH_DBUS_LIBS) \
287
308
        $(DBUS_LIBS) \
293
314
        system.o environ.o process.o \
294
315
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
295
316
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
296
 
        session.o log.o state.o xdg.o \
 
317
        session.o log.o state.o xdg.o apparmor.o \
297
318
        com.ubuntu.Upstart.o \
298
319
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
299
320
        $(NIH_LIBS) \
307
328
        system.o environ.o process.o \
308
329
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
309
330
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
310
 
        session.o log.o state.o xdg.o \
 
331
        session.o log.o state.o xdg.o apparmor.o \
311
332
        com.ubuntu.Upstart.o \
312
333
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
313
334
        $(NIH_LIBS) \
321
342
        system.o environ.o process.o \
322
343
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
323
344
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
324
 
        session.o log.o state.o xdg.o \
 
345
        session.o log.o state.o xdg.o apparmor.o \
325
346
        com.ubuntu.Upstart.o \
326
347
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
327
348
        $(NIH_LIBS) \
330
351
        $(JSON_LIBS) \
331
352
        -lrt
332
353
 
333
 
test_conf_SOURCES = tests/test_conf.c $(test_util_SOURCES)
 
354
check_LTLIBRARIES = tests/libwrap_inotify.la
 
355
tests_libwrap_inotify_la_SOURCES = tests/wrap_inotify.c
 
356
tests_libwrap_inotify_la_LIBADD = -lrt -ldl $(AM_LIBADD)
 
357
tests_libwrap_inotify_la_LDFLAGS = avoid-version -module -shared -export-dynamic -rpath /nowhere -ldl
 
358
 
 
359
test_conf_SOURCES = tests/test_conf.c $(check_LTLIBRARIES)
334
360
test_conf_LDADD = \
335
361
        system.o environ.o process.o \
336
362
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
337
363
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
338
 
        session.o log.o state.o xdg.o \
 
364
        session.o log.o state.o xdg.o apparmor.o \
339
365
        com.ubuntu.Upstart.o \
340
366
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
 
367
        $(top_builddir)/test/libtest_util_common.a \
341
368
        $(NIH_LIBS) \
342
369
        $(NIH_DBUS_LIBS) \
343
370
        $(DBUS_LIBS) \
349
376
        system.o environ.o process.o \
350
377
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
351
378
        parse_job.o parse_conf.o control.o quiesce.o \
352
 
        session.o log.o state.o xdg.o \
 
379
        session.o log.o state.o xdg.o apparmor.o \
353
380
        com.ubuntu.Upstart.o \
354
381
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
355
382
        $(NIH_LIBS) \
370
397
        system.o environ.o process.o \
371
398
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
372
399
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
373
 
        session.o log.o state.o xdg.o \
 
400
        session.o log.o state.o xdg.o apparmor.o \
374
401
        com.ubuntu.Upstart.o \
375
402
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
376
403
        $(NIH_LIBS) \
379
406
        $(JSON_LIBS) \
380
407
        -lrt
381
408
 
 
409
test_main_SOURCES = tests/test_main.c
 
410
test_main_LDADD = \
 
411
        system.o environ.o process.o \
 
412
        job_class.o job_process.o job.o event.o event_operator.o blocked.o \
 
413
        parse_job.o parse_conf.o conf.o control.o quiesce.o \
 
414
        session.o log.o state.o xdg.o apparmor.o \
 
415
        com.ubuntu.Upstart.o \
 
416
        com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
 
417
        $(top_builddir)/test/libtest_util_common.a \
 
418
        $(NIH_LIBS) \
 
419
        $(NIH_DBUS_LIBS) \
 
420
        $(DBUS_LIBS) \
 
421
        $(JSON_LIBS) \
 
422
        -lrt
382
423
 
383
424
install-data-local:
384
425
        $(MKDIR_P) $(DESTDIR)$(initconfdir)
388
429
 
389
430
maintainer-clean-local:
390
431
        rm -f *.gcov
 
432
 
 
433
FORCE:
 
434
 
 
435
$(top_builddir)/util/initctl $(top_builddir)/test/libtest_util_common.a: FORCE
 
436
        (cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) )
 
437
        (cd $(top_builddir)/test && $(MAKE) $(AM_MAKEFLAGS) libtest_util_common.a)