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

Separate installation prefix from build directory #26

Open
benesch opened this issue Jan 19, 2022 · 2 comments
Open

Separate installation prefix from build directory #26

benesch opened this issue Jan 19, 2022 · 2 comments

Comments

@benesch
Copy link
Contributor

benesch commented Jan 19, 2022

Right now autotools-rs builds into OUT_DIR but also configures the installation prefix as OUT_DIR. That means the build files get mixed in with the installation artifacts. Not generally a huge deal, but I have a use case where I want to extract the compiled artifacts without the build artifacts downstream of Cargo.

This is my current workaround:

https://github.com/MaterializeInc/rust-protobuf-native/blob/cbc2b33ac0d474ca557018f4695cc508076ffeb0/protobuf-src/build.rs#L22-L32

Would you be open to a patch to bring that behavior upstream? If so, would you prefer it to be configurable or just to make this the default behavior? (FWIW I can't think of a reason that someone would prefer the current behavior to separate build and install directories.)

@lu-zero
Copy link
Owner

lu-zero commented Jan 19, 2022

Absolutely :)

@benesch
Copy link
Contributor Author

benesch commented Jan 19, 2022

Hrm, I got wedged trying to figure out what to do with build_insource:

autotools-rs/src/lib.rs

Lines 425 to 426 in 644cb0d

dst = self.path.clone();
build = dst.clone();

That runs ./configure --prefix=BUILDDIR and then runs make install on that, which ... well gosh, I don't know, does that work? Seems very strange! I guess it works if you get lucky and none of the files in the source tree conflict with the files that will be installed?

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

2 participants