]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
Revert "src/Makefile: fix ccan config.h"
authorJeremy Kerr <jk@codeconstruct.com.au>
Thu, 21 Oct 2021 08:07:08 +0000 (16:07 +0800)
committerJeremy Kerr <jk@codeconstruct.com.au>
Thu, 21 Oct 2021 08:29:32 +0000 (16:29 +0800)
This reverts commit 859bd459dee308639eedb490d348d311dc08f859.

We have the proper fixes in progress, no need for the revert-workaround.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
configure
src/Makefile

index 592e0abfd379657d6f4f4d21038e48b9153cc3fd..b21a09823af28415bfc7ad2cbd7d13e68389e4b9 100755 (executable)
--- a/configure
+++ b/configure
@@ -73,16 +73,16 @@ exit 0
 fi
 
 config_host_mak="config-host.mak"
-config_host_h="config-host.h"
+config_h="config.h"
 
 rm -rf $config_host_mak
-rm -rf $config_host_h
+rm -rf $config_h
 
 fatal() {
   echo $@
   echo "Configure failed, check config.log and/or the above output"
   rm -rf $config_host_mak
-  rm -rf $config_host_h
+  rm -rf $config_h
   exit 1
 }
 
@@ -96,8 +96,8 @@ CFLAGS="-D_GNU_SOURCE -include config.h"
 BUILD_CFLAGS=""
 
 cmdstr=$(printf " '%s'" "$0" "$@")
-# Print configure header at the top of $config_host_h
-cat > $config_host_h <<EOF
+# Print configure header at the top of $config_h
+cat > $config_h <<EOF
 /*
  * Automatically generated by configure - do not modify
  * Configured with:
@@ -169,7 +169,7 @@ output_mak() {
 
 output_sym() {
   output_mak "$1" "y"
-  echo "#define $1" >> $config_host_h
+  echo "#define $1" >> $config_h
 }
 
 print_and_output_mak() {
index 23372b0b3e424844bb008e72980948bc9d2c725a..4af6551af13357a9d3b8ed59e68171ecb2034221 100644 (file)
@@ -12,7 +12,7 @@ libdir ?= $(prefix)/lib
 
 CCANDIR=../ccan/
 
-CFLAGS ?= -g -fomit-frame-pointer -O2 -I/usr/include -Invme/ -I$(CCANDIR) -include ../config-host.h -D_GNU_SOURCE
+CFLAGS ?= -g -fomit-frame-pointer -O2 -I/usr/include -Invme/ -I$(CCANDIR) -I.. -include ../config.h -D_GNU_SOURCE
 override CFLAGS += -Wall -fPIC
 SO_CFLAGS=-shared $(CFLAGS)
 L_CFLAGS=$(CFLAGS)
@@ -36,7 +36,7 @@ include ../Makefile.quiet
 
 all: $(all_targets)
 
-$(CCANDIR)config.h: $(CCANDIR)tools/configurator/configurator
+$(CCANDIR)ccan-config.h: $(CCANDIR)tools/configurator/configurator
        $< > $@
 $(CCANDIR)tools/configurator/configurator: CFLAGS = -D_GNU_SOURCE
 
@@ -45,7 +45,7 @@ libccan_srcs := $(wildcard $(CCANDIR)ccan/*/*.c)
 libccan_objs := $(patsubst %.c,%.ol,$(libccan_srcs))
 libccan_sobjs := $(patsubst %.c,%.os,$(libccan_srcs))
 
-$(libccan_objs) $(libccan_sobjs): $(libccan_headers) $(CCANDIR)config.h
+$(libccan_objs) $(libccan_sobjs): $(libccan_headers) $(CCANDIR)ccan-config.h
 
 libnvme_priv := nvme/private.h
 libnvme_api := libnvme.h nvme/types.h nvme/linux.h nvme/ioctl.h nvme/filters.h nvme/tree.h nvme/util.h nvme/fabrics.h nvme/log.h
@@ -87,10 +87,10 @@ ifeq ($(ENABLE_SHARED),1)
 endif
 
 $(libnvme_objs): $(libnvme_api) $(libnvme_private)
-$(libccan_objs): $(libccan_headers) $(CCANDIR)config.h
+$(libccan_objs): $(libccan_headers) $(CCANDIR)ccan-config.h
 
 clean:
        rm -f $(all_targets) $(libnvme_objs) $(libnvme_sobjs) $(libccan_objs) $(libccan_sobjs) $(soname).new
-       rm -f $(CCANDIR)config.h
+       rm -f $(CCANDIR)ccan-config.h
        rm -f $(CCANDIR)tools/configurator/configurator
        rm -f *.so* *.a *.o