I’m currently using the usual technique in my Makefile to install individual files:
install: install -D executable ${BIN_DIR}
But I just ran across a situation where I need to move a whole directory and all files underneath it into place.
Is cp -r the best way or is there a more linux-y/unix-y way to do this?
Yeah, it’s hard to think of a more unix-ish way that
cp -r, although the -r is a relatively late addition tocp. I can tell you the way we used to do it, and that works neatly across filesystems and such:Let
srcbe the source directory you want to move, and/path/to/targetbe an absolute path to the target. Then you can use: