You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Ralf S. Engelschall" <rs...@engelschall.com> on 1999/08/01 11:27:27 UTC
Re: Apache 2000, err Apache 2.0 gets real
In article <99...@paris.ics.uci.edu> you wrote:
> [...]
> After that, set up autoconf as the one and only configuration tool.
> I happen to like automake as well, but I'd at least like to figure out
> why Ralf isn't using it first. Same with libtool.
> [...]
Autoconf, libtool and shtool are fine and I use them all the time. The reasons
why I avoid Automake are partly technical reasons and partly aesthetical
reasons. Technically Automake conflicted often with my opinion on how _clean_
and non-redundant Makefiles should look and behave. The aesthetical reasons
are mainly related to the fact that Automake-generated Makefiles I often have
to consider "bloatware". There are 1001 generated targets one never needs and
which just cause confusion and problems.
It's correct that Automake is a benefit to deal with _very large_ source
trees. And there it's great. There it's clear - already from the software
engineering point of view - that one has to use a tool in order to avoid
reinvention of the wheel in every subdir. But there are easier and smaller
tools available which do the job better then Automake, IMHO. At least they
generate cleaner Makefiles which look like hand-made and can be still be
understood and better customized. For instance I often used my own very-old
SMake (Skeleton Make) tool or some similar approaches.
So, for me autoconf, libtool and shtool are essential tools which are really
acceptable to use (for Autoconf one just has to like M4 and Shell programming
a little bit to use it; libtool and shtool one can treat as a black-box where
one has not to understand anything in order to use them). But Automake is
something for very large source trees like those of KDE, X11, etc. where the
focus is more on better and easier maintainability than on cleaness and
possible understanding. And for projects like Apache where only 10 to 20
subdirs exists, I prefer clean Makefiles reduced to the minimum and customized
contents than bloated ones. Sure, one can also customize Automake, but then it
gets very ugly again.
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Re: Apache 2000, err Apache 2.0 gets real
Posted by Ben Laurie <be...@algroup.co.uk>.
"Ralf S. Engelschall" wrote:
>
> In article <99...@paris.ics.uci.edu> you wrote:
>
> > [...]
> > After that, set up autoconf as the one and only configuration tool.
> > I happen to like automake as well, but I'd at least like to figure out
> > why Ralf isn't using it first. Same with libtool.
> > [...]
>
> Autoconf, libtool and shtool are fine and I use them all the time. The reasons
> why I avoid Automake are partly technical reasons and partly aesthetical
> reasons. Technically Automake conflicted often with my opinion on how _clean_
> and non-redundant Makefiles should look and behave. The aesthetical reasons
> are mainly related to the fact that Automake-generated Makefiles I often have
> to consider "bloatware". There are 1001 generated targets one never needs and
> which just cause confusion and problems.
This seems to apply to autoconf, too, so why single out automake for
criticism?
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
Re: Apache 2000, err Apache 2.0 gets real
Posted by Rasmus Lerdorf <ra...@raleigh.ibm.com>.
> It's correct that Automake is a benefit to deal with _very large_ source
> trees. And there it's great. There it's clear - already from the software
> engineering point of view - that one has to use a tool in order to avoid
> reinvention of the wheel in every subdir. But there are easier and smaller
> tools available which do the job better then Automake, IMHO. At least they
> generate cleaner Makefiles which look like hand-made and can be still be
> understood and better customized. For instance I often used my own very-old
> SMake (Skeleton Make) tool or some similar approaches.
I guess it depends what you consider a very large source tree. We
switched to automake for PHP4 to make it easy for people to add and
maintain new modules without needing to know anything about the build
process. The Makefile.am file in each module directory is only 3 lines
long. For example, for the snmp module it is:
INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
noinst_LIBRARIES=libphpext_snmp.a
libphpext_snmp_a_SOURCES=snmp.c
And then the only other thing a module author needs to do is provide an m4
autoconf script that covers that particular module. For the snmp module
it looks like this:
AC_MSG_CHECKING(for SNMP support)
AC_ARG_WITH(snmp,
[ --with-snmp[=DIR] Include SNMP support. DIR is the SNMP base
install directory. It defaults to searching through
a number of common locations for the snmp install.],
[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
SNMP_INCDIR=/usr/local/include
SNMP_LIBDIR=/usr/local/lib
test -d /usr/local/include/ucd-snmp && SNMP_INCDIR=/usr/local/include/ucd-snmp
test -d /usr/include/ucd-snmp && SNMP_INCDIR=/usr/include/ucd-snmp
test -d /usr/include/snmp && SNMP_INCDIR=/usr/include/snmp
test -f /usr/lib/libsnmp.a && SNMP_LIBDIR=/usr/lib
else
SNMP_INCDIR=$withval/include
test -d $withval/include/ucd-snmp && SNMP_INCDIR=$withval/include/ucd-snmp
SNMP_LIBDIR=$withval/lib
fi
AC_DEFINE(HAVE_SNMP)
AC_MSG_RESULT(yes)
PHP_EXTENSION(snmp)
AC_ADD_LIBRARY_WITH_PATH(snmp, $SNMP_LIBDIR)
AC_ADD_INCLUDE($SNMP_INCDIR)
AC_CHECK_LIB(kstat, kstat_read, [AC_ADD_LIBRARY(kstat)])
else
AC_MSG_RESULT(no)
fi
],[
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(whether to enable UCD SNMP hack)
AC_ARG_ENABLE(ucd-snmp-hack,
[ --enable-ucd-snmp-hack Enable UCD SNMP hack],[
if test "$enableval" = "yes" ; then
AC_DEFINE(UCD_SNMP_HACK, 1)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
],[
AC_MSG_RESULT(no)
])
This means that all configure-related requirements for that particular
module is isolated to that module's own directory. This is a major
benefit, at least in the PHP project, and I bet with the multiple mpms and
as more modules get added to the Apache base distribution it would be a
major win for Apache as well.
-Rasmus