Skip to content

Commit

Permalink
make: always fail if mk/config.mk doesn't exist.
Browse files Browse the repository at this point in the history
We previously were failing for all make targets except for clean if the
mk/config.mk file didn't exist, but we should also be failing to
perform make clean if we don't have this file. It turns out you end up
erroring out in the next line anyways. Also, if you make that include
optional, make still fails because we don't have any kind of environment
specified and spdk.common.mk depends on that variable being defined.

There may be some benefit to being able to run make clean if we don't
have a valid configuration file, but right now, there are a lot of
things that depend on the configuration file, such as which environment
file to make or clean and which directories need cleaned.

Change-Id: I2a9c1e982c01ba76b67b153ee7336402300b76b0
Signed-off-by: Seth Howell <[email protected]>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466346
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Paul Luse <[email protected]>
Reviewed-by: Ben Walker <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
  • Loading branch information
Seth5141 authored and jimharris committed Sep 19, 2019
1 parent 390542a commit a19e674
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mk/spdk.common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

ifneq ($(MAKECMDGOALS),clean)
ifeq ($(wildcard $(SPDK_ROOT_DIR)/mk/config.mk),)
$(error mk/config.mk: file not found. Please run configure before 'make $(filter-out clean,$(MAKECMDGOALS))')
endif
$(error mk/config.mk: file not found. Please run configure before make)
endif

include $(SPDK_ROOT_DIR)/mk/config.mk
Expand Down

0 comments on commit a19e674

Please sign in to comment.