mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-02 12:20:03 +08:00
Don't use wildcards to look for .go files in tests makefile
GNU Make's wildcard function does not recurse into subdirectories when passed the '**' glob, which results in adding a dependency only to .go files in the first level of subdirectories under the source root. We shell out to 'find' instead, which catches all .go files in the given directory.
This commit is contained in:
@ -18,19 +18,21 @@ clean:
|
||||
|
||||
bins: $(BINS)
|
||||
|
||||
bin/random: $(RANDOM_SRC)/**/*.go IPFS-BUILD-OPTIONS
|
||||
find_go_files = $(shell find $(1) -name "*.go")
|
||||
|
||||
bin/random: $(call find_go_files, $(RANDOM_SRC)) IPFS-BUILD-OPTIONS
|
||||
@echo "*** installing $@ ***"
|
||||
go build $(GOFLAGS) -o bin/random $(RANDOM_SRC)/random
|
||||
|
||||
bin/multihash: $(MULTIHASH_SRC)/**/*.go IPFS-BUILD-OPTIONS
|
||||
bin/multihash: $(call find_go_files, $(MULTIHASH_SRC)) IPFS-BUILD-OPTIONS
|
||||
@echo "*** installing $@ ***"
|
||||
go build $(GOFLAGS) -o bin/multihash $(MULTIHASH_SRC)/multihash
|
||||
|
||||
bin/ipfs: $(IPFS_ROOT)/**/*.go IPFS-BUILD-OPTIONS
|
||||
bin/ipfs: $(call find_go_files, $(IPFS_ROOT)) IPFS-BUILD-OPTIONS
|
||||
@echo "*** installing $@ ***"
|
||||
go build $(GOFLAGS) -o bin/ipfs $(IPFS_CMD)
|
||||
|
||||
bin/pollEndpoint: $(POLLENDPOINT_SRC)/*.go IPFS-BUILD-OPTIONS
|
||||
bin/pollEndpoint: $(call find_go_files, $(POLLENDPOINT_SRC)) IPFS-BUILD-OPTIONS
|
||||
@echo "*** installing $@ ***"
|
||||
go build $(GOFLAGS) -o bin/pollEndpoint $(POLLENDPOINT_SRC)
|
||||
|
||||
|
Reference in New Issue
Block a user