Contents of /mcore-src/trunk/mcore-tools/src/systemd/Makefile
Parent Directory | Revision Log
Revision 2724 -
(show annotations)
(download)
Mon Dec 21 09:31:33 2015 UTC (8 years, 4 months ago) by niro
File size: 1632 byte(s)
Mon Dec 21 09:31:33 2015 UTC (8 years, 4 months ago) by niro
File size: 1632 byte(s)
-reworked Makefiles that they really support install-common, install-client and install install-control targets
1 | |
2 | include ../../Makefile.inc |
3 | |
4 | SYSTEMDSYSTEMUNITDIR = $(shell $(PKGCONFIG) --variable=systemdsystemunitdir systemd) |
5 | SYSTEMDSYSTEMCONFDIR = $(shell $(PKGCONFIG) --variable=systemdsystemconfdir systemd) |
6 | RUNDIR = /run |
7 | |
8 | FILES = mcored.service mcore-controld.service mcore-register-client.service mcored.tmpfilesd.conf mcore-request-configuration.service |
9 | |
10 | SCRIPT_SED_LINES += \ |
11 | -e "s:@@SYSTEMDSYSTEMUNITDIR@@:$(SYSTEMDSYSTEMUNITDIR):g" \ |
12 | -e "s:@@SYSTEMDSYSTEMCONFDIR@@:$(SYSTEMDSYSTEMCONFDIR):g" |
13 | |
14 | all: $(FILES) |
15 | |
16 | install: install-common install-client install-control all |
17 | |
18 | install-common: install-common-services-systemd |
19 | |
20 | install-client: install-client-services-systemd |
21 | |
22 | install-control: install-control-services-systemd |
23 | |
24 | install-common-services-systemd: all |
25 | $(INSTALL) -d $(DESTDIR)/$(SYSCONFDIR)/tmpfiles.d |
26 | $(INSTALL) -m0644 mcored.tmpfilesd.conf $(DESTDIR)/$(SYSCONFDIR)/tmpfiles.d/mcored.conf |
27 | |
28 | install-client-services-systemd: all |
29 | $(INSTALL) -d $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR) |
30 | $(INSTALL) -m0644 mcored.service $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR) |
31 | $(INSTALL) -m0644 mcore-register-client.service $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR) |
32 | $(INSTALL) -m0644 mcore-request-configuration.service $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR) |
33 | |
34 | install-control-services-systemd: all |
35 | $(INSTALL) -d $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR) |
36 | $(INSTALL) -m0644 mcore-controld.service $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR) |
37 | |
38 | clean: |
39 | rm -f $(FILES) |
40 | |
41 | .PHONY: install-common |
42 | .PHONY: install-client |
43 | .PHONY: install-control |
44 | .PHONY: install-common-services-systemd |
45 | .PHONY: install-client-services-systemd |
46 | .PHONY: install-control-services-systemd |
47 | .PHONY: all install clean |