Stas Bekman wrote:
Philippe M. Chiasson wrote:
Stas just discovered that when building static, mod_perl's header files ended up
being installed in httpd's build tree. That had 2 bad effects. First, 3rd party
modules wouldn't find the headers. Second, thus polluted, the httpd source tree
wouldn't build anymore, confused by header files that shouldn't be there.
The following patch _fixes_ that problem, but the only way I could manage to do
it was by peeking at config_vars.mk. It did make me think about how we could make
use of config_vars.mk ourselves more directly and not rely on system(apxs) as much
in the future.
Anyways, here is the patch itself.
thanks philippe, please see comments below:
Index: Makefile.PL =================================================================== --- Makefile.PL (revision 111148) +++ Makefile.PL (working copy) @@ -66,6 +66,8 @@
my @exe_files = map "bin/$_", qw(mp2doc mp2bug);
+my $include_dir = $build->ap_exp_includedir() || $build->ap_includedir();
why do we need expose that on the top level and complicate things? why not have ap_includedir() call that internally?
That was my original intent, but the problem is that there are really 2 values
for includedir, one is where to get include files from for -I and the other one
is for where we need to install our header files. In the case of the dynamic build,
these 2 places are one and the same.
In the case of the static build, the headers we need to compile are in httpd's
source tree while the location we need to install our own headers in elsewhere.
My initial attempt was to change ap_includedir() but that quite rightly broke
everything. That's why they need to be kept separate.
OK, how about then writing a wrapper for install_headers_dir() which will do the right thing internally. Exposing this logic/complexity at the Makefile.PL level doesn't sound as a very good idea.
[...]
+ my $build_vars = File::Spec->catfile($self->{MP_AP_PREFIX}, + 'build', 'config_vars.mk');
+ open my $vars, "<$build_vars" || die "Couldn't open $build_vars $!";
must be 'or' and not '||', with || it's the same as:
open my $vars, "<$build_vars";
because of the higher precendence of ||.
I knew that ;-) Thanks for the spot!
I know that you do, but may be other readers don't :)
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
