From: Jeremy Kerr Date: Thu, 21 Oct 2021 08:07:08 +0000 (+0800) Subject: Revert "src/Makefile: fix ccan config.h" X-Git-Tag: v1.0-rc0~71^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=39b9fa618cf4b66bc5cb5ded6a9f1c7b876722ad;p=users%2Fsagi%2Flibnvme.git Revert "src/Makefile: fix ccan config.h" This reverts commit 859bd459dee308639eedb490d348d311dc08f859. We have the proper fixes in progress, no need for the revert-workaround. Signed-off-by: Jeremy Kerr --- diff --git a/configure b/configure index 592e0abf..b21a0982 100755 --- 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 < $config_h <> $config_host_h + echo "#define $1" >> $config_h } print_and_output_mak() { diff --git a/src/Makefile b/src/Makefile index 23372b0b..4af6551a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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