Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9979 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 487 invoked by uid 1010); 20 May 2004 19:34:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 463 invoked from network); 20 May 2004 19:34:04 -0000 Received: from unknown (HELO mx.thebrainroom.net) (65.200.24.98) by pb1.pair.com with SMTP; 20 May 2004 19:34:04 -0000 Received: by mx.thebrainroom.net (Postfix, from userid 517) id C6C9E14880BE; Thu, 20 May 2004 12:34:03 -0700 (PDT) Received: from tron (obsidian.thebrainroom.net [82.133.1.142]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx.thebrainroom.net (Postfix) with ESMTP id A63CC148809B; Thu, 20 May 2004 12:34:00 -0700 (PDT) To: Cc: "'Sascha Schumann'" Date: Thu, 20 May 2004 20:34:01 +0100 Organization: The Brain Room Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Thread-Index: AcQ+oWa3nT41TyXJSeqeKq5IzSPN5Q== Message-ID: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on jc.thebrainroom.net X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Level: X-TBR-Filter: Virus scanned and defanged Subject: [PATCH] primitive load order deps for unix build system From: wez@thebrainroom.com ("Wez Furlong") I've cooked up a patch [1] that causes extension modules to be initialized in an order appropriate to their dependencies. (in other words, it only affects internal_functions.c during configure time). The heart of the patch is an awk script that spits out the module_ptr structures according to the dependencies it spots in config*.m4 files. You mark a dependency using a new (dummy) macro: PHP_ADD_EXTENSION_DEP(extension, extension-it-depends-upon) This mirrors the ADD_EXTENSION_DEP that we have in the win32 build; this patch is effectively a port of the same kind of code from the win32 build. Now, my awk is a little rusty (it's been more than 6 years since I used it for anything serious), so that part definitely has room for improvement. I'd like to get this into the tree for PHP 5.0, as it will help eliminate some hacks (like SPL and SimpleXML have at the moment). Please test it, particularly on non-Linux platforms (check my awk portability!) to make sure it doesn't mess things up. If someone feels like cleaning up my awk, feel free. If someone can do it all in 100% portable bourne shell (!) feel free also :) --Wez. [1] http://www.php.net/~wez/configure-deps.diff