[Makefile] Create Directory If Not Exist


Write a command line in Makefile: Create a directory if it does not exist. Otherwise do nothing.

MYDIR=/home/myaccount/dev
[ -d $(MYDIR) ] || mkdir -p $(MYDIR)

Tested on Ubuntu Linux 15.10.


References:

[1][Golang] Create Directory If Not Exist
[2]Package write provides a way to atomically create or replace a file or symbolic link. : golang