~jamesodhunt/ubuntu/trusty/upstart/1.12.1

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
## Process this file with automake to produce Makefile.in

AM_CFLAGS = \
	$(NIH_CFLAGS) \
	$(NIH_DBUS_CFLAGS) \
	$(DBUS_CFLAGS)

AM_CPPFLAGS = \
	-DLOCALEDIR="\"$(localedir)\"" \
	-DSBINDIR="\"$(sbindir)\"" \
	-I$(top_builddir) -I$(top_srcdir) -iquote$(builddir) -iquote$(srcdir) \
	-I$(top_srcdir)/intl \
	-I$(top_srcdir)/test -iquote $(top_srcdir)/test

dist_man_MANS = \
	man/initctl.8 \
	man/reboot.8 \
	man/shutdown.8 \
	man/runlevel.8 \
	man/telinit.8 \
	man/runlevel.7

sbin_PROGRAMS = \
	initctl \
	reboot \
	runlevel \
	shutdown \
	telinit

initctl_SOURCES = \
	initctl.c initctl.h \
	$(top_srcdir)/init/xdg.c $(top_srcdir)/init/xdg.h
nodist_initctl_SOURCES = \
	$(com_ubuntu_Upstart_OUTPUTS) \
	$(com_ubuntu_Upstart_Job_OUTPUTS) \
	$(com_ubuntu_Upstart_Instance_OUTPUTS)
initctl_LDADD = \
	$(LTLIBINTL) \
	$(NIH_LIBS) \
	$(NIH_DBUS_LIBS) \
	$(DBUS_LIBS)

reboot_SOURCES = \
	reboot.c \
	utmp.c utmp.h
reboot_LDADD = \
	$(LTLIBINTL) \
	$(NIH_LIBS)

runlevel_SOURCES = \
	runlevel.c \
	utmp.c utmp.h
runlevel_LDADD = \
	$(LTLIBINTL) \
	$(NIH_LIBS)

shutdown_SOURCES = \
	shutdown.c \
	utmp.c utmp.h \
	sysv.c sysv.h
nodist_shutdown_SOURCES = \
	$(com_ubuntu_Upstart_OUTPUTS)
shutdown_LDADD = \
	$(LTLIBINTL) \
	$(NIH_LIBS) \
	$(NIH_DBUS_LIBS) \
	$(DBUS_LIBS)

telinit_SOURCES = \
	telinit.c \
	utmp.c utmp.h \
	sysv.c sysv.h
nodist_telinit_SOURCES = \
	$(com_ubuntu_Upstart_OUTPUTS) \
	$(com_ubuntu_Upstart_Instance_OUTPUTS)
telinit_LDADD = \
	$(LTLIBINTL) \
	$(NIH_LIBS) \
	$(NIH_DBUS_LIBS) \
	$(DBUS_LIBS)


com_ubuntu_Upstart_OUTPUTS = \
	com.ubuntu.Upstart.c \
	com.ubuntu.Upstart.h

com_ubuntu_Upstart_XML = \
	../dbus/com.ubuntu.Upstart.xml

$(com_ubuntu_Upstart_OUTPUTS): $(com_ubuntu_Upstart_XML)
	$(AM_V_GEN)$(NIH_DBUS_TOOL) \
		--package=$(PACKAGE) \
		--mode=proxy --prefix=upstart \
		--default-interface=com.ubuntu.Upstart0_6 \
		--output=$@ $<


com_ubuntu_Upstart_Job_OUTPUTS = \
	com.ubuntu.Upstart.Job.c \
	com.ubuntu.Upstart.Job.h

com_ubuntu_Upstart_Job_XML = \
	../dbus/com.ubuntu.Upstart.Job.xml

$(com_ubuntu_Upstart_Job_OUTPUTS): $(com_ubuntu_Upstart_Job_XML)
	$(AM_V_GEN)$(NIH_DBUS_TOOL) \
		--package=$(PACKAGE) \
		--mode=proxy --prefix=job_class \
		--default-interface=com.ubuntu.Upstart0_6.Job \
		--output=$@ $<


com_ubuntu_Upstart_Instance_OUTPUTS = \
	com.ubuntu.Upstart.Instance.c \
	com.ubuntu.Upstart.Instance.h

com_ubuntu_Upstart_Instance_XML = \
	../dbus/com.ubuntu.Upstart.Instance.xml

$(com_ubuntu_Upstart_Instance_OUTPUTS): $(com_ubuntu_Upstart_Instance_XML)
	$(AM_V_GEN)$(NIH_DBUS_TOOL) \
		--package=$(PACKAGE) \
		--mode=proxy --prefix=job \
		--default-interface=com.ubuntu.Upstart0_6.Instance \
		--output=$@ $<


# These have to be built sources because we can't compile object files
# without the header file existing first
BUILT_SOURCES = \
	$(com_ubuntu_Upstart_OUTPUTS) \
	$(com_ubuntu_Upstart_Job_OUTPUTS) \
	$(com_ubuntu_Upstart_Instance_OUTPUTS)

