httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: New Makefile
Date Tue, 18 Apr 1995 12:11:44 GMT
   Date: Tue, 18 Apr 1995 09:45:46 -0500
   From: Randy Terbush <randy@dsndata.com>

   I just upped O58_makefile to patches/for_Apache_0.6.1.
   It is a drop in replacement for the current Makefile.
   I have tested this on SunOS, NetBSD, and BSDI.
   Please forward change comments so that we could quickly
   buff this out.

Hmmm... this one looks better.  My major gripe with it is that
settings for CC, CFLAGS, LFLAGS and EXTRA_LIBS are buried in the
target-specific make rules; there really ought to be a way for users
to configure those easily, in case they want to, say, use acc or lcc,
compile with -g (I sure do), or *not* link with -lresolv on Sun4.
(Some sites don't run DNS, so -lresolv won't work, and it's not the
default with either 1.3 or 1.4).

Ideally, they'd be able to do this on either a global, or per-target
basis, but I'd settle for the latter for now.  A bank of vars at the
top along the lines of 

################################################################
#
# Per-system Configuration -- you should at least glance at the values
# for your OS, to be sure that our defaults fit your configuration.
# We've listed some common alternatives...

# SunOS
# 
# Select the commented-out lines to link statically (LFLAGS) or to use
# DNS and bypass NIS/NIS+ (EXTRA_LIBS).  Both of these may improve
# performance somewhat, where applicable; however, some SunOS sites
# just don't run DNS.  In any case, if you compiled with
# -DMINIMAL_DNS, it doesn't matter.

SUNOS_CC = gcc
SUNOS_CFLAGS = -O2
SUNOS_EXTRA_LIBS = 
# SUNOS_EXTRA_LIBS = -lresolv
SUNOS_LFLAGS =
# SUNOS_LFLAGS = -static

etc.  Note that the defaults I've chosen here are backwards-compatible
with NCSA; I suspect that sticking to compatibility is probably our
best choice for the first release.  The corresponding make target then
becomes:

sunos:  Makefile $(HDRS)
        @-mkdir sunos
        make httpd ARCH=sunos AUX_CFLAGS=-DSUNOS4 CC=$(SUNOS_CC) \
        EXTRA_LIBS=$(SUNOS_EXTRA_LIBS) CFLAGS=$(SUNOS_CFLAGS) \
        LFLAGS=$(SUNOS_LFLAGS)

Also, regarding server options, I'd rather have XBITHACK configured
off by default --- turning it on can cause trouble at sites which
haven't been using it.  Again, this is a potential compatibility
issue. 

Finally, cleaning up the $(ARCHOBJS) business would be nice.
This syntax works in both SunOS and GNU make (to build ARCHOBJS from
the OBJS list):

  ARCHOBJS = $(OBJS:%=$(ARCH)/%)

Are there any reasonable systems on which it will fail?

   * There currently is no place to configure HUGE_STRING_LEN.
     Adding this requires a simple change to httpd.h.  I am
     interested in knowing how many people would like to see
     this configuration option in the Makefile.

Adding a -DFOO option, along the lines of -DINSECURE_SMALL_STRINGS,
might handle this case adequately...

rst




Mime
View raw message