It's a bit of a smell that Homebrew doesn't do this itself.
I moved away from homebrew, to compiling my own software on macOS which I just put in ~/build. I don't use sudo make install since I own the ~/build folder.
What am I doing wrong in this case?