Skip to content

Commit 3849325

Browse files
committed
work with GNU Make 3.80
Fixes #30. R=r1, r https://golang.org/cl/154061
1 parent 7932950 commit 3849325

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Make.pkg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ all: package
66
package: _obj/$(TARG).a
77
testpackage: _test/$(TARG).a
88

9-
elem=$(lastword $(subst /, ,$(TARG)))
9+
# GNU Make 3.80 has a bug in lastword
10+
# elem=$(lastword $(subst /, ,$(TARG)))
11+
TARG_words=$(subst /, ,$(TARG))
12+
elem=$(word $(words $(TARG_words)),$(TARG_words))
13+
1014
dir=$(patsubst %/$(elem),%,./$(TARG))
1115
pkgdir=$(GOROOT)/pkg/$(GOOS)_$(GOARCH)
1216

0 commit comments

Comments
 (0)