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