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

Re: [PATCH 2] autoconf: Use ./configure script in git *.spec file

From
Junio C Hamano <junkio@cox.net>
Date
Jul 3, 2006, 02:09 UTC
Message-ID
<7vslljwiat.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<e89ock$gks$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
Show 7 quoted lines
> Junio C Hamano wrote:
>
>> I thought this stuff was "opt-in", but make rpm now requires
>> autoconf?
>
> Ooops. No, git RPM wouldn't need autoconf, neither building git from *.spec
> file or SRPM.
I had an impression that your spec.in change made it required.

It is still somewhat dubious to me if we can keep this "opt-in". I noticed that it at least lacks a few extra commands to "clean" target of the main Makefile, and adding them by itself is not so bad, but who knows what else it would bring in when the series finishes. I would not be surprised if we start touching *.c and *.h files with new autoconf-compatible "#ifdef HAVE_XXX" and at that point I will say "I told you so".

I am not opposed to giving an alternative, semi-automated way to edit config.mak to the users, and if that is our goal, we should ship the configure script in the source tarball at least, and probably we should have the configure script in the revisions as well. Using autoconf is not the goal here -- giving ./configure as an alternative way to manage config.mak is.

But if we have autoconf scripts _and_ configure script in revisions, we are talking about version controlling generated stuff, and I'd like to avoid that at all cost.

Maybe an alternative is to just add configure script in the source tree _without_ adding any of the autoconf scripts to the git repository. The users can choose to use that script to manage config.mak but do not have to. And I do not mind getting occasional updates to the configure script in the source tree, and I do not care if you build it by hand or use autoconf to generate it, as long as the configure script is readable, debuggable and maintainable.

The source to generate that configure script might be autoconf scripts and you would want to version control that. That is fine but I think that would be a separate project of yours, and you may call that the git-build-config project. And I do not mind hosting that somewhere under contrib/ area in the git repository in order to give it wider exposure.

That would end up in the same situation as having the source and generated files under the version control, but I think at the philosophical level the two are vastly different, in that the things under contrib/ are not part of git.git but are there only for convenience. I will not be the one who is responsible to run autoconf in there every time we make changes to the system and propagate the changes to the main configure script. The configure script generated by the end user in contrib/autoconf may not match the toplevel configure script (the end user may have different version of autoconf, for example) but that is not a bug, as long as the toplevel configure script, which might be output by an older version of autoconf, works correctly.

The above assumes that the configure script generated by your autoconf script is readable and maintainable at all. Otherwise it would not make any sense to have configure under version control.

Previous: Jakub NarebskiNext: Junio C Hamano
Message 5 of 34 in “autoconf: Use autoconf to write installation directories to config.mak.autogen”
  1. autoconf: Use autoconf to write installation directories to config.mak.autogenJakub Narebski, Jul 2, 2006
  2. autoconf: Use ./configure script in git *.spec fileJakub Narebski, Jul 3, 2006
  3. Junio C HamanoJul 3, 2006
  4. Jakub NarebskiJul 3, 2006
  5. Junio C HamanoJul 3, 2006
  6. contrib/ statusJunio C Hamano, Jul 3, 2006
  7. Eric WongJul 3, 2006
  8. Junio C HamanoJul 3, 2006
  9. Eric WongJul 4, 2006
  10. git-svn: migrate out of contribEric Wong, Jul 6, 2006
  11. Junio C HamanoJul 7, 2006
  12. git-svn: migrate out of contribEric Wong, Jul 7, 2006
  13. Jakub NarebskiJul 4, 2006
  14. Johannes SchindelinJul 4, 2006
  15. Jakub NarebskiJul 3, 2006
  16. Junio C HamanoJul 3, 2006
  17. Jakub NarebskiJul 3, 2006
  18. Junio C HamanoJul 3, 2006
  19. autoconf: Use %configure in git.spec, autoconf dependency only in rpm targetJakub Narebski, Jul 4, 2006
  20. Pavel RoskinJul 6, 2006
  21. Jakub NarebskiJul 7, 2006
  22. Teach make clean about configure and autoconfJakub Narebski, Jul 8, 2006
  23. Copy description of build configuration variables to configure.acJakub Narebski, Jul 8, 2006
  24. autoconf: Preparing the way for autodetectionJakub Narebski, Jul 8, 2006
  25. autoconf: Checks for typedefs, structures, and compiler characteristics.Jakub Narebski, Jul 8, 2006
  26. autoconf: Checks for some library functions.Jakub Narebski, Jul 8, 2006
  27. autoconf: Checks for librariesJakub Narebski, Jul 8, 2006
  28. autoconf: Checks for some programsJakub Narebski, Jul 8, 2006
  29. configure.ac vertical whitespace usage cleanupJakub Narebski, Jul 8, 2006
  30. Comment on this series of patches (PATCH 2-9)Jakub Narebski, Jul 8, 2006
  31. Junio C HamanoJul 8, 2006
  32. Junio C HamanoJul 9, 2006
  33. Jakub NarebskiJul 9, 2006
  34. Junio C HamanoJul 9, 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.