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

Re: [PATCH] auto-detect changed $prefix in Makefile and properly rebuild to avoid broken install

From
YLYakov Lerner <iler.ml@gmail.com>
Date
Jun 14, 2006, 20:30 UTC
Message-ID
<f36b08ee0606141330l28330d79hab1aec5c741188c7@mail.gmail.com>
In-Reply-To
<7vver3cxlw.fsf@assigned-by-dhcp.cox.net>
On 6/14/06, Junio C Hamano <junkio@cox.net> wrote:
Show 14 quoted lines
> Yakov Lerner <iler.ml@gmail.com> writes:
>
> > Many times, I mistakenly used 'make prefix=... install' where prefix value
> > was different from prefix value during build. This resulted in broken
> > install. This patch adds auto-detection of $prefix change to the Makefile.
> > This results in correct install whenever prefix is changed.
> >
> > Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
>
> I do not mind this per se, and probably even agree that this is
> an improvement compared to the current state of affairs, but a few
> points:
>
>  - please make sure you clean that state file in "make clean";
done
>  - we may want to make the state file a bit more visible (IOW, I
>    somewhat do mind the name being dot-git-dot-prefix).
I renamed .git.prefix to GIT-PREFIX. Is this ok.
Show 7 quoted lines
>  - we might want to later (or at the same time as this patch)
>    do "consistent set of compilation flags" (e.g. run early
>    part of compilation with openssl SHA-1 implementation,
>    interrupt it and build and link the rest with mozilla SHA-1
>    implementation -- then you will get a nonsense binary without
>    linker errors).  It might make sense to prepare this
>    mechanism so we could reuse it for that purpose.

Do you think two separate GIT-PREFIX and GIT-BUILD-FLAGS are needed, or just once GIT-BUILD-FLAGS will do, which will include prefixes (as passed with -D... to cc) ?

I think single GIT-BUILD-FLAGS is enough, which will cover prefixes, too. Is this OK ?

BTW, I think it's useful to add Makefile itself as prerequisite for all *.o, so change in Makefile will cause recompilations. Shall I include this into this patch, too ?

Yakov
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 17 in “auto-detect changed $prefix in Makefile and properly rebuild to avoid broken install”
  1. auto-detect changed $prefix in Makefile and properly rebuild to avoid broken installYakov Lerner, Jun 14, 2006
  2. Junio C HamanoJun 14, 2006
  3. Yakov LernerJun 14, 2006
  4. Junio C HamanoJun 14, 2006
  5. Yakov LernerJun 14, 2006
  6. Matthias LederhoferJun 15, 2006
  7. Yakov LernerJun 15, 2006
  8. Petr BaudisJun 18, 2006
  9. SantiJun 15, 2006
  10. Yakov LernerJun 15, 2006
  11. SantiJun 15, 2006
  12. Alexander LitvinovJun 15, 2006
  13. Junio C HamanoJun 17, 2006
  14. Junio C HamanoJun 17, 2006
  15. Karl HasselströmJun 18, 2006
  16. Junio C HamanoJun 18, 2006
  17. Karl HasselströmJun 18, 2006

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.