git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: pin cargo --target-dir to ./target

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 20, 2026, 16:52 UTC
Message-ID
<xmqq7bjcxqkr.fsf@gitster.g>
In-Reply-To
<CAHWeT-Z5OhJLYx21V417DoL3xOQJj6viUzCm+04iDe0zu=jVWw@mail.gmail.com>
Andy Koppe <andy.koppe@gmail.com> writes:
Show 8 quoted lines
> The problem I see with that approach is that CARGO_ARGS looks like it
> is intended for build preferences similar to CFLAGS or LDFLAGS that
> could be overridden on the make command line, whereas the target dir
> is a hard requirement of the subsequent link step.
>
> I suppose `override CARGO_ARGS += --target-dir target` would avoid
> that concern, but also set a trap because any subsequent modifications
> of the variable without `override` would be quietly ignored.
But we are already tweaking it with += in the Makefile, aren't we?
    # Rust flags
    CARGO_ARGS =
    ifndef V
    CARGO_ARGS += --quiet
    endif
    ifndef DEBUG
    CARGO_ARGS += --release
    endif
    
Previous: Andy KoppeNext: Andy Koppe
Message 5 of 7 in “Makefile: pin cargo --target-dir to ./target”
  1. Makefile: pin cargo --target-dir to ./targetAndy Koppe, Oct 18, 2026
  2. Patrick SteinhardtOct 19, 2026
  3. Junio C HamanoOct 19, 2026
  4. Andy KoppeOct 19, 2026
  5. Junio C HamanoOct 20, 2026
  6. Andy KoppeOct 20, 2026
  7. Junio C HamanoOct 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.