Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 94277 invoked by uid 500); 19 May 2003 03:44:05 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 94266 invoked from network); 19 May 2003 03:44:04 -0000 Received: from erato.logilune.com (HELO mail.logilune.com) (195.154.174.52) by daedalus.apache.org with SMTP; 19 May 2003 03:44:04 -0000 Received: from stason.org (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id 431D07AAD8; Mon, 19 May 2003 05:44:12 +0200 (CEST) Message-ID: <3EC85305.3050307@stason.org> Date: Mon, 19 May 2003 13:44:05 +1000 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joe Schaefer Cc: apreq-dev@httpd.apache.org Subject: Re: [apreq-2] passing arguments to apxs via Apache::Test References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Joe Schaefer wrote: > I'd like to use Apache::Test* for testing the > apreq-2 filter independently of the perl glue, > and am planning to put such tests into env/t. > > The first problem I keep running into is that > I don't know how to get Apache::Test to pass > arguments (like -I, -L -l, etc) to apxs before > it compiles my c-modules in env/c-modules. > These arguments are really a necessity in order > to link the c-modules against the (uninstalled) > apreq-2 library, which is built in src/.libs. > > I doubt what follows is the recommended approach, but > the workaround I came up with was to do something like > > % perl Makefile.PL -apxs '"path/to/apxs -I../../src ..."' > which works if Apache/TestMM.pm and Apache/TestRun.pm > are patched as below. Does anyone have of a better way > to do this? Does using env vars help? % CCFLAGS="-I../../src ..." perl Makefile.PL -apxs path/to/apxs > Maybe I should just write a custom Makefile for > the env/c-modules directory? > > Anyways, here's the patch for httpd-test: that will break other code, since the usage is: while (my($key, $val) = each %Apache::TestConfig::Argv) { > - $body .= "\n\%Apache::TestConfig::Argv = qw(@Apache::TestMM::Argv);\n"; > + local $" = '","'; > + $body .= qq{\n\%Apache::TestConfig::Argv = ("@Apache::TestMM::Argv");\n}; This feature is only relevant for cmodules_write_makefile in Apache/TestConfigC.pm, isn't it? so an immediate workaround would be to override this function. Then we can think of how to make the original function accept these customizations, via arguments. Originally I thought that we could just add a new option: -apxs_args, but I don't think it's a good idea, since it may break other usages unrelated to the build of c-modules. So may be something like c_modules_apxs_args will be a better idea. Also, I remember that apxs doesn't work on winFU. If that's true how do these things are going to work these? __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com