From: Russ Cox Date: Wed, 12 Aug 2009 21:40:29 +0000 (-0700) Subject: avoid unnecessary installs X-Git-Tag: weekly.2009-11-06~900 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ff5618e2e3087199d35ad78c799751f95b046767;p=gostls13.git avoid unnecessary installs R=r DELTA=6 (4 added, 0 deleted, 2 changed) OCL=33107 CL=33110 --- diff --git a/src/Make.pkg b/src/Make.pkg index a796260240..2098e2ed9c 100644 --- a/src/Make.pkg +++ b/src/Make.pkg @@ -5,7 +5,9 @@ package: _obj/$(TARG).a testpackage: _test/$(TARG).a -dir=$(shell echo $(TARG) | sed 's|[^/]*$$||') +elem=$(lastword $(subst /, ,$(TARG))) +dir=$(patsubst %/$(elem),%,$(TARG)) + pkgdir=$(GOROOT)/pkg/$(GOOS)_$(GOARCH) coverage: @@ -24,7 +26,9 @@ nuke: clean testpackage-clean: rm -f _test/$(TARG).a _gotest_.$O -install: package +install: $(pkgdir)/$(TARG).a + +$(pkgdir)/$(TARG).a: package test -d $(GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir) cp _obj/$(TARG).a $(pkgdir)/$(TARG).a