In linux the command install has these options (among others): (from the man page)

-d, --directory
          treat all arguments as directory names; create all components of the specified directories

-D     create all leading components of DEST except the last, then copy SOURCE to DEST

On the mac manage there is this option:

-d      Create directories.  Missing parent directories are created as required.

I am attempting to install a library using a makefile and am getting this error on the mac:

install: illegal option -- D

This is caused by the command install being used to copy a .h file. Would the -d option work the same? Or is there a way to do this that would work on both platforms?


The lowercase "d" should work. If it doesn't, you can install GNU install with Homebrew coreutils which will provide the "D" flag.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .