aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Riggle <zachriggle@users.noreply.github.com>2018-08-31 00:04:51 -0500
committerDmitry Vyukov <dvyukov@google.com>2018-08-30 22:04:51 -0700
commit7ce4cd3a7e986b396dfce6540b04e9be5f084746 (patch)
tree1301620b0e851371d4354ffceca9c9ed9ab0ebd1
parenta4718693a3d9fcabb02299b2ec07c19d8208c539 (diff)
Makefile: Enable working with symlinked directories
Resolves #698
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 976a7cf85..f538a6d19 100644
--- a/Makefile
+++ b/Makefile
@@ -166,7 +166,9 @@ bin/syz-sysgen:
format: format_go format_cpp format_sys
format_go:
- $(GO) fmt ./...
+ # When working from a symlinked directory outside of GOPATH, 'go fmt' will fail.
+ # We need to invoke it from a path inside of GOPATH.
+ cd $(realpath ${PWD}) && $(GO) fmt ./...
format_cpp:
clang-format --style=file -i executor/*.cc executor/*.h tools/kcovtrace/*.c