Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup makefiles #2999

Merged
merged 6 commits into from
Aug 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,15 @@ deps: go_check gx_check path_check
vendor: godep
godep save -r ./...

install: deps
make -C cmd/ipfs install

build: deps
make -C cmd/ipfs build

nofuse: deps
make -C cmd/ipfs nofuse
install build nofuse: deps
$(MAKE) -C cmd/ipfs $@

clean:
make -C cmd/ipfs clean
$(MAKE) -C cmd/ipfs clean
$(MAKE) -C test clean

uninstall:
make -C cmd/ipfs uninstall
$(MAKE) -C cmd/ipfs uninstall

PHONY += all help godep gx_check
PHONY += go_check deps vendor install build nofuse clean uninstall
Expand All @@ -97,29 +92,29 @@ test_go_race:
$(go_test) ./... -race

test_sharness_short:
make -C test/sharness/
$(MAKE) -j1 -C test/sharness/

test_sharness_expensive:
TEST_EXPENSIVE=1 make -C test/sharness/
TEST_EXPENSIVE=1 $(MAKE) -j1 -C test/sharness/

test_all_commits:
@echo "testing all commits between origin/master..HEAD"
@echo "WARNING: this will 'git rebase --exec'."
@test/bin/continueyn
GIT_EDITOR=true git rebase -i --exec "make test" origin/master
GIT_EDITOR=true git rebase -i --exec "$(MAKE) test" origin/master

test_all_commits_travis:
# these are needed because travis.
# we don't use this yet because it takes way too long.
git config --global user.email "nemo@ipfs.io"
git config --global user.name "IPFS BOT"
git fetch origin master:master
GIT_EDITOR=true git rebase -i --exec "make test" master
GIT_EDITOR=true git rebase -i --exec "$(MAKE) test" master

# since we have CI for osx and linux but not windows, this should help
windows_build_check:
GOOS=windows GOARCH=amd64 go build -o .test.ipfs.exe ./cmd/ipfs
rm .test.ipfs.exe
rm -f .test.ipfs.exe

PHONY += test test_short test_expensive

Expand Down
21 changes: 11 additions & 10 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ GOFLAGS =
all: deps

global-deps:
make -C .. deps
$(MAKE) -C .. deps

deps: global-deps bins

clean:
rm $(BINS)
$(MAKE) -C sharness clean
rm -rf $(BINS)

bins: $(BINS)

Expand Down Expand Up @@ -71,18 +72,18 @@ bin/iptb: iptb_src $(call find_go_files, $(IPTB_SRC)) IPFS-BUILD-OPTIONS
test: test_expensive

test_expensive: verify_gofmt
cd sharness && make TEST_EXPENSIVE=1
cd 3nodetest && make
cd dependencies && make
$(MAKE) -C sharness TEST_EXPENSIVE=1
$(MAKE) -C 3nodetest
$(MAKE) -C dependencies

test_cheap: verify_gofmt
cd sharness && make
cd 3nodetest && make
$(MAKE) -C sharness
$(MAKE) -C 3nodetest

test_race: verify_gofmt
cd sharness && make GOFLAGS=-race TEST_EXPENSIVE=1
cd 3nodetest && make GOFLAGS=-race
cd dependencies && make GOFLAGS=-race
$(MAKE) -C sharness GOFLAGS=-race TEST_EXPENSIVE=1
$(MAKE) -C 3nodetest GOFLAGS=-race
$(MAKE) -C dependencies GOFLAGS=-race

# Misc

Expand Down
10 changes: 5 additions & 5 deletions test/sharness/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ all: aggregate

clean: clean-test-results
@echo "*** $@ ***"
-rm -rf $(BINS)
rm -rf $(BINS)

clean-test-results:
@echo "*** $@ ***"
-rm -rf test-results
rm -rf test-results

$(T): clean-test-results deps
@echo "*** $@ ***"
Expand All @@ -34,7 +34,7 @@ aggregate: clean-test-results $(T)
lib/test-aggregate-results.sh

global-deps:
make -C ../.. deps
$(MAKE) -C ../.. deps

deps: global-deps $(SHARNESS) $(BINS) curl

Expand All @@ -43,10 +43,10 @@ $(SHARNESS): FORCE
lib/install-sharness.sh

bin/%: FORCE
cd .. && make GOFLAGS=$(GOFLAGS) $@
$(MAKE) -C .. GOFLAGS=$(GOFLAGS) $@

race:
make GOFLAGS=-race all
$(MAKE) GOFLAGS=-race all

.PHONY: all clean $(T) aggregate FORCE

Expand Down