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

Re: In future, to replace autotools by cmake like KDE4 did?

From
JHJan Hudec <bulb@ucw.cz>
Date
Dec 10, 2007, 20:23 UTC
Message-ID
<20071210202343.GB3517@efreet.light.src>
In-Reply-To
<998d0e4a0712070642u6ae75232t9cb5bfd0920b2439@mail.gmail.com>
On Fri, Dec 07, 2007 at 15:42:31 +0100, J.C. Pizarro wrote:
> A powerful tool can do better things that old generators-based tools
> (as autotools).
> 
> To imagine, there are many scripts in subdirectories or subprojects:

No, there are not. There is just one. Multiple configuration scripts rarely make sense.

Show 9 quoted lines
> * Before: (many copy and paste of code as below paragraph)
> A_VARIABLE_OS = `uname -a | grep .... `  # <- slow
> case "$A_VARIABLE_OS" in
>    *linux*) ... ;;
>    *bsd*) ... ;;
>    *aix*) ... ;;
>    *) ...;;
> esac
> m4 foo.sh.m4 > bar.sh # <- very slow
Done once at release time.
> ./bar.sh
> 
> * Later: (with the powerful tool that had cached many predefined variables in
>                    a ramdisk's file or in a daemon's memory)

A daemon not runnin' here. No ramdisk here either. Freshly downloaded tarball to an ancient Un*x with some quirky barely POSIX-compliant shell.

> # call once at 1st time to internal uname of powerful tool for all ocurrences of
> # below predefined variable from many scripts:
> case "$FOO_VARIABLE_OS" in
Someone had to create that variable. And there is just one way to: uname -a | ....
Show 5 quoted lines
>    *linux*) ... ;;
>    *bsd*) ... ;;
>    *aix*) ... ;;
>    *) ...;;
> esac

And how exactly does this differ from the code you had above? For task that runs once per installation (and for most users never, because their distribution's build server runs it for them), it's simplicity of code that matters.

> # i don't need to generate more scripts to inspect still more it.

And how exactly did you find, from the uname, whether I have libcrypto installed? And whether I have it in /usr/lib, /opt/openssl/lib or /usr/@foobar.com/sw/system/lib? How did you find libcurl, tcl, zlib...?

Besides, I inspected the configure.ac script that comes with git and it does not actually contain any code like you show above. Git's configure script is NOT looking at the platform name AT ALL. The makefile does, but that obviously does not need anything generated by M4.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Marco Costalba
Message 8 of 8 in “In future, to replace autotools by cmake like KDE4 did?”
  1. J.C. PizarroDec 7, 2007
  2. Marcel HoltmannDec 7, 2007
  3. Jakub NarebskiDec 7, 2007
  4. Andreas EricssonDec 7, 2007
  5. Jakub NarebskiDec 7, 2007
  6. J.C. PizarroDec 7, 2007
  7. Marco CostalbaDec 7, 2007
  8. Jan HudecDec 10, 2007

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.