This might be better written something like.  
```
ifneq (exists, $(shell [ -d $(JULIAHOME)/deps/libgit2/build ] && echo exists ))
```

Adding this before line 454 below should also work:
```
(test -d $(JULIAHOME)/deps/libgit2/build || mkdir $(JULIAHOME)/deps/libgit2/build) && \
```