]>
Commit | Line | Data |
---|---|---|
1 | # This file is part of systemd. | |
2 | # | |
3 | # Copyright 2010 Lennart Poettering | |
4 | # | |
5 | # systemd is free software; you can redistribute it and/or modify it | |
6 | # under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 2 of the License, or | |
8 | # (at your option) any later version. | |
9 | # | |
10 | # systemd is distributed in the hope that it will be useful, but | |
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | # General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
17 | ||
18 | ACLOCAL_AMFLAGS = -I m4 | |
19 | ||
20 | # Dirs of external packages | |
21 | dbuspolicydir=@dbuspolicydir@ | |
22 | dbussessionservicedir=@dbussessionservicedir@ | |
23 | dbussystemservicedir=@dbussystemservicedir@ | |
24 | dbusinterfacedir=@dbusinterfacedir@ | |
25 | udevrulesdir=@udevrulesdir@ | |
26 | pamlibdir=@pamlibdir@ | |
27 | pkgconfigdatadir=$(datadir)/pkgconfig | |
28 | ||
29 | # Our own, non-special dirs | |
30 | pkgsysconfdir=$(sysconfdir)/systemd | |
31 | sessionunitdir=$(pkgdatadir)/session | |
32 | ||
33 | # And these are the special ones for / | |
34 | rootdir=@rootdir@ | |
35 | rootbindir=$(rootdir)/bin | |
36 | rootlibexecdir=$(rootdir)/lib/systemd | |
37 | systemunitdir=$(rootdir)/lib/systemd/system | |
38 | ||
39 | AM_CPPFLAGS = \ | |
40 | -include $(top_builddir)/config.h \ | |
41 | -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \ | |
42 | -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \ | |
43 | -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \ | |
44 | -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \ | |
45 | -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \ | |
46 | -DSESSION_CONFIG_FILE=\"$(pkgsysconfdir)/session.conf\" \ | |
47 | -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \ | |
48 | -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \ | |
49 | -DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \ | |
50 | -DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \ | |
51 | -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \ | |
52 | -DRUNTIME_DIR=\"$(localstatedir)/run\" \ | |
53 | -I $(top_srcdir)/src | |
54 | ||
55 | rootbin_PROGRAMS = \ | |
56 | systemd \ | |
57 | systemctl \ | |
58 | systemd-notify | |
59 | ||
60 | bin_PROGRAMS = \ | |
61 | systemd-install \ | |
62 | systemd-cgls | |
63 | ||
64 | if HAVE_GTK | |
65 | bin_PROGRAMS += \ | |
66 | systemadm | |
67 | endif | |
68 | ||
69 | rootlibexec_PROGRAMS = \ | |
70 | systemd-logger \ | |
71 | systemd-cgroups-agent \ | |
72 | systemd-initctl | |
73 | ||
74 | noinst_PROGRAMS = \ | |
75 | test-engine \ | |
76 | test-job-type \ | |
77 | test-ns \ | |
78 | test-loopback \ | |
79 | test-daemon \ | |
80 | test-cgroup | |
81 | ||
82 | if HAVE_PAM | |
83 | pamlib_LTLIBRARIES = \ | |
84 | pam_systemd.la | |
85 | endif | |
86 | ||
87 | dist_pkgsysconf_DATA = \ | |
88 | src/system.conf | |
89 | ||
90 | dist_dbuspolicy_DATA = \ | |
91 | src/org.freedesktop.systemd1.conf | |
92 | ||
93 | dist_dbussystemservice_DATA = \ | |
94 | src/org.freedesktop.systemd1.service | |
95 | ||
96 | dist_udevrules_DATA = \ | |
97 | src/99-systemd.rules | |
98 | ||
99 | dbusinterface_DATA = \ | |
100 | org.freedesktop.systemd1.Manager.xml \ | |
101 | org.freedesktop.systemd1.Job.xml \ | |
102 | org.freedesktop.systemd1.Unit.xml \ | |
103 | org.freedesktop.systemd1.Service.xml \ | |
104 | org.freedesktop.systemd1.Socket.xml \ | |
105 | org.freedesktop.systemd1.Timer.xml \ | |
106 | org.freedesktop.systemd1.Target.xml \ | |
107 | org.freedesktop.systemd1.Device.xml \ | |
108 | org.freedesktop.systemd1.Mount.xml \ | |
109 | org.freedesktop.systemd1.Automount.xml \ | |
110 | org.freedesktop.systemd1.Snapshot.xml \ | |
111 | org.freedesktop.systemd1.Swap.xml \ | |
112 | org.freedesktop.systemd1.Path.xml | |
113 | ||
114 | dist_systemunit_DATA = \ | |
115 | units/emergency.service \ | |
116 | units/basic.target \ | |
117 | units/getty.target \ | |
118 | units/halt.target \ | |
119 | units/local-fs.target \ | |
120 | units/network.target \ | |
121 | units/nss-lookup.target \ | |
122 | units/mail-transfer-agent.target \ | |
123 | units/poweroff.target \ | |
124 | units/reboot.target \ | |
125 | units/rescue.target \ | |
126 | units/rpcbind.target \ | |
127 | units/rtc-set.target \ | |
128 | units/shutdown.target \ | |
129 | units/umount.target \ | |
130 | units/sigpwr.target \ | |
131 | units/sockets.target \ | |
132 | units/swap.target \ | |
133 | units/dbus.target \ | |
134 | units/systemd-initctl.socket \ | |
135 | units/systemd-logger.socket \ | |
136 | units/dev-hugepages.automount \ | |
137 | units/dev-hugepages.mount \ | |
138 | units/dev-mqueue.automount \ | |
139 | units/dev-mqueue.mount \ | |
140 | units/proc-sys-fs-binfmt_misc.automount \ | |
141 | units/proc-sys-fs-binfmt_misc.mount \ | |
142 | units/sys-kernel-debug.automount \ | |
143 | units/sys-kernel-debug.mount \ | |
144 | units/sys-kernel-security.automount \ | |
145 | units/sys-kernel-security.mount \ | |
146 | units/var-lock.mount \ | |
147 | units/var-run.mount | |
148 | ||
149 | nodist_systemunit_DATA = \ | |
150 | units/sysinit.target \ | |
151 | units/getty@.service \ | |
152 | units/graphical.target \ | |
153 | units/remote-fs.target \ | |
154 | units/multi-user.target \ | |
155 | units/systemd-initctl.service \ | |
156 | units/systemd-logger.service \ | |
157 | units/syslog.target | |
158 | ||
159 | dist_sessionunit_DATA = \ | |
160 | units/session/default.target | |
161 | ||
162 | nodist_sessionunit_DATA = \ | |
163 | units/session/remote-fs.target \ | |
164 | units/session/exit.service | |
165 | ||
166 | EXTRA_DIST = \ | |
167 | units/sysinit.target.m4 \ | |
168 | units/getty@.service.m4 \ | |
169 | units/graphical.target.m4 \ | |
170 | units/multi-user.target.m4 \ | |
171 | units/remote-fs.target.m4 \ | |
172 | units/systemd-initctl.service.in \ | |
173 | units/systemd-logger.service.in \ | |
174 | units/syslog.target.in \ | |
175 | units/session/exit.service.in \ | |
176 | systemd.pc.in | |
177 | ||
178 | if TARGET_FEDORA | |
179 | dist_systemunit_DATA += \ | |
180 | units/fedora/halt.service \ | |
181 | units/fedora/killall.service \ | |
182 | units/fedora/poweroff.service \ | |
183 | units/fedora/prefdm.service \ | |
184 | units/fedora/rc-local.service \ | |
185 | units/fedora/reboot.service \ | |
186 | units/fedora/sysinit.service | |
187 | endif | |
188 | ||
189 | if TARGET_SUSE | |
190 | dist_systemunit_DATA += \ | |
191 | units/suse/halt.service \ | |
192 | units/suse/poweroff.service \ | |
193 | units/suse/reboot.service | |
194 | endif | |
195 | ||
196 | if TARGET_GENTOO | |
197 | dist_systemunit_DATA += \ | |
198 | units/gentoo/halt.service \ | |
199 | units/gentoo/killall.service \ | |
200 | units/gentoo/poweroff.service \ | |
201 | units/gentoo/reboot.service \ | |
202 | units/gentoo/xdm.service | |
203 | endif | |
204 | ||
205 | if TARGET_ARCH | |
206 | dist_systemunit_DATA += \ | |
207 | units/arch/sysinit.service \ | |
208 | units/arch/rc-local.service \ | |
209 | units/arch/halt.service \ | |
210 | units/arch/poweroff.service \ | |
211 | units/arch/reboot.service | |
212 | endif | |
213 | ||
214 | dist_doc_DATA = \ | |
215 | README \ | |
216 | LICENSE \ | |
217 | DISTRO_PORTING \ | |
218 | src/sd-daemon.h \ | |
219 | src/sd-daemon.c | |
220 | ||
221 | pkgconfigdata_DATA = \ | |
222 | systemd.pc | |
223 | ||
224 | noinst_LTLIBRARIES = \ | |
225 | libsystemd-basic.la \ | |
226 | libsystemd-core.la | |
227 | ||
228 | libsystemd_basic_la_SOURCES = \ | |
229 | src/util.c \ | |
230 | src/hashmap.c \ | |
231 | src/set.c \ | |
232 | src/strv.c \ | |
233 | src/conf-parser.c \ | |
234 | src/socket-util.c \ | |
235 | src/log.c \ | |
236 | src/ratelimit.c | |
237 | ||
238 | libsystemd_core_la_SOURCES = \ | |
239 | src/unit.c \ | |
240 | src/job.c \ | |
241 | src/manager.c \ | |
242 | src/path-lookup.c \ | |
243 | src/load-fragment.c \ | |
244 | src/service.c \ | |
245 | src/automount.c \ | |
246 | src/mount.c \ | |
247 | src/swap.c \ | |
248 | src/device.c \ | |
249 | src/target.c \ | |
250 | src/snapshot.c \ | |
251 | src/socket.c \ | |
252 | src/timer.c \ | |
253 | src/path.c \ | |
254 | src/load-dropin.c \ | |
255 | src/execute.c \ | |
256 | src/dbus.c \ | |
257 | src/dbus-manager.c \ | |
258 | src/dbus-unit.c \ | |
259 | src/dbus-job.c \ | |
260 | src/dbus-service.c \ | |
261 | src/dbus-socket.c \ | |
262 | src/dbus-timer.c \ | |
263 | src/dbus-target.c \ | |
264 | src/dbus-mount.c \ | |
265 | src/dbus-automount.c \ | |
266 | src/dbus-swap.c \ | |
267 | src/dbus-snapshot.c \ | |
268 | src/dbus-device.c \ | |
269 | src/dbus-execute.c \ | |
270 | src/dbus-path.c \ | |
271 | src/cgroup.c \ | |
272 | src/mount-setup.c \ | |
273 | src/hostname-setup.c \ | |
274 | src/loopback-setup.c \ | |
275 | src/kmod-setup.c \ | |
276 | src/modprobe-setup.c \ | |
277 | src/utmp-wtmp.c \ | |
278 | src/specifier.c \ | |
279 | src/unit-name.c \ | |
280 | src/fdset.c \ | |
281 | src/namespace.c \ | |
282 | src/tcpwrap.c \ | |
283 | src/cgroup-util.c | |
284 | ||
285 | libsystemd_core_la_CFLAGS = \ | |
286 | $(AM_CFLAGS) \ | |
287 | $(DBUS_CFLAGS) \ | |
288 | $(UDEV_CFLAGS) | |
289 | ||
290 | libsystemd_core_la_LIBADD = \ | |
291 | libsystemd-basic.la \ | |
292 | $(DBUS_LIBS) \ | |
293 | $(UDEV_LIBS) \ | |
294 | $(LIBWRAP_LIBS) \ | |
295 | $(PAM_LIBS) | |
296 | ||
297 | # This is needed because automake is buggy in how it generates the | |
298 | # rules for C programs, but not Vala programs. We therefore can't | |
299 | # list the .h files as dependencies if we want make dist to work. | |
300 | ||
301 | EXTRA_DIST += \ | |
302 | ${libsystemd_basic_la_SOURCES:.c=.h} \ | |
303 | ${libsystemd_core_la_SOURCES:.c=.h} \ | |
304 | src/macro.h \ | |
305 | src/ioprio.h \ | |
306 | src/missing.h \ | |
307 | src/list.h \ | |
308 | src/securebits.h \ | |
309 | src/linux/auto_dev-ioctl.h \ | |
310 | src/initreq.h \ | |
311 | src/sd-daemon.h \ | |
312 | src/special.h \ | |
313 | src/dbus-common.h \ | |
314 | src/bus-errors.h \ | |
315 | src/cgroup-show.h | |
316 | ||
317 | MANPAGES = \ | |
318 | man/systemd.1 \ | |
319 | man/systemctl.1 \ | |
320 | man/systemadm.1 \ | |
321 | man/systemd-install.1 \ | |
322 | man/systemd-cgls.1 \ | |
323 | man/systemd-notify.1 \ | |
324 | man/sd_notify.3 \ | |
325 | man/sd_booted.3 \ | |
326 | man/sd_listen_fds.3 \ | |
327 | man/sd_is_fifo.3 \ | |
328 | man/systemd.unit.5 \ | |
329 | man/systemd.service.5 \ | |
330 | man/systemd.socket.5 \ | |
331 | man/systemd.mount.5 \ | |
332 | man/systemd.automount.5 \ | |
333 | man/systemd.swap.5 \ | |
334 | man/systemd.timer.5 \ | |
335 | man/systemd.path.5 \ | |
336 | man/systemd.target.5 \ | |
337 | man/systemd.device.5 \ | |
338 | man/systemd.snapshot.5 \ | |
339 | man/systemd.exec.5 \ | |
340 | man/daemon.7 \ | |
341 | man/sd-daemon.7 \ | |
342 | man/runlevel.8 \ | |
343 | man/telinit.8 \ | |
344 | man/halt.8 \ | |
345 | man/shutdown.8 \ | |
346 | man/pam_systemd.8 \ | |
347 | man/systemd.conf.5 | |
348 | ||
349 | MANPAGES_ALIAS = \ | |
350 | man/reboot.8 \ | |
351 | man/poweroff.8 \ | |
352 | man/sd_is_socket.3 \ | |
353 | man/sd_is_socket_unix.3 \ | |
354 | man/sd_is_socket_inet.3 \ | |
355 | man/sd_notifyf.3 \ | |
356 | man/init.1 | |
357 | ||
358 | man/reboot.8: man/halt.8 | |
359 | man/poweroff.8: man/halt.8 | |
360 | man/sd_is_socket.3: man/sd_is_fifo.3 | |
361 | man/sd_is_socket_unix.3: man/sd_is_fifo.3 | |
362 | man/sd_is_socket_inet.3: man/sd_is_fifo.3 | |
363 | man/sd_notifyf.3: man/sd_notify.3 | |
364 | man/init.1: man/systemd.1 | |
365 | ||
366 | dist_man_MANS = \ | |
367 | $(MANPAGES) \ | |
368 | $(MANPAGES_ALIAS) | |
369 | ||
370 | nodist_man_MANS = \ | |
371 | man/systemd.special.7 | |
372 | ||
373 | XML_FILES = \ | |
374 | ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}} | |
375 | ||
376 | XML_IN_FILES = \ | |
377 | ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}} | |
378 | ||
379 | dist_noinst_DATA = \ | |
380 | ${XML_FILES:.xml=.html} | |
381 | ||
382 | nodist_noinst_DATA = \ | |
383 | ${XML_IN_FILES:.xml.in=.html} | |
384 | ||
385 | EXTRA_DIST += \ | |
386 | $(XML_FILES) \ | |
387 | $(XML_IN_FILES) \ | |
388 | ${nodist_man_MANS:=.in} \ | |
389 | ${XML_IN_FILES:.xml.in=.html.in} | |
390 | ||
391 | systemd_SOURCES = \ | |
392 | src/main.c | |
393 | ||
394 | systemd_CFLAGS = \ | |
395 | $(AM_CFLAGS) \ | |
396 | $(DBUS_CFLAGS) \ | |
397 | $(UDEV_CFLAGS) | |
398 | ||
399 | systemd_LDADD = \ | |
400 | libsystemd-core.la | |
401 | ||
402 | test_engine_SOURCES = \ | |
403 | src/test-engine.c | |
404 | ||
405 | test_engine_CFLAGS = $(systemd_CFLAGS) | |
406 | test_engine_LDADD = $(systemd_LDADD) | |
407 | ||
408 | test_job_type_SOURCES = \ | |
409 | src/test-job-type.c | |
410 | ||
411 | test_job_type_CFLAGS = $(systemd_CFLAGS) | |
412 | test_job_type_LDADD = $(systemd_LDADD) | |
413 | ||
414 | test_ns_SOURCES = \ | |
415 | src/test-ns.c | |
416 | ||
417 | test_ns_CFLAGS = $(systemd_CFLAGS) | |
418 | test_ns_LDADD = $(systemd_LDADD) | |
419 | ||
420 | test_loopback_SOURCES = \ | |
421 | src/test-loopback.c \ | |
422 | src/loopback-setup.c | |
423 | ||
424 | test_loopback_LDADD = \ | |
425 | libsystemd-basic.la | |
426 | ||
427 | test_daemon_SOURCES = \ | |
428 | src/test-daemon.c \ | |
429 | src/sd-daemon.c | |
430 | ||
431 | test_daemon_LDADD = \ | |
432 | libsystemd-basic.la | |
433 | ||
434 | test_cgroup_SOURCES = \ | |
435 | src/test-cgroup.c \ | |
436 | src/cgroup-util.c | |
437 | ||
438 | test_cgroup_CFLAGS = \ | |
439 | $(AM_CFLAGS) | |
440 | ||
441 | test_cgroup_LDADD = \ | |
442 | libsystemd-basic.la | |
443 | ||
444 | systemd_logger_SOURCES = \ | |
445 | src/logger.c \ | |
446 | src/sd-daemon.c \ | |
447 | src/tcpwrap.c | |
448 | ||
449 | systemd_logger_LDADD = \ | |
450 | libsystemd-basic.la \ | |
451 | $(LIBWRAP_LIBS) | |
452 | ||
453 | systemd_initctl_SOURCES = \ | |
454 | src/initctl.c \ | |
455 | src/sd-daemon.c \ | |
456 | src/dbus-common.c | |
457 | ||
458 | systemd_initctl_CFLAGS = \ | |
459 | $(AM_CFLAGS) \ | |
460 | $(DBUS_CFLAGS) | |
461 | ||
462 | systemd_initctl_LDADD = \ | |
463 | libsystemd-basic.la \ | |
464 | $(DBUS_LIBS) | |
465 | ||
466 | systemd_cgroups_agent_SOURCES = \ | |
467 | src/cgroups-agent.c | |
468 | ||
469 | systemd_cgroups_agent_CFLAGS = \ | |
470 | $(AM_CFLAGS) \ | |
471 | $(DBUS_CFLAGS) | |
472 | ||
473 | systemd_cgroups_agent_LDADD = \ | |
474 | libsystemd-basic.la \ | |
475 | $(DBUS_LIBS) | |
476 | ||
477 | systemctl_SOURCES = \ | |
478 | src/systemctl.c \ | |
479 | src/utmp-wtmp.c \ | |
480 | src/dbus-common.c \ | |
481 | src/cgroup-show.c \ | |
482 | src/cgroup-util.c | |
483 | ||
484 | systemctl_CFLAGS = \ | |
485 | $(AM_CFLAGS) \ | |
486 | $(DBUS_CFLAGS) | |
487 | ||
488 | systemctl_LDADD = \ | |
489 | libsystemd-basic.la \ | |
490 | $(DBUS_LIBS) | |
491 | ||
492 | systemd_notify_SOURCES = \ | |
493 | src/notify.c \ | |
494 | src/sd-daemon.c | |
495 | ||
496 | systemd_notify_LDADD = \ | |
497 | libsystemd-basic.la | |
498 | ||
499 | systemd_install_SOURCES = \ | |
500 | src/install.c \ | |
501 | src/path-lookup.c \ | |
502 | src/dbus-common.c \ | |
503 | src/sd-daemon.c | |
504 | ||
505 | systemd_install_LDADD = \ | |
506 | libsystemd-basic.la \ | |
507 | $(DBUS_LIBS) | |
508 | ||
509 | systemd_install_CFLAGS = \ | |
510 | $(AM_CFLAGS) \ | |
511 | $(DBUS_CFLAGS) | |
512 | ||
513 | systemd_cgls_SOURCES = \ | |
514 | src/systemd-cgls.c \ | |
515 | src/cgroup-show.c \ | |
516 | src/cgroup-util.c | |
517 | ||
518 | systemd_cgls_CFLAGS = \ | |
519 | $(AM_CFLAGS) | |
520 | ||
521 | systemd_cgls_LDADD = \ | |
522 | libsystemd-basic.la | |
523 | ||
524 | systemadm_SOURCES = \ | |
525 | src/systemadm.vala \ | |
526 | src/systemd-interfaces.vala | |
527 | ||
528 | systemadm_CFLAGS = \ | |
529 | $(AM_CFLAGS) \ | |
530 | $(DBUSGLIB_CFLAGS) \ | |
531 | $(GTK_CFLAGS) \ | |
532 | -Wno-unused-variable \ | |
533 | -Wno-unused-function \ | |
534 | -Wno-shadow \ | |
535 | -Wno-format-nonliteral | |
536 | ||
537 | systemadm_VALAFLAGS = \ | |
538 | --pkg=dbus-glib-1 \ | |
539 | --pkg=posix \ | |
540 | --pkg=gtk+-2.0 \ | |
541 | -g | |
542 | ||
543 | systemadm_LDADD = \ | |
544 | $(DBUSGLIB_LIBS) \ | |
545 | $(GTK_LIBS) | |
546 | ||
547 | pam_systemd_la_SOURCES = \ | |
548 | src/pam-module.c \ | |
549 | src/cgroup-util.c \ | |
550 | src/sd-daemon.c | |
551 | ||
552 | pam_systemd_la_CFLAGS = \ | |
553 | $(AM_CFLAGS) | |
554 | -fvisibility=hidden | |
555 | ||
556 | pam_systemd_la_LDFLAGS = \ | |
557 | -module \ | |
558 | -export-dynamic \ | |
559 | -avoid-version \ | |
560 | -shared \ | |
561 | -export-symbols-regex '^pam_sm_.*' | |
562 | ||
563 | pam_systemd_la_LIBADD = \ | |
564 | libsystemd-basic.la \ | |
565 | $(PAM_LIBS) | |
566 | ||
567 | SED_PROCESS = \ | |
568 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
569 | $(SED) -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \ | |
570 | -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \ | |
571 | -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \ | |
572 | -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \ | |
573 | -e 's,@pkgdatadir\@,$(pkgdatadir),g' \ | |
574 | -e 's,@systemunitdir\@,$(systemunitdir),g' \ | |
575 | -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ | |
576 | -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ | |
577 | -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \ | |
578 | -e 's,@prefix\@,$(prefix),g' \ | |
579 | < $< > $@ | |
580 | ||
581 | units/%: units/%.in Makefile | |
582 | $(SED_PROCESS) | |
583 | ||
584 | man/%: man/%.in Makefile | |
585 | $(SED_PROCESS) | |
586 | ||
587 | %.pc: %.pc.in Makefile | |
588 | $(SED_PROCESS) | |
589 | ||
590 | M4_PROCESS_SYSTEM = \ | |
591 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
592 | $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ | |
593 | ||
594 | M4_PROCESS_SESSION = \ | |
595 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
596 | $(M4) -P $(M4_DISTRO_FLAG) -DFOR_SESSION=1 < $< > $@ | |
597 | ||
598 | units/%: units/%.m4 Makefile | |
599 | $(M4_PROCESS_SYSTEM) | |
600 | ||
601 | units/session/%: units/%.m4 Makefile | |
602 | $(M4_PROCESS_SESSION) | |
603 | ||
604 | CLEANFILES = \ | |
605 | $(nodist_systemunit_DATA) \ | |
606 | $(nodist_sessionunit_DATA) \ | |
607 | $(nodist_man_MANS) \ | |
608 | ${XML_IN_FILES:.xml.in=.html} \ | |
609 | $(pkgconfigdata_DATA) | |
610 | ||
611 | if HAVE_VALAC | |
612 | CLEANFILES += \ | |
613 | ${systemadm_SOURCES:.vala=.c} | |
614 | endif | |
615 | ||
616 | if HAVE_XSLTPROC | |
617 | XSLTPROC_FLAGS = \ | |
618 | --nonet \ | |
619 | --param funcsynopsis.style "'ansi'" | |
620 | ||
621 | XSLTPROC_PROCESS_MAN = \ | |
622 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
623 | $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | |
624 | ||
625 | XSLTPROC_PROCESS_MAN_IN = \ | |
626 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
627 | $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \ | |
628 | mv ${@:.in=} $@ | |
629 | ||
630 | XSLTPROC_PROCESS_HTML = \ | |
631 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
632 | $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< | |
633 | ||
634 | XSLTPROC_PROCESS_HTML_IN = \ | |
635 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
636 | $(XSLTPROC) -o ${@:.in=} $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $< && \ | |
637 | mv ${@:.in=} $@ | |
638 | ||
639 | man/%.1: man/%.xml | |
640 | $(XSLTPROC_PROCESS_MAN) | |
641 | ||
642 | man/%.1.in: man/%.xml.in | |
643 | $(XSLTPROC_PROCESS_MAN) | |
644 | ||
645 | man/%.3: man/%.xml | |
646 | $(XSLTPROC_PROCESS_MAN) | |
647 | ||
648 | man/%.3.in: man/%.xml.in | |
649 | $(XSLTPROC_PROCESS_MAN) | |
650 | ||
651 | man/%.5: man/%.xml | |
652 | $(XSLTPROC_PROCESS_MAN) | |
653 | ||
654 | man/%.5.in: man/%.xml.in | |
655 | $(XSLTPROC_PROCESS_MAN) | |
656 | ||
657 | man/%.7: man/%.xml | |
658 | $(XSLTPROC_PROCESS_MAN) | |
659 | ||
660 | man/%.7.in: man/%.xml.in | |
661 | $(XSLTPROC_PROCESS_MAN_IN) | |
662 | ||
663 | man/%.8: man/%.xml | |
664 | $(XSLTPROC_PROCESS_MAN) | |
665 | ||
666 | man/%.8.in: man/%.xml.in | |
667 | $(XSLTPROC_PROCESS_MAN_IN) | |
668 | ||
669 | man/%.html: man/%.xml | |
670 | $(XSLTPROC_PROCESS_HTML) | |
671 | ||
672 | man/%.html.in: man/%.xml.in | |
673 | $(XSLTPROC_PROCESS_HTML_IN) | |
674 | ||
675 | CLEANFILES += \ | |
676 | $(dist_man_MANS) \ | |
677 | ${nodist_man_MANS:=.in} \ | |
678 | ${XML_FILES:.xml=.html} \ | |
679 | ${XML_IN_FILES:.xml.in=.html.in} | |
680 | endif | |
681 | ||
682 | org.freedesktop.systemd1.%.xml: systemd | |
683 | $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@ | |
684 | ||
685 | CLEANFILES += \ | |
686 | $(dbusinterface_DATA) | |
687 | ||
688 | install-data-hook: | |
689 | $(MKDIR_P) -m 0755 \ | |
690 | $(DESTDIR)$(systemunitdir) \ | |
691 | $(DESTDIR)$(sessionunitdir) \ | |
692 | $(DESTDIR)$(systemunitdir)/sockets.target.wants \ | |
693 | $(DESTDIR)$(systemunitdir)/sysinit.target.wants \ | |
694 | $(DESTDIR)$(pkgsysconfdir)/system \ | |
695 | $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \ | |
696 | $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \ | |
697 | $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \ | |
698 | $(DESTDIR)$(pkgsysconfdir)/session \ | |
699 | $(DESTDIR)$(sysconfdir)/xdg/systemd | |
700 | $(MKDIR_P) -m 0755 $(DESTDIR)/cgroup || \ | |
701 | echo "Don't forget to create /cgroup! Couldn't create it for you, continuing anyway." | |
702 | ( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \ | |
703 | rm -f session && \ | |
704 | $(LN_S) $(pkgsysconfdir)/session session ) | |
705 | ( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \ | |
706 | rm -f systemd-initctl.socket systemd-logger.socket && \ | |
707 | $(LN_S) ../systemd-logger.socket systemd-logger.socket && \ | |
708 | $(LN_S) ../systemd-initctl.socket systemd-initctl.socket ) | |
709 | ( cd $(DESTDIR)$(sessionunitdir) && \ | |
710 | rm -f shutdown.target sockets.target local-fs.target swap.target && \ | |
711 | $(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \ | |
712 | $(LN_S) $(systemunitdir)/sockets.target sockets.target && \ | |
713 | $(LN_S) $(systemunitdir)/local-fs.target local-fs.target && \ | |
714 | $(LN_S) $(systemunitdir)/swap.target swap.target ) | |
715 | ( cd $(DESTDIR)$(systemunitdir) && \ | |
716 | rm -f runlevel0.target runlevel1.target runlevel6.target && \ | |
717 | $(LN_S) poweroff.target runlevel0.target && \ | |
718 | $(LN_S) rescue.target runlevel1.target && \ | |
719 | $(LN_S) reboot.target runlevel6.target ) | |
720 | ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ | |
721 | rm -f default.target ctrl-alt-del.target kbrequest.target && \ | |
722 | $(LN_S) $(systemunitdir)/graphical.target default.target && \ | |
723 | $(LN_S) $(systemunitdir)/reboot.target ctrl-alt-del.target && \ | |
724 | $(LN_S) $(systemunitdir)/rescue.target kbrequest.target && \ | |
725 | rm -f runlevel2.target runlevel3.target runlevel4.target runlevel5.target && \ | |
726 | $(LN_S) $(systemunitdir)/multi-user.target runlevel2.target && \ | |
727 | $(LN_S) $(systemunitdir)/multi-user.target runlevel3.target && \ | |
728 | $(LN_S) $(systemunitdir)/multi-user.target runlevel4.target && \ | |
729 | $(LN_S) $(systemunitdir)/graphical.target runlevel5.target ) | |
730 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \ | |
731 | rm -f getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service && \ | |
732 | $(LN_S) $(systemunitdir)/getty@.service getty@tty1.service && \ | |
733 | $(LN_S) $(systemunitdir)/getty@.service getty@tty2.service && \ | |
734 | $(LN_S) $(systemunitdir)/getty@.service getty@tty3.service && \ | |
735 | $(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \ | |
736 | $(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \ | |
737 | $(LN_S) $(systemunitdir)/getty@.service getty@tty6.service ) | |
738 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \ | |
739 | rm -f getty.target remote-fs.target && \ | |
740 | $(LN_S) $(systemunitdir)/getty.target getty.target && \ | |
741 | $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target ) | |
742 | ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \ | |
743 | rm -f dev-hugepages.automount \ | |
744 | dev-mqueue.automount \ | |
745 | proc-sys-fs-binfmt_misc.automount \ | |
746 | sys-kernel-debug.automount \ | |
747 | sys-kernel-security.automount && \ | |
748 | $(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \ | |
749 | $(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \ | |
750 | $(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \ | |
751 | $(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \ | |
752 | $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount ) | |
753 | ( cd $(DESTDIR)$(dbussessionservicedir) && \ | |
754 | rm -f org.freedesktop.systemd1.service && \ | |
755 | $(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service ) | |
756 | if TARGET_FEDORA | |
757 | $(MKDIR_P) -m 0755 \ | |
758 | $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) | |
759 | ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ | |
760 | rm -f display-manager.service && \ | |
761 | $(LN_S) $(systemunitdir)/prefdm.service display-manager.service ) | |
762 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \ | |
763 | rm -f prefdm.service && \ | |
764 | $(LN_S) $(systemunitdir)/prefdm.service prefdm.service ) | |
765 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \ | |
766 | rm -f rc-local.service && \ | |
767 | $(LN_S) $(systemunitdir)/rc-local.service rc-local.service ) | |
768 | ( cd $(DESTDIR)$(systemunitdir) && \ | |
769 | rm -f local.service && \ | |
770 | $(LN_S) rc-local.service local.service ) | |
771 | ( cd $(DESTDIR)$(SYSTEM_SYSVINIT_PATH) && \ | |
772 | $(LN_S) halt reboot > /dev/null 2>&1 || true ) | |
773 | endif | |
774 | if TARGET_GENTOO | |
775 | ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ | |
776 | rm -f display-manager.service && \ | |
777 | $(LN_S) $(systemunitdir)/xdm.service display-manager.service ) | |
778 | ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \ | |
779 | rm -f xdm.service && \ | |
780 | $(LN_S) $(systemunitdir)/xdm.service xdm.service ) | |
781 | endif | |
782 | ||
783 | DISTCHECK_CONFIGURE_FLAGS = \ | |
784 | --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \ | |
785 | --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \ | |
786 | --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \ | |
787 | --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \ | |
788 | --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \ | |
789 | --with-pamlibdir=$$dc_install_base/$(pamlibdir) \ | |
790 | --with-rootdir=$$dc_install_base/$(rootdir) | |
791 | ||
792 | upload: all distcheck | |
793 | cp -v systemd-$(VERSION).tar.bz2 /home/lennart/cvs.fedora/systemd/devel/ | |
794 | scp systemd-$(VERSION).tar.bz2 fdo:/srv/www.freedesktop.org/www/software/systemd/ | |
795 | scp man/*.html tango:public/systemd-man/ | |
796 | ||
797 | git-tag: | |
798 | git tag "v$(VERSION)" -m "systemd $(VERSION)" |