33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From 1b862b25f9c645dba7312ea2b06f065412713285 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Tue, 26 Oct 2021 17:45:39 +0200
|
|
Subject: [PATCH 4/4] make: add an install subtarget that doesn't build
|
|
anything
|
|
|
|
This is useful when we want to split the build and installation steps,
|
|
and if there is anything to build in the installation step this is an
|
|
error. For example, when doing 'make build && sudo make install'.
|
|
---
|
|
Makefile | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index ff3d4e80d9..4c4845e8db 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -37,7 +37,7 @@ clean:
|
|
$(CARGO) clean
|
|
rm -f units/systemd-zram-setup@.service
|
|
|
|
-install: build
|
|
+install-nobuild:
|
|
@test -n "$(SYSTEMD_SYSTEM_GENERATOR_DIR)"
|
|
@test -n "$(SYSTEMD_SYSTEM_UNIT_DIR)"
|
|
@test -n "$(PREFIX)"
|
|
@@ -46,3 +46,5 @@ install: build
|
|
$(INSTALL) -Dpm644 zram-generator.conf.example -t $(DESTDIR)$(PREFIX)/share/doc/zram-generator/
|
|
$(INSTALL) -Dpm644 man/zram-generator.8 -t $(DESTDIR)$(PREFIX)/share/man/man8/
|
|
$(INSTALL) -Dpm644 man/zram-generator.conf.5 -t $(DESTDIR)$(PREFIX)/share/man/man5/
|
|
+
|
|
+install: build install-nobuild
|