File: Makefile.am

package info (click to toggle)
alsa-utils 1.0.28-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,280 kB
  • ctags: 1,585
  • sloc: ansic: 21,693; sh: 6,035; xml: 590; makefile: 374; sed: 16
file content (78 lines) | stat: -rw-r--r-- 2,065 bytes parent folder | download
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
SUBDIRS = init

sbin_PROGRAMS=alsactl
man_MANS=alsactl.1
if USE_XMLTO
man_MANS += alsactl_init.7
endif
EXTRA_DIST=alsactl.1 alsactl_init.xml

alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c daemon.c \
                monitor.c

alsactl_CFLAGS=$(AM_CFLAGS) -D__USE_GNU \
               -DSYS_ASOUNDRC=\"$(ASOUND_STATE_DIR)/asound.state\" \
               -DSYS_LOCKFILE=\"$(ASOUND_LOCK_DIR)/asound.state.lock\" \
               -DSYS_PIDFILE=\"$(ALSACTL_PIDFILE_DIR)/alsactl.pid\"

noinst_HEADERS=alsactl.h list.h init_sysdeps.c init_utils_string.c \
               init_utils_run.c init_sysfs.c

udevrules_DATA = \
	90-alsa-restore.rules

if HAVE_SYSTEMD

systemdsystemunit_DATA = \
	alsa-state.service \
	alsa-restore.service \
	alsa-store.service

install-data-hook:
	$(MKDIR_P) -m 0755 \
		$(DESTDIR)$(systemdsystemunitdir)/basic.target.wants \
		$(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants
	( cd $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants && \
		rm -f alsa-state.service alsa-restore.service && \
		$(LN_S) ../alsa-state.service alsa-state.service && \
		$(LN_S) ../alsa-restore.service alsa-restore.service)
	( cd $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants && \
	        rm -f alsa-store.service && \
		$(LN_S) ../alsa-store.service alsa-store.service )

endif

edit = \
	$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
		  -e 's,@mydatadir\@,$(mydatadir),g' \
		  -e 's,@asoundstatedir\@,$(ASOUND_STATE_DIR),g' \
		  -e 's,@alsactlhome\@,$(ALSACTL_HOME_DIR),g' \
		  -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
							< $< > $@ || rm $@

alsa-state.service: alsa-state.service.in
	$(edit)

alsa-restore.service: alsa-restore.service.in
	$(edit)

alsa-store.service: alsa-store.service.in
	$(edit)

90-alsa-restore.rules: 90-alsa-restore.rules.in
	$(edit)

EXTRA_DIST += \
	alsa-state.service.in \
	alsa-restore.service.in \
	alsa-store.service.in \
	90-alsa-restore.rules.in

CLEANFILES = \
	alsa-state.service \
	alsa-restore.service \
	alsa-store.service \
	90-alsa-restore.rules

%.7: %.xml
	xmlto man $?