You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Edward Peschko <ed...@excitehome.net> on 2001/02/16 07:26:14 UTC
patch to apxs removing dependency on $PATH
hey all,
Here is a patch for apxs - it basically removes the dependecy for you to have
'apxs' in your path. Instead, it picks up the path from the script itself,
$0.
This helps when you have two apxs's lying around - in my case, one apache had
dso support and the other didn't. And hence when I typed apxs, it picked up
the apxs without dso support and failed.
Ed
(ps - could someone ping me when they get this? I don't seem to be able to
subscribe to the mailing list for some reason. And let me know if this patch
made it? thanks.)
*** src/support/apxs Wed Feb 14 17:07:08 2001
--- apxs Thu Feb 15 22:03:39 2001
***************
*** 264,272 ****
--- 264,275 ----
exit(1);
}
+ my $dir = $0; $dir =~ s"(.*)/.*"$1/"g; $dir = '' if (!length($dir));
+
my $data = join('', <DATA>);
$data =~ s|%NAME%|$name|sg;
$data =~ s|%TARGET%|$CFG_TARGET|sg;
+ $data =~ s|%APACHE_BIN%|$dir|sg;
my ($mkf, $src) = ($data =~ m|^(.+)-=#=-\n(.+)|s);
***************
*** 533,540 ****
##
# the used tools
! APXS=apxs
! APACHECTL=apachectl
# additional user defines, includes and libraries
#DEF=-Dmy_define=my_value
--- 536,543 ----
##
# the used tools
! APXS=%APACHE_BIN%apxs
! APACHECTL=%APACHE_BIN%apachectl
# additional user defines, includes and libraries
#DEF=-Dmy_define=my_value