blob: d3af5e33dbcbbf20900b8976dfa0808db0270458 (
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
|
From: YAEGASHI Takeshi <yaegashi@debian.org>
Date: Mon, 17 Feb 2014 06:51:44 +0900
Subject: introduce debian standard build flags
See https://wiki.debian.org/Hardening
---
Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 63e38ab..ff93147 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,10 @@ DOC_PDF = $(patsubst %.txt,%.pdf,$(MAN_TXT))
#
-include cgit.conf
+# Import Debian standard build flags.
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
export CGIT_VERSION CGIT_SCRIPT_NAME CGIT_SCRIPT_PATH CGIT_DATA_PATH CGIT_CONFIG CACHE_ROOT
#
@@ -66,7 +70,8 @@ endif
all:: cgit
cgit:
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1
+ $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1 \
+ CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
test:
@$(MAKE) --no-print-directory cgit EXTRA_GIT_TARGETS=all
|