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

Some makefile refactoring, add 'make help' #12274

Merged
merged 7 commits into from
Feb 15, 2014
Merged

Conversation

brson
Copy link
Contributor

@brson brson commented Feb 14, 2014

I've been working on binary installers and ended up taking this detour, which does a few things:

  • It expands the documentation on the build system with new comments in Makefile.in
  • It displays some of that documentation via make help
  • Removes some unused and broken snapshot code
  • Adds NO_MKFILE_DEPS to convenience makefile hacking
  • Moves almost all of Makefile.in to files in mk/

The documentation provided by make help and its implementation are somewhat quirky.

@brson
Copy link
Contributor Author

brson commented Feb 14, 2014

This is what the docs look like. Note that the XML tags are just for parsing and aren't displayed to the user. The docs are also incomplete still.

@alexcrichton
Copy link
Member

This all looks great to me! Perhaps soon we'll be able to understand these makefiles!

#
# * `NO_REBUILD=1` - Don't rebootstrap when testing std
# (and possibly other crates)
# * `NO_MKFILE_DEPS=1` - Don rebuild for modified .mk files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Don/Don't/

'make help' is implemented in a fairly ridiculous way, using awk
to parse comments out of Makefile.in and displaying them.
This way of doing snapshots hasn't been used since 2011.
Because the build system treats Makefile.in and the .mk files slightly
differently (.in is copied, .mk are included), this makes the system
more uniform. Fewer build system changes will require a complete
reconfigure.
Just so it's easier to find.
@brson
Copy link
Contributor Author

brson commented Feb 15, 2014

All comments addressed.

bors added a commit that referenced this pull request Feb 15, 2014
I've been working on binary installers and ended up taking this detour, which does a few things:

* It expands the documentation on the build system with new comments in Makefile.in
* It displays some of that documentation via `make help`
* Removes some unused and broken snapshot code
* Adds `NO_MKFILE_DEPS` to convenience makefile hacking
* Moves almost all of Makefile.in to files in `mk/`

The documentation provided by `make help` and its implementation are somewhat quirky.
@bors bors closed this Feb 15, 2014
@bors bors merged commit 8d4b675 into rust-lang:master Feb 15, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
…ration, r=jonas-schievink

feat: Handle getters and setters in documentation template assist

The assist can now turn this:

```rust
pub struct S;
impl S {
    pub fn data_mut$0(&mut self) -> &mut [u8] { &mut [] }
}
```

into

```rust
pub struct S;
impl S {
    /// Returns a mutable reference to the data.
    ///
    /// # Examples
    ///
    /// ```
    /// use test::S;
    ///
    /// let mut s = ;
    /// assert_eq!(s.data_mut(), );
    /// assert_eq!(s, );
    /// ```
    pub fn data_mut(&mut self) -> &mut [u8] { &mut [] }
}
```

And similarly for by-value or immutable getters, and for setters. Previously the intro line would be empty.

This PR also removes the documentation generation function from the "Generate getter/setter" assist, since that is better handled by applying the 2 assists in sequence. cc rust-lang/rust-analyzer#12273
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 26, 2024
Minor refactor format-impls

Move all linting logic into a single format implementations struct

This should help with the future format-args improvements.

TODO: do the same with format_args.rs, perhaps in the same PR

**NOTE TO REVIEWERS**:  use "hide whitespace" in the github diff -- most of the code has shifted, but relatively low number of lines actually modified.

changelog: none
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 26, 2024
Minor refactor format-args

* Move all linting logic into a single format implementations struct

This should help with the future format-args improvements.

**NOTE TO REVIEWERS**:  use "hide whitespace" in the github diff -- most of the code has shifted, but relatively low number of lines actually modified.

Followig up from rust-lang#12274

r? `@xFrednet`

---

changelog: none
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

Successfully merging this pull request may close these issues.

5 participants