Skip to content

Commit

Permalink
build: remove lib/.gitignore
Browse files Browse the repository at this point in the history
This isn't required - we already have the whole build/
directory in the top level .gitignore.

When we remove build/lib/.gitignore, it means
build/lib directory must be created somewhere
before we try to place a library there. Top-level
builds get this directory created automatically,
but building directly from a sub-directory's
Makefile means we need to explicitly create
build/lib.  So add a mkdir -p to the LIB_C
macro to do exactly that to cover these cases.

Also simplify 'make clean' at the top level Makefile.
A lot of work went in there to work around this
.gitignore file that's not needed now that we've
fixed the underlying problem by getting rid of
it.

Suggested-by: John Levon <[email protected]>
Signed-off-by: Jim Harris <[email protected]>
Change-Id: Ibb92ff84d8c2a9bbe3e193c84f15ef3866f07b1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9169
Reviewed-by: Nick Connolly <[email protected]>
Reviewed-by: Aleksey Marchuk <[email protected]>
Reviewed-by: Changpeng Liu <[email protected]>
Reviewed-by: Tomasz Zawadzki <[email protected]>
Community-CI: Broadcom CI <[email protected]>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <[email protected]>
  • Loading branch information
jimharris authored and tomzawadzki committed Aug 17, 2021
1 parent 9ef1a55 commit 92e75df
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,7 @@ endif
all: mk/cc.mk $(DIRS-y)
clean: $(DIRS-y)
$(Q)rm -f include/spdk/config.h
$(Q)rm -rf build/bin
$(Q)rm -rf build/fio
$(Q)rm -rf build/examples
$(Q)rm -rf build/include
$(Q)rm -rf build/lib/pkgconfig
$(Q)find build/lib ! -name .gitignore -type f -delete
$(Q)rm -rf build

install: all
$(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)"
Expand Down
1 change: 0 additions & 1 deletion build/lib/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions mk/spdk.common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ BUILD_LINKERNAME_LIB=\
LIB_C=\
$(Q)echo " LIB $(notdir $@)"; \
rm -f $@; \
mkdir -p $(dir $@); \
$(CCAR) crDs $@ $(OBJS)

# Clean up generated files listed as arguments plus a default list
Expand Down

0 comments on commit 92e75df

Please sign in to comment.