Makefile.am 98.5 KB
Newer Older
1
#  -*- Mode: makefile; indent-tabs-mode: t -*-
2
#
3 4
#  This file is part of systemd.
#
Kay Sievers's avatar
Kay Sievers committed
5 6
#  Copyright 2010-2012 Lennart Poettering
#  Copyright 2010-2012 Kay Sievers
7
#  Copyright 2013 Zbigniew Jędrzejewski-Szmek
8 9
#
#  systemd is free software; you can redistribute it and/or modify it
10 11
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
12 13 14 15 16
#  (at your option) any later version.
#
#  systemd is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
#  Lesser General Public License for more details.
18
#
19
#  You should have received a copy of the GNU Lesser General Public License
20 21
#  along with systemd; If not, see <http://www.gnu.org/licenses/>.

Kay Sievers's avatar
Kay Sievers committed
22 23
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory
24
AUTOMAKE_OPTIONS = color-tests parallel-tests
25

Kay Sievers's avatar
Kay Sievers committed
26 27
SUBDIRS = . po

28 29 30
# remove targets if the command fails
.DELETE_ON_ERROR:

31 32 33
# keep intermediate files
.SECONDARY:

34
LIBUDEV_CURRENT=4
35
LIBUDEV_REVISION=1
36
LIBUDEV_AGE=3
Kay Sievers's avatar
Kay Sievers committed
37 38

LIBGUDEV_CURRENT=1
39
LIBGUDEV_REVISION=3
Kay Sievers's avatar
Kay Sievers committed
40
LIBGUDEV_AGE=1
41

42
LIBSYSTEMD_LOGIN_CURRENT=4
43
LIBSYSTEMD_LOGIN_REVISION=2
44
LIBSYSTEMD_LOGIN_AGE=4
45

46
LIBSYSTEMD_DAEMON_CURRENT=0
47
LIBSYSTEMD_DAEMON_REVISION=8
48 49
LIBSYSTEMD_DAEMON_AGE=0

50
LIBSYSTEMD_ID128_CURRENT=0
51
LIBSYSTEMD_ID128_REVISION=19
52 53
LIBSYSTEMD_ID128_AGE=0

54
LIBSYSTEMD_JOURNAL_CURRENT=8
55
LIBSYSTEMD_JOURNAL_REVISION=2
56
LIBSYSTEMD_JOURNAL_AGE=8
57

58
# Dirs of external packages
59 60 61 62
dbuspolicydir=@dbuspolicydir@
dbussessionservicedir=@dbussessionservicedir@
dbussystemservicedir=@dbussystemservicedir@
dbusinterfacedir=@dbusinterfacedir@
63 64
pamlibdir=@pamlibdir@
pkgconfigdatadir=$(datadir)/pkgconfig
65
pkgconfiglibdir=$(libdir)/pkgconfig
66
polkitpolicydir=$(datadir)/polkit-1/actions
67
bashcompletiondir=@bashcompletiondir@
68
rpmmacrosdir=$(sysconfdir)/rpm
69
sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
70
sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
71
varlogdir=$(localstatedir)/log
72 73
systemdstatedir=$(localstatedir)/lib/systemd
catalogstatedir=$(systemdstatedir)/catalog
74

75
# Our own, non-special dirs
76
pkgsysconfdir=$(sysconfdir)/systemd
77
userunitdir=$(prefix)/lib/systemd/user
78
userpresetdir=$(prefix)/lib/systemd/user-preset
79
tmpfilesdir=$(prefix)/lib/tmpfiles.d
80
sysctldir=$(prefix)/lib/sysctl.d
81
usergeneratordir=$(prefix)/lib/systemd/user-generators
82
pkgincludedir=$(includedir)/systemd
83 84
systemgeneratordir=$(rootlibexecdir)/system-generators
systemshutdowndir=$(rootlibexecdir)/system-shutdown
85
systemsleepdir=$(rootlibexecdir)/system-sleep
86
systemunitdir=$(rootprefix)/lib/systemd/system
87
systempresetdir=$(rootprefix)/lib/systemd/system-preset
Kay Sievers's avatar
Kay Sievers committed
88
udevlibexecdir=$(rootprefix)/lib/udev
89 90 91 92
udevhomedir=$(udevlibexecdir)
udevrulesdir=$(udevlibexecdir)/rules.d
udevhwdbdir=$(udevlibexecdir)/hwdb.d
catalogdir=$(prefix)/lib/systemd/catalog
93 94

# And these are the special ones for /
95 96 97
rootprefix=@rootprefix@
rootbindir=$(rootprefix)/bin
rootlibexecdir=$(rootprefix)/lib/systemd
98