CLEANFILES = \
	$(com_ubuntu_Upstart_OUTPUTS) \
	$(com_ubuntu_Upstart_Job_OUTPUTS) \
	$(com_ubuntu_Upstart_Instance_OUTPUTS)


EXTRA_DIST = util.supp


install-data-hook:
	src=`echo initctl | sed '$(transform)'`.8; \
	for symlink in start stop restart reload status; do \
	  inst=`echo $$symlink | sed '$(transform)'`.8; \
          echo " ln -sf '$$src' '$(DESTDIR)$(man8dir)/$$inst'"; \
	  ln -sf "$$src" "$(DESTDIR)$(man8dir)/$$inst"; \
	done

	src=`echo reboot | sed '$(transform)'`.8; \
	for symlink in halt poweroff; do \
	  inst=`echo $$symlink | sed '$(transform)'`.8; \
          echo " ln -sf '$$src' '$(DESTDIR)$(man8dir)/$$inst'"; \
	  ln -sf "$$src" "$(DESTDIR)$(man8dir)/$$inst"; \
	done

install-exec-hook:
	src=`echo initctl | sed '$(transform);s/$$/$(EXEEXT)/'`; \
	for symlink in start stop restart reload status; do \
	  inst=`echo $$symlink | sed '$(transform);s/$$/$(EXEEXT)/'`; \
          echo " ln -sf '$$src' '$(DESTDIR)$(sbindir)/$$inst'"; \
	  ln -sf "$$src" "$(DESTDIR)$(sbindir)/$$inst"; \
	done

	src=`echo reboot | sed '$(transform);s/$$/$(EXEEXT)/'`; \
	for symlink in halt poweroff; do \
	  inst=`echo $$symlink | sed '$(transform);s/$$/$(EXEEXT)/'`; \
          echo " ln -sf '$$src' '$(DESTDIR)$(sbindir)/$$inst'"; \
	  ln -sf "$$src" "$(DESTDIR)$(sbindir)/$$inst"; \
	done

uninstall-hook:
	for symlink in start stop restart reload status halt poweroff; do \
	  file=`echo $$symlink | sed '$(transform)'`.8; \
          echo " rm -f '$(DESTDIR)$(man8dir)/$$file'"; \
	  rm -f "$(DESTDIR)$(man8dir)/$$file"; \
	  file=`echo $$symlink | sed '$(transform);s/$$/$(EXEEXT)/'`; \
          echo " rm -f '$(DESTDIR)$(sbindir)/$$file'"; \
	  rm -f "$(DESTDIR)$(sbindir)/$$file"; \
	done

# Ensure a clean test environment (that will not touch the running users
# one). Tests that need the variables listed below are expected to set
# them to appropriate temporary values as needed.
AM_TESTS_ENVIRONMENT= \
	unset -v \
		XDG_RUNTIME_DIR \
		DBUS_SESSION_BUS_ADDRESS \
		UPSTART_SESSION \
		UPSTART_INSTANCE \
		UPSTART_EVENTS \
		UPSTART_JOB;

if ENABLE_TAP_OUTPUT
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh
else
LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
endif

TESTS = \
	test_initctl \
	test_utmp \
	test_sysv \
	test_telinit

check_PROGRAMS = $(TESTS)

test_initctl_SOURCES = \
	tests/test_initctl.c \
	initctl.c \
	$(top_srcdir)/init/xdg.c $(top_srcdir)/init/xdg.h
test_initctl_CFLAGS = $(AM_CFLAGS) -DTEST
test_initctl_LDADD = \
	com.ubuntu.Upstart.o \
	com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
	$(top_builddir)/test/libtest_util_common.a \
	$(NIH_LIBS) \
	$(NIH_DBUS_LIBS) \
	$(DBUS_LIBS)

test_utmp_SOURCES = tests/test_utmp.c
test_utmp_LDADD = \
	utmp.o \
	$(NIH_LIBS)

test_sysv_SOURCES = tests/test_sysv.c
nodist_test_sysv_SOURCES = \
	$(com_ubuntu_Upstart_OUTPUTS)
test_sysv_LDADD = \
	sysv.o utmp.o \
	$(LTLIBINTL) \
	$(NIH_LIBS) \
	$(NIH_DBUS_LIBS) \
	$(DBUS_LIBS)

test_telinit_SOURCES = tests/test_telinit.c telinit.c
test_telinit_CFLAGS = $(AM_CFLAGS) -DTEST
test_telinit_LDADD = \
	sysv.o utmp.o \
	com.ubuntu.Upstart.o \
	com.ubuntu.Upstart.Job.o com.ubuntu.Upstart.Instance.o \
	$(NIH_LIBS) \
	$(NIH_DBUS_LIBS) \
	$(DBUS_LIBS)


.PHONY: tests
tests: $(BUILT_SOURCES) $(check_PROGRAMS) $(top_builddir)/init/init $(top_builddir)/test/libtest_util_common.a

clean-local:
	rm -f *.gcno *.gcda

maintainer-clean-local:
	rm -f *.gcov