From: Russ Cox Date: Wed, 11 Nov 2009 20:00:50 +0000 (-0800) Subject: work with GNU Make 3.80 X-Git-Tag: weekly.2009-11-12~31 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=384932589d1a8257c191a329e50509039bd052ef;p=gostls13.git work with GNU Make 3.80 Fixes #30. R=r1, r https://golang.org/cl/154061 --- diff --git a/src/Make.pkg b/src/Make.pkg index 50e1d8d72b..fd8e5bdb61 100644 --- a/src/Make.pkg +++ b/src/Make.pkg @@ -6,7 +6,11 @@ all: package package: _obj/$(TARG).a testpackage: _test/$(TARG).a -elem=$(lastword $(subst /, ,$(TARG))) +# GNU Make 3.80 has a bug in lastword +# elem=$(lastword $(subst /, ,$(TARG))) +TARG_words=$(subst /, ,$(TARG)) +elem=$(word $(words $(TARG_words)),$(TARG_words)) + dir=$(patsubst %/$(elem),%,./$(TARG)) pkgdir=$(GOROOT)/pkg/$(GOOS)_$(GOARCH)