99
CLEANFILES = $(BUILT_SOURCES)
100
DISTCLEANFILES =
101
EXTRA_DIST =
Kay Sievers's avatar
Kay Sievers committed
102
BUILT_SOURCES =
103 104 105
INSTALL_EXEC_HOOKS =
UNINSTALL_EXEC_HOOKS =
INSTALL_DATA_HOOKS =
106
UNINSTALL_DATA_HOOKS =
Kay Sievers's avatar
Kay Sievers committed
107
DISTCLEAN_LOCAL_HOOKS =
108
CLEAN_LOCAL_HOOKS =
109
pkginclude_HEADERS =
110
noinst_LTLIBRARIES =
111
lib_LTLIBRARIES =
Kay Sievers's avatar
Kay Sievers committed
112
include_HEADERS =
113
noinst_DATA =
114
pkgconfiglib_DATA =
115
polkitpolicy_in_in_files =
116
polkitpolicy_in_files =
117
polkitpolicy_files =
118
dist_udevrules_DATA =
Kay Sievers's avatar
Kay Sievers committed
119
nodist_udevrules_DATA =
120
dist_pkgsysconf_DATA =
121
dist_pkgdata_DATA =
122 123 124
dist_dbuspolicy_DATA =
dbusinterface_DATA =
dist_dbussystemservice_DATA =
125
check_PROGRAMS =
126
check_DATA =
127 128 129
noinst_tests=
noinst_PROGRAMS = $(noinst_tests)
TESTS = $(noinst_tests)
130
udevlibexec_PROGRAMS =
131

132
AM_CPPFLAGS = \
133
	-include $(top_builddir)/config.h \
134
	-DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
135
	-DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
136
	-DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
137
	-DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
138
	-DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
139 140 141
	-DUSER_CONFIG_FILE=\"$(pkgsysconfdir)/user.conf\" \
	-DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
	-DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
142
	-DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
143
	-DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
144
	-DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
145
	-DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
146
	-DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
147
	-DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
148
	-DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
149
	-DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
150
	-DROOTPREFIX=\"$(rootprefix)\" \
151
	-DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
152
	-DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
153
	-DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
154
	-DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
155
	-DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
156
	-DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
157
	-DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
Kay Sievers's avatar
Kay Sievers committed
158
	-DX_SERVER=\"$(bindir)/X\" \
159
	-DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
160
	-DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
161
	-I $(top_srcdir)/src \
162
	-I $(top_srcdir)/src/shared \
163
	-I $(top_srcdir)/src/login \
164
	-I $(top_srcdir)/src/journal \
Kay Sievers's avatar
Kay Sievers committed
165
	-I $(top_srcdir)/src/systemd \
166
	-I $(top_builddir)/src/core \
167
	-I $(top_srcdir)/src/core \
168
	-I $(top_srcdir)/src/libudev \
169
	-I $(top_srcdir)/src/udev \
170
	-I $(top_srcdir)/src/libsystemd-bus \
171
	$(OUR_CPPFLAGS)
172

Lennart Poettering's avatar
Lennart Poettering committed
173
AM_CFLAGS = $(OUR_CFLAGS)
174
AM_LDFLAGS = $(OUR_LDFLAGS)
175

