From f2dd060e4a34a2106e7a13cb759daca9919e935c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 7 Apr 2015 16:47:55 +0200 Subject: [PATCH] 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. --- test/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/Makefile b/test/Makefile index 93a287a3f..8974c552b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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)