我有以下包裝的Makefile包:使用gomake/gotest與外部依賴性
include ${GOROOT}/src/Make.inc
TARG=gorilla.googlecode.com/hg/gorilla/mux
GOFILES=\
doc.go\
mux.go\
DEPS=\
gorilla.googlecode.com/hg/gorilla/context
include ${GOROOT}/src/Make.pkg
我改變TARG和DEPS今天指向谷歌代碼庫,如上圖所示,下面this advice。
問題是:我可以安裝軟件包,它會安裝依賴項,但我不能再使用gotest或gomake;我得到以下錯誤(使用轉到R59):
[email protected]:~/dev/repos/gorilla/gorilla/mux$ gotest
rm -f _test/gorilla.googlecode.com/hg/gorilla/mux.a
make -C gorilla.googlecode.com/hg/gorilla/context install
make: *** gorilla.googlecode.com/hg/gorilla/context: No such file or directory. Stop.
make: *** [gorilla.googlecode.com/hg/gorilla/context.make] Error 2
gotest: "/home/moraes/dev/repos/go/go.r59/bin/gomake testpackage GOTESTFILES=mux_test.go" failed: exit status 2
我第一次嘗試(goinstall gorilla.googlecode.com/hg/gorilla/context
)goinstalling的依賴,並在$ GOROOT /正確安裝PKG但gotest/gomake發生同樣的錯誤。
我想我錯過了一些非常基本的東西。我應該如何繼續在上面的Makefile中使用gomake/gotest?這是否應該工作,或者我應該使用不同的發展?
你如何運行測試?我剛剛嘗試過,測試仍然不起作用(有問題)... –
在運行測試之前,我當前將Makefile改爲使用大猩猩軟件包的相對路徑,例如「../ context」。 – moraes