176
# ------------------------------------------------------------------------------
177
define move-to-rootlibdir
178 179 180 181
	if test "$(libdir)" != "$(rootlibdir)"; then \
		$(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
		so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
		so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
182
		$(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
183 184 185 186
		mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
	fi
endef

187 188 189 190 191 192 193 194 195 196 197 198
INSTALL_DIRS =

RUNLEVEL1_TARGET_WANTS =
RUNLEVEL2_TARGET_WANTS =
RUNLEVEL3_TARGET_WANTS =
RUNLEVEL4_TARGET_WANTS =
RUNLEVEL5_TARGET_WANTS =
SHUTDOWN_TARGET_WANTS =
LOCAL_FS_TARGET_WANTS =
MULTI_USER_TARGET_WANTS =
SYSINIT_TARGET_WANTS =
SOCKETS_TARGET_WANTS =
199
TIMERS_TARGET_WANTS =
200

201 202 203 204 205
SYSTEM_UNIT_ALIASES =
USER_UNIT_ALIASES =

GENERAL_ALIASES =

206 207 208 209 210 211 212 213 214 215 216
install-target-wants-hook:
	what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && $(add-wants)
	what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && $(add-wants)
	what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && $(add-wants)
	what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && $(add-wants)
	what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && $(add-wants)
	what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && $(add-wants)
	what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
	what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && $(add-wants)
	what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
	what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
217
	what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
218 219

define add-wants
220 221 222 223
	[ -z "$$what" ] || ( \
	  dir=$(DESTDIR)$(systemunitdir)/$$wants.wants && \
	  $(MKDIR_P) -m 0755 $$dir && \
	  cd $$dir && \
224 225 226 227 228 229 230
	  rm -f $$what && \
	  for i in $$what; do ln -s ../$$i . || exit $$? ; done )
endef

install-directories-hook:
	$(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))

231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
install-aliases-hook:
	set -- $(SYSTEM_UNIT_ALIASES) && \
		dir=$(systemunitdir) && $(install-aliases)
	set -- $(USER_UNIT_ALIASES) && \
		dir=$(userunitdir) && $(install-aliases)
	set -- $(GENERAL_ALIASES) && \
		dir= && $(install-aliases)

define install-aliases
	$(MKDIR_P) /$(DESTDIR)$$dir && \
	while [ -n "$$1" ]; do \
		rm -f $(DESTDIR)$$dir/$$2 && \
		ln -s $$1 $(DESTDIR)$$dir/$$2 && \
		shift 2 || exit $$?; \
	done
endef

248 249
INSTALL_EXEC_HOOKS += \
	install-target-wants-hook \
250 251
	install-directories-hook \
	install-aliases-hook
252

253 254 255 256 257
# ------------------------------------------------------------------------------
AM_V_M4 = $(AM_V_M4_$(V))
AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
AM_V_M4_0 = @echo "  M4      " $@;

258 259 260 261
AM_V_XSLT = $(AM_V_XSLT_$(V))
AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
AM_V_XSLT_0 = @echo "  XSLT    " $@;

262 263 264 265
AM_V_GPERF = $(AM_V_GPERF_$(V))
AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
AM_V_GPERF_0 = @echo "  GPERF   " $@;

266 267 268 269
AM_V_LN = $(AM_V_LN_$(V))
AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
AM_V_LN_0 = @echo "  LN      " $@;

270
# ------------------------------------------------------------------------------
271
rootbin_PROGRAMS = \
272
	systemctl \
273
	systemd-notify \
274
	systemd-ask-password \
275
	systemd-tty-ask-password-agent \
276
	systemd-tmpfiles \
277
	systemd-machine-id-setup
278

279
bin_PROGRAMS = \
280
	systemd-cgls \
Lennart Poettering's avatar
Lennart Poettering committed
281
	systemd-cgtop \
282
	systemd-stdio-bridge \
283
	systemd-nspawn \
284
	systemd-detect-virt \
285 286
	systemd-delta \
	systemd-analyze
287

288 289 290
bin_SCRIPTS = \
	src/kernel-install/kernel-install

291 292 293
EXTRA_DIST += \
	src/kernel-install/kernel-install

294
rootlibexec_PROGRAMS = \
295
	systemd \
296
	systemd-cgroups-agent \
297
	systemd-initctl \
298
	systemd-update-utmp \
299
	systemd-shutdownd \
300
	systemd-shutdown \
301
	systemd-remount-fs \
302
	systemd-reply-password \
303
	systemd-fsck \
304
	systemd-timestamp \
305
	systemd-ac-power \
306 307
	systemd-sysctl \
	systemd-sleep
308

309
systemgenerator_PROGRAMS = \
310
	systemd-getty-generator \
311
	systemd-fstab-generator \
312
	systemd-system-update-generator
313

Simon Peeters's avatar
Simon Peeters committed
314 315
systemd_analyze_SOURCES = \
	src/analyze/systemd-analyze.c
316

Simon Peeters's avatar
Simon Peeters committed
317 318 319
systemd_analyze_CFLAGS = \
	$(AM_CFLAGS) \
	$(DBUS_CFLAGS)
320

Simon Peeters's avatar
Simon Peeters committed
321 322 323
systemd_analyze_LDADD = \
	libsystemd-shared.la \
	libsystemd-dbus.la
324

325
dist_bashcompletion_DATA = \
326 327 328
	shell-completion/bash/journalctl \
	shell-completion/bash/systemctl \
	shell-completion/bash/udevadm
329

330 331
dist_tmpfiles_DATA = \
	tmpfiles.d/systemd.conf \
332
	tmpfiles.d/tmp.conf \
333 334
	tmpfiles.d/x11.conf

Kay Sievers's avatar
Kay Sievers committed
335 336 337
dist_sysctl_DATA = \
	sysctl.d/50-default.conf

338 339
if HAVE_SYSV_COMPAT
dist_tmpfiles_DATA += \
340
	tmpfiles.d/legacy.conf
341 342
endif

343
dist_systemunit_DATA = \
344 345
	units/graphical.target \
	units/multi-user.target \
346
	units/emergency.service \
347
	units/emergency.target \
348
	units/sysinit.target \
349
	units/basic.target \
350 351
	units/getty.target \
	units/halt.target \
352
	units/kexec.target \
353
	units/local-fs.target \
354
	units/local-fs-pre.target \
355
	units/initrd.target \
356
	units/initrd-fs.target \
357
	units/initrd-root-fs.target \
Lennart Poettering's avatar
Lennart Poettering committed
358
	units/remote-fs.target \
359
	units/remote-fs-pre.target \
360
	units/network.target \
361
	units/network-online.target \
362
	units/nss-lookup.target \
363
	units/nss-user-lookup.target \
364
	units/hibernate.target \
365
	units/hybrid-sleep.target \
366 367 368
	units/poweroff.target \
	units/reboot.target \
	units/rescue.target \
369
	units/rpcbind.target \
370
	units/time-sync.target \
371
	units/shutdown.target \
372
	units/final.target \
373
	units/umount.target \
374
	units/sigpwr.target \
375
	units/sleep.target \
376
	units/sockets.target \
377 378
	units/timers.target \
	units/paths.target \
379
	units/suspend.target \
380
	units/swap.target \
381
	units/systemd-initctl.socket \
382
	units/systemd-shutdownd.socket \
383
	units/syslog.socket \
384 385
	units/dev-hugepages.mount \
	units/dev-mqueue.mount \
386
	units/sys-kernel-config.mount \
387
	units/sys-kernel-debug.mount \
388
	units/sys-fs-fuse-connections.mount \
Kay Sievers's avatar
Kay Sievers committed
389
	units/tmp.mount \
390
	units/printer.target \
391
	units/sound.target \
392
	units/bluetooth.target \
Kay Sievers's avatar
Kay Sievers committed
393
	units/smartcard.target \
394
	units/systemd-tmpfiles-clean.timer \
395
	units/quotaon.service \
396
	units/systemd-ask-password-wall.path \
397
	units/systemd-ask-password-console.path \
398 399
	units/systemd-udevd-control.socket \
	units/systemd-udevd-kernel.socket \
400
	units/system-update.target \
401
	units/initrd-switch-root.target
402

403
nodist_systemunit_DATA = \
404
	units/getty@.service \
405
	units/serial-getty@.service \
406
	units/console-shell.service \
407
	units/console-getty.service \
408
	units/systemd-initctl.service \
409
	units/systemd-shutdownd.service \
410
	units/systemd-remount-fs.service \
411 412
	units/systemd-update-utmp-runlevel.service \
	units/systemd-update-utmp-shutdown.service \
413 414
	units/systemd-tmpfiles-setup.service \
	units/systemd-tmpfiles-clean.service \
415
	units/systemd-ask-password-wall.service \
416
	units/systemd-ask-password-console.service \
417
	units/systemd-sysctl.service \
418
	units/emergency.service \
419
	units/rescue.service \
Kay Sievers's avatar
Kay Sievers committed
420
	units/user@.service \
421
	units/systemd-hibernate.service \
422
	units/systemd-hybrid-sleep.service \
423 424 425 426 427 428 429
	units/systemd-suspend.service \
	units/systemd-halt.service \
	units/systemd-poweroff.service \
	units/systemd-reboot.service \
	units/systemd-kexec.service \
	units/systemd-fsck@.service \
	units/systemd-fsck-root.service \
430
	units/systemd-udevd.service \
431
	units/systemd-udev-trigger.service \
432
	units/systemd-udev-settle.service \
433 434 435 436 437
	units/debug-shell.service \
	units/initrd-parse-etc.service \
	units/initrd-cleanup.service \
	units/initrd-udevadm-cleanup-db.service \
	units/initrd-switch-root.service
438

439 440 441
dist_userunit_DATA = \
	units/user/default.target \
	units/user/exit.target
442

443
nodist_userunit_DATA = \
444
	units/user/systemd-exit.service
445

446
EXTRA_DIST += \
447
	units/getty@.service.m4 \
448
	units/serial-getty@.service.m4 \
449
	units/console-shell.service.m4.in \
450
	units/console-getty.service.m4.in \
451
	units/rescue.service.m4.in \
452
	units/systemd-initctl.service.in \
453
	units/systemd-shutdownd.service.in \
454
	units/systemd-remount-fs.service.in \
455 456
	units/systemd-update-utmp-runlevel.service.in \
	units/systemd-update-utmp-shutdown.service.in \
457 458
	units/systemd-tmpfiles-setup.service.in \
	units/systemd-tmpfiles-clean.service.in \
459
	units/systemd-ask-password-wall.service.in \
460
	units/systemd-ask-password-console.service.in \
461
	units/systemd-sysctl.service.in \
462
	units/emergency.service.in \
463 464 465 466 467
	units/systemd-halt.service.in \
	units/systemd-poweroff.service.in \
	units/systemd-reboot.service.in \
	units/systemd-kexec.service.in \
	units/user/systemd-exit.service.in \
468 469
	units/systemd-fsck@.service.in \
	units/systemd-fsck-root.service.in \
Kay Sievers's avatar
Kay Sievers committed
470
	units/user@.service.in \
471
	units/systemd-udevd.service \
472 473
	units/systemd-udev-trigger.service \
	units/systemd-udev-settle.service \
474
	units/debug-shell.service.in \
475
	units/systemd-hibernate.service.in \
476
	units/systemd-hybrid-sleep.service.in \
477
	units/systemd-suspend.service.in \
478
	units/quotaon.service.in \
479 480 481 482
	units/initrd-parse-etc.service.in \
	units/initrd-cleanup.service.in \
	units/initrd-udevadm-cleanup-db.service.in \
	units/initrd-switch-root.service.in \
483
	introspect.awk
484

485 486 487 488
CLEANFILES += \
	units/console-shell.service.m4 \
	units/console-getty.service.m4 \
	units/rescue.service.m4
489

490 491 492 493
if HAVE_SYSV_COMPAT
nodist_systemunit_DATA += \
	units/rc-local.service \
	units/halt-local.service
494

495 496
systemgenerator_PROGRAMS += \
	systemd-rc-local-generator
Dexter Morgan's avatar
Dexter Morgan committed
497 498
endif

499 500 501 502
EXTRA_DIST += \
	units/rc-local.service.in \
	units/halt-local.service.in

503 504
dist_doc_DATA = \
	README \
Kay Sievers's avatar
Kay Sievers committed
505
	NEWS \
506
	LICENSE.LGPL2.1 \
507 508
	LICENSE.GPL2 \
	LICENSE.MIT \
509
	DISTRO_PORTING
510

511
@INTLTOOL_POLICY_RULE@
512

513
# ------------------------------------------------------------------------------
514 515 516 517 518

MANPAGES =
MANPAGES_ALIAS =

include Makefile-man.am
519 520 521

XML_FILES = \
	${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
522 523
HTML_FILES = \
	${XML_FILES:.xml=.html}
524 525
HTML_ALIAS = \
	${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
526 527 528 529 530 531

if ENABLE_MANPAGES
man_MANS = \
	$(MANPAGES) \
	$(MANPAGES_ALIAS)

532 533 534
noinst_DATA += \
	$(HTML_FILES) \
	$(HTML_ALIAS)
535 536

CLEANFILES += \
537
	$(man_MANS) \
538 539 540 541 542 543
	$(HTML_FILES) \
	$(HTML_ALIAS)

docs/html/man:
	$(AM_V_at)$(MKDIR_P) $(dir $@)
	$(AM_V_LN)$(LN_S) -f ../../man $@
544

545 546 547
noinst_DATA += \
	docs/html/man

548 549
CLEANFILES += \
	docs/html/man
550

551
if HAVE_PYTHON
552 553 554
man/index.html: man/systemd.index.html
	$(AM_V_LN)$(LN_S) -f systemd.index.html $@

555 556 557 558
noinst_DATA += \
	man/index.html

CLEANFILES += \
559
	man/index.html
560

561
XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml)
562
NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
563
SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
564 565 566 567 568 569

update-man-list: make-man-rules.py $(XML_GLOB)
	$(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
	$(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
	@echo "Makefile-man.am has been regenerated"

570
man/systemd.index.xml: make-man-index.py $(NON_INDEX_XML_FILES)
571
	$(AM_V_at)$(MKDIR_P) $(dir $@)
572
	$(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
573

574
man/systemd.directives.xml: make-directive-index.py $(SOURCE_XML_FILES)
575
	$(AM_V_at)$(MKDIR_P) $(dir $@)
576
	$(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
577 578

EXTRA_DIST += \
579
	man/systemd.index.xml \
580
	man/index.html \
581 582
	man/systemd.directives.xml

583 584 585 586
CLEANFILES += \
	man/systemd.index.xml \
	man/systemd.directives.xml

587 588
endif

589 590 591 592
endif

EXTRA_DIST += \
	$(XML_FILES) \
593
	$(HTML_FILES) \
594
	$(HTML_ALIAS) \
595
	$(dist_MANS) \
596
	make-man-index.py \
597 598
	make-directive-index.py \
	xml_helper.py
599 600

# ------------------------------------------------------------------------------
601
noinst_LTLIBRARIES += \
602
	libsystemd-shared.la
603

604
libsystemd_shared_la_SOURCES = \
605 606
	src/shared/linux/auto_dev-ioctl.h \
	src/shared/linux/fanotify.h \
607 608
	src/shared/linux/seccomp.h \
	src/shared/linux/seccomp-bpf.h \
609
	src/shared/missing.h \
610 611 612
	src/shared/list.h \
	src/shared/macro.h \
	src/shared/def.h \
613
	src/shared/sparse-endian.h \
614 615 616 617
	src/shared/util.c \
	src/shared/util.h \
	src/shared/virt.c \
	src/shared/virt.h \
618 619
	src/shared/efivars.c \
	src/shared/efivars.h \
Kay Sievers's avatar
Kay Sievers committed
620 621
	src/shared/path-util.c \
	src/shared/path-util.h \
622 623
	src/shared/time-util.c \
	src/shared/time-util.h \
624 625 626 627
	src/shared/hashmap.c \
	src/shared/hashmap.h \
	src/shared/set.c \
	src/shared/set.h \
628 629
	src/shared/fdset.c \
	src/shared/fdset.h \
630 631
	src/shared/prioq.c \
	src/shared/prioq.h \
632 633
	src/shared/strv.c \
	src/shared/strv.h \
634 635
	src/shared/env-util.c \
	src/shared/env-util.h \
636 637
	src/shared/strbuf.c \
	src/shared/strbuf.h \
638 639
	src/shared/strxcpyx.c \
	src/shared/strxcpyx.h \
640 641 642 643 644 645 646 647 648
	src/shared/conf-parser.c \
	src/shared/conf-parser.h \
	src/shared/log.c \
	src/shared/log.h \
	src/shared/ratelimit.h \
	src/shared/ratelimit.c \
	src/shared/exit-status.c \
	src/shared/exit-status.h \
	src/shared/utf8.c \
Kay Sievers's avatar
Kay Sievers committed
649
	src/shared/utf8.h \
Kay Sievers's avatar
Kay Sievers committed
650
	src/shared/pager.c \
651 652
	src/shared/pager.h \
	src/shared/ioprio.h \
653 654
	src/shared/socket-util.c \
	src/shared/socket-util.h \
Kay Sievers's avatar
Kay Sievers committed
655 656
	src/shared/conf-files.c \
	src/shared/conf-files.h \
657 658
	src/shared/cgroup-util.c \
	src/shared/cgroup-util.h \
659 660 661 662 663 664 665 666 667 668
	src/shared/cgroup-show.c \
	src/shared/cgroup-show.h \
	src/shared/unit-name.c \
	src/shared/unit-name.h \
	src/shared/utmp-wtmp.c \
	src/shared/utmp-wtmp.h \
	src/shared/watchdog.c \
	src/shared/watchdog.h \
	src/shared/spawn-ask-password-agent.c \
	src/shared/spawn-ask-password-agent.h \
669 670
	src/shared/replace-var.c \
	src/shared/replace-var.h \
671
	src/shared/spawn-polkit-agent.c \
Kay Sievers's avatar
Kay Sievers committed
672 673
	src/shared/spawn-polkit-agent.h \
	src/shared/hwclock.c \
Kay Sievers's avatar
Kay Sievers committed
674 675
	src/shared/hwclock.h \
	src/shared/time-dst.c \
676 677
	src/shared/time-dst.h \
	src/shared/calendarspec.c \
678
	src/shared/calendarspec.h \
679 680
	src/shared/fileio.c \
	src/shared/fileio.h \
681
	src/shared/output-mode.h
682 683 684 685 686 687 688 689 690 691

#-------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
	libsystemd-dbus.la

libsystemd_dbus_la_SOURCES = \
	src/shared/dbus-common.c \
	src/shared/dbus-common.h \
	src/shared/dbus-loop.c \
	src/shared/dbus-loop.h \
692 693
	src/shared/polkit.c \
	src/shared/polkit.h
694

695
libsystemd_dbus_la_CFLAGS = \
696 697 698
	$(AM_CFLAGS) \
	$(DBUS_CFLAGS)

699 700 701
libsystemd_dbus_la_LIBADD = \
	$(DBUS_LIBS)

702 703
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
704
	libsystemd-units.la
705

706
libsystemd_units_la_SOURCES = \
707 708
	src/shared/install.c \
	src/shared/install.h \
709 710
	src/shared/install-printf.c \
	src/shared/install-printf.h \
711
	src/shared/path-lookup.c \
712 713 714
	src/shared/path-lookup.h \
	src/shared/specifier.c \
	src/shared/specifier.h
715 716 717 718 719 720 721 722 723 724

libsystemd_units_la_CFLAGS = \
	$(AM_CFLAGS) \
	$(DBUS_CFLAGS)

# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
	libsystemd-label.la

libsystemd_label_la_SOURCES = \
725 726
	src/shared/cgroup-label.c \
	src/shared/socket-label.c \
727 728
	src/shared/label.c \
	src/shared/label.h \
729 730
	src/shared/selinux-util.c \
	src/shared/selinux-util.h \
731
	src/shared/mkdir.c \
732 733
	src/shared/mkdir.h \
	src/shared/ask-password-api.c \
734
	src/shared/ask-password-api.h \
735 736
	src/shared/fileio-label.c \
	src/shared/fileio-label.h \
737 738
	src/shared/dev-setup.c \
	src/shared/dev-setup.h
739

740
libsystemd_label_la_CFLAGS = \
741 742 743
	$(AM_CFLAGS) \
	$(SELINUX_CFLAGS)

744
libsystemd_label_la_LIBADD = \
745 746
	$(SELINUX_LIBS)

747 748 749 750 751 752 753 754 755 756 757 758
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
	libsystemd-logs.la

libsystemd_logs_la_SOURCES = \
	src/shared/logs-show.c \
	src/shared/logs-show.h

libsystemd_logs_la_CFLAGS = \
	$(AM_CFLAGS)

libsystemd_logs_la_LIBADD = \
759
	libsystemd-journal-internal.la \
760 761
	libsystemd-id128-internal.la \
	libsystemd-shared.la
762

763
# ------------------------------------------------------------------------------
764 765 766
noinst_LTLIBRARIES += \
	libsystemd-capability.la

767 768 769 770 771 772 773 774 775
libsystemd_capability_la_SOURCES = \
	src/shared/capability.c \
	src/shared/capability.h

libsystemd_capability_la_CFLAGS = \
	$(AM_CFLAGS) \
	$(CAP_CFLAGS)

libsystemd_capability_la_LIBADD = \
776
	$(CAP_LIBS)
777

778
# ------------------------------------------------------------------------------
779 780 781
noinst_LTLIBRARIES += \
	libsystemd-audit.la

782 783 784 785 786 787 788
libsystemd_audit_la_SOURCES = \
	src/shared/audit.c \
	src/shared/audit.h

libsystemd_audit_la_LIBADD = \
	libsystemd-capability.la

789
# ------------------------------------------------------------------------------
790
if HAVE_ACL
791 792 793
noinst_LTLIBRARIES += \
	libsystemd-acl.la

794
libsystemd_acl_la_SOURCES = \
795 796
	src/shared/acl-util.c \
	src/shared/acl-util.h
797 798 799 800 801 802

libsystemd_acl_la_CFLAGS = \
	$(AM_CFLAGS) \
	$(ACL_CFLAGS)

libsystemd_acl_la_LIBADD = \
803 804
	$(ACL_LIBS) \
	libsystemd-shared.la
805
endif
806

807
# ------------------------------------------------------------------------------
808 809 810
noinst_LTLIBRARIES += \
	libsystemd-core.la

811
libsystemd_core_la_SOURCES = \
812 813
	src/core/unit.c \
	src/core/unit.h \
814 815
	src/core/unit-printf.c \
	src/core/unit-printf.h \
816 817 818 819
	src/core/job.c \
	src/core/job.h \
	src/core/manager.c \
	src/core/manager.h \
820 821
	src/core/transaction.c \
	src/core/transaction.h \
822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847
	src/core/load-fragment.c \
	src/core/load-fragment.h \
	src/core/service.c \
	src/core/service.h \
	src/core/automount.c \
	src/core/automount.h \
	src/core/mount.c \
	src/core/mount.h \
	src/core/swap.c \
	src/core/swap.h \
	src/core/device.c \
	src/core/device.h \
	src/core/target.c \
	src/core/target.h \
	src/core/snapshot.c \
	src/core/snapshot.h \
	src/core/socket.c \
	src/core/socket.h \
	src/core/timer.c \
	src/core/timer.h \
	src/core/path.c \
	src/core/path.h \
	src/core/load-dropin.c \
	src/core/load-dropin.h \
	src/core/execute.c \
	src/core/execute.h \
848 849
	src/core/kill.c \
	src/core/kill.h \
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877
	src/core/dbus.c \
	src/core/dbus.h \
	src/core/dbus-manager.c \
	src/core/dbus-manager.h \
	src/core/dbus-unit.c \
	src/core/dbus-unit.h \
	src/core/dbus-job.c \
	src/core/dbus-job.h \
	src/core/dbus-service.c \
	src/core/dbus-service.h \
	src/core/dbus-socket.c \
	src/core/dbus-socket.h \
	src/core/dbus-timer.c \
	src/core/dbus-timer.h \
	src/core/dbus-target.c \
	src/core/dbus-target.h \
	src/core/dbus-mount.c \
	src/core/dbus-mount.h \
	src/core/dbus-automount.c \
	src/core/dbus-automount.h \
	src/core/dbus-swap.c \
	src/core/dbus-swap.h \
	src/core/dbus-snapshot.c \
	src/core/dbus-snapshot.h \
	src/core/dbus-device.c \
	src/core/dbus-device.h \
	src/core/dbus-execute.c \
	src/core/dbus-execute.h \
878 879
	src/core/dbus-kill.c \
	src/core/dbus-kill.h \
880 881 882 883
	src/core/dbus-path.c \
	src/core/dbus-path.h \
	src/core/cgroup.c \
	src/core/cgroup.h \
884 885
	src/core/selinux-access.c \
	src/core/selinux-access.h \
886 887
	src/core/selinux-setup.c \
	src/core/selinux-setup.h \
888 889
	src/core/smack-setup.c \
	src/core/smack-setup.h \
890 891 892 893
	src/core/ima-setup.c \
	src/core/ima-setup.h \
	src/core/locale-setup.h \
	src/core/locale-setup.c \
894 895
	src/core/hostname-setup.c \
	src/core/hostname-setup.h \
896 897 898 899 900 901
	src/core/machine-id-setup.c \
	src/core/machine-id-setup.h \
	src/core/mount-setup.c \
	src/core/mount-setup.h \
	src/core/loopback-setup.h \
	src/core/loopback-setup.c \
902 903 904 905 906 907 908 909
	src/core/condition.c \
	src/core/condition.h \
	src/core/namespace.c \
	src/core/namespace.h \
	src/core/tcpwrap.c \
	src/core/tcpwrap.h \
	src/core/cgroup-attr.c \
	src/core/cgroup-attr.h \
910 911
	src/core/cgroup-semantics.c \
	src/core/cgroup-semantics.h \
912 913 914 915 916
	src/core/securebits.h \
	src/core/initreq.h \
	src/core/special.h \
	src/core/bus-errors.h \
	src/core/build.h \
917 918
	src/core/sysfs-show.h \
	src/core/switch-root.h \
919 920
	src/core/switch-root.c \
	src/core/killall.h \
921 922
	src/core/killall.c \
	src/core/syscall-list.c \
923 924
	src/core/syscall-list.h \
	src/core/audit-fd.c \
925 926 927
	src/core/audit-fd.h \
	src/core/sync.c \
	src/core/sync.h
928

929 930 931 932 933 934
if HAVE_KMOD
libsystemd_core_la_SOURCES += \
	src/core/kmod-setup.c \
	src/core/kmod-setup.h
endif

935
nodist_libsystemd_core_la_SOURCES = \
936
	src/core/load-fragment-gperf.c \
937 938 939
	src/core/load-fragment-gperf-nulstr.c \
	src/core/syscall-from-name.h \
	src/core/syscall-to-name.h
940

941 942 943
libsystemd_core_la_CFLAGS = \
	$(AM_CFLAGS) \
	$(DBUS_CFLAGS) \
944 945
	$(LIBWRAP_CFLAGS) \
	$(PAM_CFLAGS) \
946
	$(AUDIT_CFLAGS) \
947 948
	$(KMOD_CFLAGS) \
	-pthread
949 950

libsystemd_core_la_LIBADD = \
951
	libsystemd-capability.la \
952
	libsystemd-units.la \
953 954
	libsystemd-label.la \
	libsystemd-shared.la \
955
	libsystemd-dbus.la \
956
	libsystemd-audit.la \
957
	libsystemd-id128-internal.la \
958
	libsystemd-daemon.la \
Kay Sievers's avatar
Kay Sievers committed
959
	libudev.la \
960
	$(LIBWRAP_LIBS) \
961
	$(PAM_LIBS) \
962
	$(AUDIT_LIBS) \
963 964
	$(CAP_LIBS) \
	$(KMOD_LIBS)
965

966
src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
967 968
	$(AM_V_at)$(MKDIR_P) $(dir $@)
	$(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
969 970 971 972