File: 0002-Ensure-directories-exist-before-creating-symlinks-in.patch

package info (click to toggle)
spew 1.0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,072 kB
  • sloc: cpp: 5,957; sh: 3,213; makefile: 67
file content (35 lines) | stat: -rw-r--r-- 1,134 bytes parent folder | download
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
28
29
30
31
32
33
34
35
From: Emmanuel Arias <eamanu@debian.org>
Date: Sun, 17 Aug 2025 17:24:24 -0300
Subject: Ensure directories exist before creating symlinks in install-local
 targets

This patch fixes the install-exec-local and install-man-local targets
to work correctly with 'make --shuffle=reverse'.
---
 man/Makefile.am | 1 +
 src/Makefile.am | 1 +
 2 files changed, 2 insertions(+)

diff --git a/man/Makefile.am b/man/Makefile.am
index 7d6f2ab..e0ea8a2 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -13,6 +13,7 @@ spew.1:		spew.1.in spew.1.include
 install-data-am:	install-man install-man-local
 
 install-man-local:
+	$(MKDIR_P) $(DESTDIR)$(mandir)/man1
 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) -f spew.1 gorge.1)
 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) -f spew.1 regorge.1)
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 569bb2b..565fbad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,5 +40,6 @@ spew_SOURCES = spew.cpp \
 spew_LDFLAGS = $(STATIC_LINK)
 
 install-exec-local:
+	$(MKDIR_P) $(DESTDIR)$(bindir)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) -f spew gorge)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) -f spew regorge)