relipmoc / skewer

MIT License
95 stars 17 forks source link

Would be nice to include local ./configure option #47

Open jennformatics opened 6 years ago

jennformatics commented 6 years ago

Hi. I get this rather predictable error upon installation:

[jenn@whereever skewer]$ make install
mv -f skewer /usr/local/bin
mv: cannot create regular file ‘/usr/local/bin/skewer’: Permission denied
make: *** [install] Error 1

Naturally I don't have access to /usr/local/bin in my supercomputing environment. I tried running configure, but got this:

[jenn@login3 skewer]$ configure --prefix=/projects/jenn/software/bin
[snip]
configure: error: source directory already configured; run "make distclean" there first

...and then, upon taking that suggestion....

[jenn@login3 skewer]$ make distclean
make: *** No rule to make target `distclean'.  Stop.

I went ahead and hacked the Makefile to replace /usr/local/bin with my preferred path, and it seems to be fine. Or, of course, in this relatively simple installation environment I suppose I could just have ignored the error and moved the executable manually once it was created. But it would be awfully nice if configure --prefix worked, so that people (even) less compilation-savvy than I could follow the general advice they can find on the net about how to install programs without root. Thanks!

owainkenwayucl commented 6 years ago

I actually came here to post something similar.

You don't need to go the way of using autotools though (because it can be a bit complicated for such a small program), just have an environment variable that the Makefile checks or something similar.

(I look after the scripts that auto-build software on our cluster and just use sed to change the path things install to).