Magellan Linux

Contents of /trunk/qemu-networking/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2204 - (show annotations) (download)
Mon Oct 14 09:18:38 2013 UTC (11 years ago) by niro
File size: 1267 byte(s)
-make all shell commands variable
1 # qemu-networking
2 # $Id$
3
4 VERSION = $(shell cat VERSION)
5
6 INSTALL = install
7 RM = rm
8 SED = sed
9 COMPRESS = gzip -9 -c
10
11 confddir = /etc/conf.d
12 datadir = /usr/share
13 docdir = $(datadir)/doc/qemu-networking-$(VERSION)
14 systemddir = /usr/lib/systemd
15 systemdhelperdir = $(systemddir)
16 systemdunitdir = $(systemddir)/system
17
18 all: qemu-networking qemu-networking.service
19
20 qemu-networking:
21 $(SED) 's:@@confddir@@:$(confddir):g' qemu-networking.in > qemu-networking
22
23 qemu-networking.service:
24 $(SED) 's:@@systemdhelperdir@@:$(systemdhelperdir):g' qemu-networking.service.in > qemu-networking.service
25
26 check:
27
28 clean:
29 for i in qemu-networking qemu-networking.service; do \
30 if [ -f $$i ]; then $(RM) $$i; fi \
31 done
32
33 install:
34 $(INSTALL) -d $(DESTDIR)/$(confddir)
35 $(INSTALL) -m0644 qemu-networking.conf $(DESTDIR)/$(confddir)/qemu-networking
36 $(INSTALL) -d $(DESTDIR)/$(systemdhelperdir)
37 $(INSTALL) -m0755 qemu-networking $(DESTDIR)/$(systemdhelperdir)
38 $(INSTALL) -d $(DESTDIR)/$(systemdunitdir)
39 $(INSTALL) -m0644 qemu-networking.service $(DESTDIR)/$(systemdunitdir)
40 $(INSTALL) -d $(DESTDIR)/$(docdir)
41 $(COMPRESS) VERSION > $(DESTDIR)/$(docdir)/VERSION.gz
42 if [ -f ChangeLog ]; then $(COMPRESS) ChangeLog > $(DESTDIR)/$(docdir)/ChangeLog.gz; fi
43
44 .PHONY: install clean check