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
JPJ.C. Pizarro <jcpiza@gmail.com>
Date
Dec 7, 2007, 14:42 UTC
Message-ID
<998d0e4a0712070642u6ae75232t9cb5bfd0920b2439@mail.gmail.com>
In-Reply-To
<200712071456.11019.jnareb@gmail.com>
On 2007/12/7, Jakub Narebski <jnareb@gmail.com> wrote:
Show 32 quoted lines
> Andreas Ericsson wrote:
> > Jakub Narebski wrote:
> > >
> > > Although there was some talk about whether giw should use autotools,
> > > or perhaps CMake, or handmade ./configure script like MPlayer IIRC,
> > > instead of its own handmade Makefile...
> > >
> >
> > To tell the truth, I'd be much happier if everything like that got
> > put in a header file or some such. 95% of what we figure out by looking
> > at "uname" output can already be learned by looking at the various
> > pre-defined macros.
> >
> > Fortunately, there's a project devoted solely to this, so most of
> > the tedious research need not be done. It can be found at
> > http://predef.sourceforge.net/
>
> Code talks, bullsh*t walks.
>
> Pre-defined macros cannot tell us if one have specific libraries
> installed, cannot tell us if formatted IO functions support 'size
> specifiers' even though compiler claim C99 compliance or even though
> compiler doesn't claim C99 compliance but supports this, etc.
>
> But perhaps the "uname" based compile configuration could be replaced
> by testing pre-defined macros... at least for C code, and git is not
> only C code.
>
> --
> Jakub Narebski
> Poland
>

A powerful tool can do better things that old generators-based tools (as autotools).

To imagine, there are many scripts in subdirectories or subprojects:
* 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
./bar.sh
* Later: (with the powerful tool that had cached many predefined variables in
                   a ramdisk's file or in a daemon's memory)
# 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
   *linux*) ... ;;
   *bsd*) ... ;;
   *aix*) ... ;;
   *) ...;;
esac
# i don't need to generate more scripts to inspect still more it.
   J.C.Pizarro
Previous: Jakub NarebskiNext: Marco Costalba
Message 6 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.