mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
Makefiles: add install target
Note to package maintainers: 1 Yes we do support DESTDIR. 2 From packaging scripts, use something like this: make install DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr (v2: add PREFIX, install to /usr/local not /usr by default) (v3: fix criu man section -- it is 8 not 1) Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
ab4338576c
commit
e516aa0122
@ -6,6 +6,7 @@ XMLTO := xmlto
|
|||||||
|
|
||||||
SRC += criu.txt
|
SRC += criu.txt
|
||||||
MANS := $(patsubst %.txt,%.8,$(SRC))
|
MANS := $(patsubst %.txt,%.8,$(SRC))
|
||||||
|
MAN8DIR := $(MANDIR)/man8
|
||||||
|
|
||||||
all: $(MANS)
|
all: $(MANS)
|
||||||
|
|
||||||
@ -19,4 +20,9 @@ clean:
|
|||||||
$(Q) rm -f ./*.xml
|
$(Q) rm -f ./*.xml
|
||||||
$(Q) rm -f ./*.1
|
$(Q) rm -f ./*.1
|
||||||
|
|
||||||
.PHONY: clean
|
install: $(MANS)
|
||||||
|
$(E) " INSTALL " $(MANS)
|
||||||
|
$(Q) mkdir -p $(DESTDIR)$(MAN8DIR)
|
||||||
|
$(Q) install $(MANS) $(DESTDIR)$(MAN8DIR)
|
||||||
|
|
||||||
|
.PHONY: clean install
|
||||||
|
11
Makefile
11
Makefile
@ -201,12 +201,23 @@ criu-$(CRTOOLSVERSION).tar.bz2:
|
|||||||
v$(CRTOOLSVERSION) | bzip2 > $@
|
v$(CRTOOLSVERSION) | bzip2 > $@
|
||||||
.PHONY: dist tar
|
.PHONY: dist tar
|
||||||
|
|
||||||
|
install: $(PROGRAM) install-man
|
||||||
|
$(E) " INSTALL " $(PROGRAM)
|
||||||
|
$(Q) mkdir -p $(DESTDIR)$(SBINDIR)
|
||||||
|
$(Q) install -m 755 $(PROGRAM) $(DESTDIR)$(SBINDIR)
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
$(Q) $(MAKE) -C Documentation install
|
||||||
|
|
||||||
|
.PHONY: install install-man
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo ' Targets:'
|
@echo ' Targets:'
|
||||||
@echo ' all - Build all [*] targets'
|
@echo ' all - Build all [*] targets'
|
||||||
@echo ' * criu - Build criu'
|
@echo ' * criu - Build criu'
|
||||||
@echo ' zdtm - Build zdtm test-suite'
|
@echo ' zdtm - Build zdtm test-suite'
|
||||||
@echo ' docs - Build documentation'
|
@echo ' docs - Build documentation'
|
||||||
|
@echo ' install - Install binary and man page'
|
||||||
@echo ' clean - Clean everything'
|
@echo ' clean - Clean everything'
|
||||||
@echo ' tags - Generate tags file (ctags)'
|
@echo ' tags - Generate tags file (ctags)'
|
||||||
@echo ' cscope - Generate cscope database'
|
@echo ' cscope - Generate cscope database'
|
||||||
|
@ -9,3 +9,8 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
export E Q
|
export E Q
|
||||||
|
|
||||||
|
# Installation paths
|
||||||
|
PREFIX := /usr/local
|
||||||
|
SBINDIR := $(PREFIX)/sbin
|
||||||
|
MANDIR := $(PREFIX)/share/man
|
||||||
|
Loading…
x
Reference in New Issue
Block a user