summaryrefslogtreecommitdiff
blob: 518e7df6118509bd3f249bc1d8e3e96a777f0e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
https://github.com/digint/btrbk/pull/341

From ec123405669762aefe813801e2c49183800cc3a9 Mon Sep 17 00:00:00 2001
From: Xiretza <xiretza@xiretza.xyz>
Date: Mon, 28 Sep 2020 16:49:19 +0200
Subject: [PATCH] Fix race condition in `make install`

If run with -j, it's possible for install-bin-links to run before
install-bin and subsequently fail because $(BINDIR) hasn't been created
yet.
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 030b577..44ab19f 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@ install-bin:
 	install -d -m 755 "$(DESTDIR)$(BINDIR)"
 	install -p -m 755 $(BIN) "$(DESTDIR)$(BINDIR)"
 
-install-bin-links:
+install-bin-links: install-bin
 	@echo 'installing symlinks...'
 	for name in $(BIN_LINKS); do \
 		ln -s -n -f $(BIN) "$(DESTDIR)$(BINDIR)/$$name"; \