iscsi-scst: fix 2 minor main Makefile issues

1. Fix build of progs and mods targets, if iscsi_scst_itf_ver.h does not exist
2. Fix small race for parallel build of "all" target, when iscsi_scst_itf_ver.h
   not yet built, when progs or mods target need it



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6861 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2016-04-20 03:17:16 +00:00
parent 9cd57cf50f
commit 7219595e5c
+3 -3
View File
@@ -50,7 +50,7 @@ endif
INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra
INFINIBAND_ENABLED := $(shell if grep -q '^CONFIG_INFINIBAND=[my]$$' $(KDIR)/.config; then echo true; else echo false; fi)
all: include/iscsi_scst_itf_ver.h progs mods
all: progs mods
ISER_SYMVERS:=$(KMOD)/Module.symvers
OFED_CFLAGS:=
@@ -103,7 +103,7 @@ endif
CREATE_CQ_FLAG = $(shell $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/conftest/create_cq PRE_CFLAGS="$(OFED_CFLAGS) -Werror" >/dev/null 2>&1 && echo -DIB_CREATE_CQ_HAS_INIT_ATTR)
PRE_CFLAGS=$(OFED_CFLAGS) $(CREATE_CQ_FLAG) -DOFED_FLAVOR=$(OFED_FLAVOR)
mods: Modules.symvers Module.symvers
mods: include/iscsi_scst_itf_ver.h Modules.symvers Module.symvers
$(MAKE) -C $(KDIR) SCST_INC_DIR=$(SCST_INC_DIR) SUBDIRS=$(KMOD) modules
if $(INFINIBAND_ENABLED); then \
echo " Building against $(OFED_FLAVOR) InfiniBand kernel headers."; \
@@ -112,7 +112,7 @@ mods: Modules.symvers Module.symvers
KBUILD_EXTRA_SYMBOLS=$(ISER_SYMVERS) modules; \
fi
progs:
progs: include/iscsi_scst_itf_ver.h
$(MAKE) -C usr SCST_INC_DIR=$(SCST_INC_DIR)
include/iscsi_scst_itf_ver.h: include/iscsi_scst.h