diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-05 20:29:43 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-05 20:29:43 -0600 |
commit | a7535d8ca8a3f3ed6ed6293e3380e2b1f0d888d8 (patch) | |
tree | f8f1271720a9fa1e41aa36157822687a1e8d7b61 | |
parent | d49388e2eb90b954e8cccb68c59d8fd8a55bf7a3 (diff) |
Teach the Makefile to not be confused by text editor temporary files
-rw-r--r-- | Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -15,6 +15,8 @@ CGO_ENABLED = 1 export CGO_ENABLED cgo_variables = CGO_ENABLED CGO_CFLAGS CGO_CPPFLAGS CGO_CXXFLAGS CGO_LDFLAGS CC CXX +goext = c s S cc cpp cxx h hh hpp hxx +gosrc = $(shell find -L src -name '.*' -prune -o \( -type f \( $(foreach e,$(goext), -name '*.$e' ) \) -o -type d \) -print) GOPATH := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) @@ -52,7 +54,7 @@ uninstall: $(foreach d,$(deps),$(eval src/$d: $(NET); GOPATH='$(GOPATH)' go get -d -u $d)) .PHONY: NET -bin/nshd: $(download) $(generate) $(shell find src -name .git -prune -o -print) $(addprefix .Makefile.var.,$(cgo_variables)) +bin/nshd: $(download) $(generate) $(gosrc) $(addprefix .Makefile.var.,$(cgo_variables)) @true $(foreach f,$(filter $(vp),$^), && test $@ -nt $f ) || rm -rf -- bin pkg GOPATH='$(GOPATH)' CGO_CFLAGS='$(CGO_CFLAGS)' go install nshd |