Only copy files under Git control

Old method would copy EVERYTHING to gopath for building, including
misc files, images, etc.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This commit is contained in:
Mark D Horn
2018-11-15 11:23:40 -08:00
committed by Mark Horn
parent 49f1020ecd
commit ba1ea2490f
+1 -1
View File
@@ -36,7 +36,7 @@ export GOPATH := ${LOCAL_GOPATH}
gopath:
@rm -rf ${LOCAL_GOPATH}/src
@mkdir -p ${LOCAL_GOPATH}/src/${GO_PACKAGE_PREFIX}
@cp -af * ${LOCAL_GOPATH}/src/${GO_PACKAGE_PREFIX}
@tar cf - `git ls-files` | tar xf - --directory=${LOCAL_GOPATH}/src/${GO_PACKAGE_PREFIX}
else
LOCAL_GOPATH :=
GOPATH ?= ${HOME}/go