Commit 1d901572 authored by Jim Harris's avatar Jim Harris Committed by Gerrit Code Review
Browse files

Fix header file dependencies.



Move dependency includes into a new spdk.deps.mk file,
then include it at the end of Makefiles that build
source files.

Also add a test to autobuild.sh to confirm that
binaries are regenerated if we make after touching a
header file.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: If6a1905706a840f92cbdf3ace7fbdb27fe2de213
parent c2fdcfdd
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -21,6 +21,18 @@ make $MAKEFLAGS clean
fail=0
time $scanbuild make $MAKEFLAGS DPDK_DIR=$DPDK_DIR || fail=1

# Check that header file dependencies are working correctly by
#  capturing a binary's stat data before and after touching a
#  header file and re-making.
STAT1=`stat examples/nvme/identify/identify`
touch lib/nvme/nvme_internal.h
make $MAKEFLAGS DPDK_DIR=$DPDK_DIR || fail=1
STAT2=`stat examples/nvme/identify/identify`

if [ "$STAT1" == "$STAT2" ]; then
	fail=1
fi

if [ -d $out/scan-build-tmp ]; then
	scanoutput=$(ls -1 $out/scan-build-tmp/)
	mv $out/scan-build-tmp/$scanoutput $out/scan-build
+1 −2
Original line number Diff line number Diff line
@@ -58,5 +58,4 @@ $(APP) : $(OBJS) $(SPDK_LIBS)
clean :
	$(Q)rm -f $(OBJS) *.d $(APP)


include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
+1 −1
Original line number Diff line number Diff line
@@ -58,4 +58,4 @@ $(APP) : $(OBJS) $(SPDK_LIBS)
clean :
	$(Q)rm -f $(OBJS) *.d $(APP)

include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
+1 −0
Original line number Diff line number Diff line
@@ -53,3 +53,4 @@ clean :
$(LIB) : $(OBJS)
	$(Q)ar crDs $(LIB) $(OBJS)

include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
+1 −0
Original line number Diff line number Diff line
@@ -51,3 +51,4 @@ clean :
libspdk_nvme.a : $(OBJS)
	$(Q)ar crDs libspdk_nvme.a $(OBJS)

include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
Loading