preeny
preeny copied to clipboard
Makefile always rebuilds the libraries
This is probably an easy fix - I used to find myself hacking preeny for my own needs quite a lot once and I found it a bit annoying that "make" would try to rebuild all of the libraries even if I changed just one. Tested on Fedora 21.
Unfortunately, I don't have the cycles to look into this at the moment, but I'd be happy to take a PR if someone does :-)
Here's the source of the problem: http://stackoverflow.com/q/32386112/1091116
Here's a partial fix that doesn't remove the symlinks on "make clean":
diff --git a/src/build_so.sh b/src/build_so.sh
index dc2e1f1..d6386ea 100755
--- a/src/build_so.sh
+++ b/src/build_so.sh
@@ -27,4 +27,5 @@ shift 2
$CC $IN -o $OUT -shared $OPTS "$@" &&
mkdir -p ../$MACHINE &&
-mv $OUT ../$MACHINE/
+rm -f ../$MACHINE/$OUT &&
+ln -s ../src/$OUT ../$MACHINE/
Ah, but this way it won't support building multiple architectures in the same checked out repository :-(
What's your workflow? Perhaps this should be done by "make install"?
I think just removing the move from build.sh and having it done by "make dist" would be perfect, actually. Good idea!
Ok, I ended up rewriting the whole makefile so that we don't need build_so.sh
anymore.
Doing make
from the top-level dir will still blow the libs away (I want to avoid confusion between architectures when cross-compiling), but running make
in src
will have the expected behavior. Let me know if that works for you.
Would be solved by https://github.com/zardus/preeny/pull/46