29 lines
866 B
Diff
29 lines
866 B
Diff
From f3c988c329939e4a0d6413ea9070db490c27dea5 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/5] make: allow install target 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 it is an error.
|
|
For example, when doing 'make build && sudo make install'.
|
|
---
|
|
Makefile | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index ff3d4e80d9..960728928f 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -37,7 +37,11 @@ clean:
|
|
$(CARGO) clean
|
|
rm -f units/systemd-zram-setup@.service
|
|
|
|
+ifndef NOBUILD
|
|
install: build
|
|
+endif
|
|
+
|
|
+install:
|
|
@test -n "$(SYSTEMD_SYSTEM_GENERATOR_DIR)"
|
|
@test -n "$(SYSTEMD_SYSTEM_UNIT_DIR)"
|
|
@test -n "$(PREFIX)"
|