flipper-io / flipper

Flipper is a development platform that can be controlled from any programming language.
https://www.flipper.io/
Apache License 2.0
70 stars 15 forks source link

Makefiles should make fewer assumptions about what directories exist. #10

Closed TravisWhitaker closed 8 years ago

TravisWhitaker commented 8 years ago

Specifically /usr/local.

harlanhaskins commented 8 years ago

which is your friend

TravisWhitaker commented 8 years ago

Specifically I had in mind always calling mkdir with -p, i.e. the libflipper makefile expects /usr/local, /usr/local/include, etc. to exist.

Mikejmoffitt commented 8 years ago

More importantly, the makefile should segregate the build and install steps.

TravisWhitaker commented 8 years ago

The one's I've run seem to do that (not that I've looked too closely). Do you have an example of make install building something (or vice versa)?

Mikejmoffitt commented 8 years ago

Almost everything I have built has the actual build target(s) be prerequisites for an install target. It follows that the process has resembled something like this: make sudo make install

or

make su -c "make install"

This removes the need to have ownership of the directory it's installed in. In my experience of building libflipper, I had to own /usr/local/flipper (or wherever it was) as the install process wasn't separate from the build process.

TravisWhitaker commented 8 years ago

The makefiles I've used from this repository have the behavior you describe. Do you have an example of one that doesn't behave that way?

Mikejmoffitt commented 8 years ago

It looks like the libflipper makefile has changed some since I had last used it. The issue may be resolved.

TravisWhitaker commented 8 years ago

Well, my original issue still stands.

georgemorgan commented 8 years ago

Fixed this by requiring users to specify PREFIX= before compilation.

TravisWhitaker commented 8 years ago

LGTM.