-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Build should create directories as needed #3326
Comments
+1 |
I'm pretty sure I know how to do this. (I think the right tools for the job are some order-only prerequisites in host.mk and target.mk.) |
This is an attempt to address Issue rust-lang#3326 by adding [*order-only*][1] prerequsites of each build product on the directory where it is to go. It is important that the prerequisites be order-only, since the timestamp on a parent directory is not relevant to whether a product is out of date; the parent directory merely needs to exist. (This use case of generating target directories was provided as an [example][2] of how order-only prequisites are used.) [1]: http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html [2]: http://www.kolpackov.net/pipermail/notes/2004-January/000001.html
@catamorphism I haven't actually waited for a whole build to go through yet, and I have to leave for the evening. But I'd welcome it if you would be willing to pull this (SHA: 4dd0fa6) into your repo and give it a spin. If you don't get around to it, no sweat; it can obviously wait until Monday. |
@catamorphism argh ignore comment above; the commit isn't anywhere near fully baked yet; somethings off with my make syntax. |
@pnkfelix Okay. It would be nice to do this in the interim, but eventually when rustpkg is the build system it will do this (much more easily than with Makefile hacking), so no sweat if you don't get it done :-) |
This is an attempt to address Issue rust-lang#3326 by adding [*order-only*][1] prerequsites of each build product on the directory where it is to go. It is important that the prerequisites be order-only, since the timestamp on a parent directory is not relevant to whether a product is out of date; the parent directory merely needs to exist. (This use case of generating target directories was provided as an [example][2] of how order-only prequisites are used.) [1]: http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html [2]: http://www.kolpackov.net/pipermail/notes/2004-January/000001.html
…stalling. When building Rust libraries (e.g. librustc, libstd, etc), checks for and verbosely removes previous build products before invoking rustc. (Also, when Make variable VERBOSE is defined, it will list all of the libraries matching the object library's glob after the rustc invocation has completed.) When installing Rust libraries, checks for previous libraries in target install directory, but does not remove them. The thinking behind these two different modes of operation is that the installation target, unlike the build tree, is not under the control of this infrastructure and it is not up to this Makefile to decide if the previous libraries should be removed.
fix formatting of strings within a macro
Automatic Rustup also fixes rust-lang/miri#3308
There comes a time in the life of every Rust developer when they have to blow away various parts of the
build
directory to avoid messages about "multiple matching crates". Then when they do the next build they get things like:cp: x86_64-apple-darwin/stage1/lib/librustrt.dylib: No such file or directory
. It would be better if the Makefile would just create all the needed parent directories automatically.The text was updated successfully, but these errors were encountered: