Blame SOURCES/nvme-cli-fix-cflags-param-patch

8b3e94
commit 254bcd6b23436fd929e18c935322410b541ca121
8b3e94
Author: Breno Leitao <leitao@debian.org>
8b3e94
Date:   Mon Jan 21 07:03:24 2019 -0500
8b3e94
8b3e94
    Fix CFLAGS parameter
8b3e94
    
8b3e94
    Currently nvme-cli 1.7 is not compiling on Debian because the Debian helper
8b3e94
    (compilation toolkit) does pass a CFLAGS variable, thus, avoiding the
8b3e94
    initial definition (CFLAGS ?= -O2 -g -Wall -Werror -I.)
8b3e94
    
8b3e94
    The problem is that -I should not be removed, otherwise the code does not
8b3e94
    compile, with the following bug:
8b3e94
    
8b3e94
            cc -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D__CHECK_ENDIAN__ -g -O2 -fdebug-prefix-map=/home/breno/nvme/nvme-cli-1.7=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu99 -DLIBUUID -DNVME_VERSION='"1.7"' -o plugins/intel/intel-nvme.o -c plugins/intel/intel-nvme.c
8b3e94
            plugins/intel/intel-nvme.c:10:18: fatal error: nvme.h: No such file or directory
8b3e94
            compilation terminated.
8b3e94
    
8b3e94
    This patch just moves the -I parameter to part of the CFLAGS that is not
8b3e94
    replaced by dh's CFLAGS.
8b3e94
    
8b3e94
    Signed-off-by: Breno Leitao <leitao@debian.org>
8b3e94
8b3e94
diff --git a/Makefile b/Makefile
8b3e94
index 525616a..3a4e223 100644
8b3e94
--- a/Makefile
8b3e94
+++ b/Makefile
8b3e94
@@ -1,5 +1,5 @@
8b3e94
-CFLAGS ?= -O2 -g -Wall -Werror -I.
8b3e94
-CFLAGS += -std=gnu99
8b3e94
+CFLAGS ?= -O2 -g -Wall -Werror
8b3e94
+CFLAGS += -std=gnu99 -I.
8b3e94
 CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__
8b3e94
 LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?)
8b3e94
 NVME = nvme