Magellan Linux

Annotation of /mcore-src/trunk/mcore-tools/src/systemd/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2724 - (hide annotations) (download)
Mon Dec 21 09:31:33 2015 UTC (8 years, 5 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 niro 2247
2     include ../../Makefile.inc
3    
4     SYSTEMDSYSTEMUNITDIR = $(shell $(PKGCONFIG) --variable=systemdsystemunitdir systemd)
5     SYSTEMDSYSTEMCONFDIR = $(shell $(PKGCONFIG) --variable=systemdsystemconfdir systemd)
6     RUNDIR = /run
7    
8 niro 2591 FILES = mcored.service mcore-controld.service mcore-register-client.service mcored.tmpfilesd.conf mcore-request-configuration.service
9 niro 2247
10     SCRIPT_SED_LINES += \
11     -e "s:@@SYSTEMDSYSTEMUNITDIR@@:$(SYSTEMDSYSTEMUNITDIR):g" \
12     -e "s:@@SYSTEMDSYSTEMCONFDIR@@:$(SYSTEMDSYSTEMCONFDIR):g"
13    
14     all: $(FILES)
15    
16 niro 2724 install: install-common install-client install-control all
17 niro 2247
18 niro 2724 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 niro 2249 install-client-services-systemd: all
29 niro 2247 $(INSTALL) -d $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR)
30     $(INSTALL) -m0644 mcored.service $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR)
31 niro 2450 $(INSTALL) -m0644 mcore-register-client.service $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR)
32 niro 2591 $(INSTALL) -m0644 mcore-request-configuration.service $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR)
33 niro 2247
34 niro 2450 install-control-services-systemd: all
35     $(INSTALL) -d $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR)
36     $(INSTALL) -m0644 mcore-controld.service $(DESTDIR)/$(SYSTEMDSYSTEMUNITDIR)
37    
38 niro 2247 clean:
39     rm -f $(FILES)
40    
41 niro 2724 .PHONY: install-common
42     .PHONY: install-client
43     .PHONY: install-control
44     .PHONY: install-common-services-systemd
45 niro 2248 .PHONY: install-client-services-systemd
46 niro 2450 .PHONY: install-control-services-systemd
47 niro 2247 .PHONY: all install clean