diff --git a/Makefile b/Makefile index 2cf250107..fbe3cb9c8 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ dep: $(DEP) $(DEP) ensure -v codegen: $(SPEC) - ./codegen.sh + @PATH=${PATH}:${GOPATH}/bin ./codegen.sh protobuf: $(PROTOC) # @todo this needs work (it hangs and outputs nothing) diff --git a/codegen.sh b/codegen.sh index c0d2c7dae..c38d9e2a5 100755 --- a/codegen.sh +++ b/codegen.sh @@ -5,7 +5,7 @@ _PWD=$PWD SPECS=$(find $PWD -name 'spec.json' | xargs -n1 dirname) for SPEC in $SPECS; do echo "=== spec $SPEC ===" - cd $SPEC && rm -rf spec && ${GOPATH}/bin/spec && cd .. && ./README.php && cd $_PWD + cd $SPEC && rm -rf spec && /usr/bin/env spec && cd .. && ./README.php && cd $_PWD SRC=$(dirname $(dirname $SPEC)) echo "=== codegen $SRC ==="