From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Hudec Subject: Re: In future, to replace autotools by cmake like KDE4 did? Date: Mon, 10 Dec 2007 21:23:43 +0100 Message-ID: <20071210202343.GB3517@efreet.light.src> References: <998d0e4a0712061810k18e6388jde9d7bc5bd006b57@mail.gmail.com> <47594021.40200@op5.se> <200712071456.11019.jnareb@gmail.com> <998d0e4a0712070642u6ae75232t9cb5bfd0920b2439@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/NkBOFFp2J2Af1nK" Cc: Jakub Narebski , Andreas Ericsson , gcc@gcc.gnu.org, git@vger.kernel.org, David Miller , Daniel Berlin , Ismail Donmez , Marcel Holtmann To: "J.C. Pizarro" X-From: git-owner@vger.kernel.org Mon Dec 10 21:24:26 2007 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1J1pAq-0001q6-H0 for gcvg-git-2@gmane.org; Mon, 10 Dec 2007 21:24:20 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752548AbXLJUX6 (ORCPT ); Mon, 10 Dec 2007 15:23:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752005AbXLJUX6 (ORCPT ); Mon, 10 Dec 2007 15:23:58 -0500 Received: from ns1.bluetone.cz ([212.158.128.13]:43943 "EHLO ns1.bluetone.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbXLJUX5 (ORCPT ); Mon, 10 Dec 2007 15:23:57 -0500 Received: from localhost (spamhole.bluetone.cz [192.168.13.2]) by ns1.bluetone.cz (Postfix) with ESMTP id D11E6574B7; Mon, 10 Dec 2007 21:23:55 +0100 (CET) Received: from ns1.bluetone.cz ([192.168.13.1]) by localhost (spamhole.bluetone.cz [192.168.13.2]) (amavisd-new, port 10026) with ESMTP id 72bCb7EGVTuY; Mon, 10 Dec 2007 21:23:51 +0100 (CET) Received: from efreet.light.src (145-119-207-85.strcechy.adsl-llu.static.bluetone.cz [85.207.119.145]) by ns1.bluetone.cz (Postfix) with ESMTP id 74D35573E8; Mon, 10 Dec 2007 21:23:49 +0100 (CET) Received: from bulb by efreet.light.src with local (Exim 4.68) (envelope-from ) id 1J1pAF-0001ej-DB; Mon, 10 Dec 2007 21:23:43 +0100 Content-Disposition: inline In-Reply-To: <998d0e4a0712070642u6ae75232t9cb5bfd0920b2439@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: --/NkBOFFp2J2Af1nK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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). >=20 > To imagine, there are many scripts in subdirectories or subprojects: No, there are not. There is just one. Multiple configuration scripts rarely make sense. > * Before: (many copy and paste of code as below paragraph) > A_VARIABLE_OS =3D `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 >=20 > * Later: (with the powerful tool that had cached many predefined variable= s in > a ramdisk's file or in a daemon's memory) A daemon not runnin' here. No ramdisk here either. Freshly downloaded tarba= ll 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 ocurre= nces 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= | .... > *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. --=20 Jan 'Bulb' Hudec --/NkBOFFp2J2Af1nK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHXaBPRel1vVwhjGURApl9AKDc7Dh4tkv8jXoU98HjY+r9hvYvIQCeK0iF EZbKPFCE2DwF1OZNuOhE+Mw= =TaPn -----END PGP SIGNATURE----- --/NkBOFFp2J2Af1nK--