Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile always rebuilds the libraries #13

Open
d33tah opened this issue Sep 2, 2015 · 8 comments
Open

Makefile always rebuilds the libraries #13

d33tah opened this issue Sep 2, 2015 · 8 comments

Comments

@d33tah
Copy link

d33tah commented Sep 2, 2015

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.

@zardus
Copy link
Owner

zardus commented Sep 2, 2015

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 :-)

@d33tah
Copy link
Author

d33tah commented Sep 3, 2015

Here's the source of the problem: http://stackoverflow.com/q/32386112/1091116

@d33tah
Copy link
Author

d33tah commented Sep 3, 2015

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/

@zardus
Copy link
Owner

zardus commented Sep 4, 2015

Ah, but this way it won't support building multiple architectures in the same checked out repository :-(

@d33tah
Copy link
Author

d33tah commented Sep 5, 2015

What's your workflow? Perhaps this should be done by "make install"?

@zardus
Copy link
Owner

zardus commented Sep 8, 2015

I think just removing the move from build.sh and having it done by "make dist" would be perfect, actually. Good idea!

@zardus
Copy link
Owner

zardus commented Sep 8, 2015

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.

@ZetaTwo
Copy link
Contributor

ZetaTwo commented Oct 14, 2018

Would be solved by #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants