summaryrefslogtreecommitdiff
path: root/sys-libs/libnbd/files/libnbd-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch
blob: ef4988c62641a9a1f84b8f785a0306623586fdc5 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
From 2934e26841b88604ed1bf23e3728d7b69d018c72 Mon Sep 17 00:00:00 2001
From: Christopher Byrne <salah.coronya@gmail.com>
Date: Sat, 14 Jun 2025 21:26:24 -0500
Subject: [PATCH 2/2] Makefile.am: Conditionally compile some SUBDIRS

Otherwise, the Makefile will try to compile them. The correct machinery
is in configure.ac, so just add the conditions to Makefile.am
---
 Makefile.am | 41 ++++++++++++++++++++++++++++++-----------
 1 file changed, 30 insertions(+), 11 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f31e067..1d00ebd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,30 +42,49 @@ SUBDIRS = \
 	common/utils \
 	lib \
 	docs \
-	examples \
 	valgrind \
 	. \
 	tests \
-	python \
-	sh \
 	info \
 	copy \
 	dump \
-	fuse \
-	ublk \
-	ocaml \
-	ocaml/examples \
-	ocaml/tests \
-	golang \
-	golang/examples \
-	rust \
 	interop \
 	fuzzing \
 	bash-completion \
 	$(NULL)
 
+if HAVE_FUSE
+SUBDIRS += fuse
+endif
+
+if HAVE_UBLK
+SUBDIRS += ublk
+endif
+
+if HAVE_GOLANG
+SUBDIRS += golang
+endif
+
+if HAVE_OCAML
+SUBDIRS += ocaml ocaml/tests
+endif
+
+if HAVE_PYTHON
+SUBDIRS += python sh
+endif
+
+if HAVE_RUST
+SUBDIRS += rust
+endif
+
 if BUILD_EXAMPLES 
 SUBDIRS += examples
+if HAVE_OCAML
+SUBDIRS += ocaml/examples
+endif
+if HAVE_GOLANG
+SUBDIRS += golang/examples
+endif
 endif
 
 noinst_SCRIPTS = run
-- 
2.49.0