File: Use-CPPFLAGS-from-the-environment.patch

package info (click to toggle)
dlm 4.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 900 kB
  • ctags: 1,844
  • sloc: ansic: 13,442; makefile: 297; sh: 83
file content (71 lines) | stat: -rw-r--r-- 2,522 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
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
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
Date: Mon, 19 Dec 2016 21:36:05 +0100
Subject: Use CPPFLAGS from the environment

---
 dlm_controld/Makefile | 4 ++--
 dlm_tool/Makefile     | 2 +-
 fence/Makefile        | 2 +-
 libdlm/Makefile       | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
index 873d7c2..d0c0732 100644
--- a/dlm_controld/Makefile
+++ b/dlm_controld/Makefile
@@ -70,10 +70,10 @@ endif
 all: $(LIB_TARGET) $(BIN_TARGET)
 
 $(BIN_TARGET): $(BIN_SOURCE)
-	$(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L.
+	$(CC) $(CPPFLAGS) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L.
 
 $(LIB_TARGET): $(LIB_SOURCE)
-	$(CC) $^ $(LIB_CFLAGS) $(CFLAGS) $(LIB_LDFLAGS) $(LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR)
+	$(CC) $(CPPFLAGS) $^ $(LIB_CFLAGS) $(CFLAGS) $(LIB_LDFLAGS) $(LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR)
 	ln -sf $(LIB_TARGET) $(LIB_SO)
 	ln -sf $(LIB_TARGET) $(LIB_SMAJOR)
 
diff --git a/dlm_tool/Makefile b/dlm_tool/Makefile
index 27635a7..7a01132 100644
--- a/dlm_tool/Makefile
+++ b/dlm_tool/Makefile
@@ -39,7 +39,7 @@ BIN_LDFLAGS += -lpthread -ldlm -ldlmcontrol
 all: $(BIN_TARGET)
 
 $(BIN_TARGET): $(BIN_SOURCE)
-	$(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@
+	$(CC) $(CPPFLAGS) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@
 
 clean:
 	rm -f *.o *.so *.so.* $(BIN_TARGET)
diff --git a/fence/Makefile b/fence/Makefile
index 2574382..504cce8 100644
--- a/fence/Makefile
+++ b/fence/Makefile
@@ -40,7 +40,7 @@ BIN_LDFLAGS += -ldl
 all: $(BIN_TARGET)
 
 $(BIN_TARGET): $(BIN_SOURCE)
-	$(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L.
+	$(CC) $(CPPFLAGS) $(BIN_SOURCE) $(BIN_CFLAGS) $(CFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ -L.
 
 clean:
 	rm -f *.o *.so *.so.* $(BIN_TARGET)
diff --git a/libdlm/Makefile b/libdlm/Makefile
index 3352b0a..9350940 100644
--- a/libdlm/Makefile
+++ b/libdlm/Makefile
@@ -83,10 +83,10 @@ LIB_LDFLAGS += -lpthread
 all: $(LIB_TARGET) $(LLT_TARGET) $(LIB_PC) $(LLT_PC)
 
 $(LIB_O): $(SOURCE) 
-	$(CC) $< $(LIB_CFLAGS) $(CFLAGS) -c -o $@
+	$(CC) $(CPPFLAGS) $< $(LIB_CFLAGS) $(CFLAGS) -c -o $@
 
 $(LLT_O): $(SOURCE) 
-	$(CC) $< $(LLT_CFLAGS) $(CFLAGS) -c -o $@
+	$(CC) $(CPPFLAGS) $< $(LLT_CFLAGS) $(CFLAGS) -c -o $@
 
 $(LIB_TARGET): $(LIB_O)
 	$(CC) $^ $(LIB_LDFLAGS) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR)