Skip to content

Commit

Permalink
Updated to support new platform-independent build (work in progress, …
Browse files Browse the repository at this point in the history
…broken on Unix now).
  • Loading branch information
jgdavidson committed Aug 17, 2005
1 parent fcf1212 commit 4272fbd
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 129 deletions.
76 changes: 18 additions & 58 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,68 +27,28 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/Makefile,v 1.57 2005/08/08 19:27:46 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/Makefile,v 1.58 2005/08/17 21:20:17 jgdavidson Exp $
#
#

NSBUILD=1
include include/Makefile.global

dirs = nsthread nsd nssock nsssl nscgi nscp nslog nsperm nsdb nsext nspd \
nstclsh

all:
@for i in $(dirs); do \
( cd $$i && $(MAKE) all) || exit 1; \
done

install: install-binaries install-doc install-util

install-binaries: all
for i in bin lib log include modules/tcl servers/server1/pages; do \
$(MKDIR) $(AOLSERVER)/$$i; \
done
for i in include/*.h include/ns*init.c \
include/Makefile.global include/Makefile.module; do \
$(INSTALL_DATA) $$i $(AOLSERVER)/include/; \
done
for i in tcl/*.tcl; do \
$(INSTALL_DATA) $$i $(AOLSERVER)/modules/tcl/; \
done
$(INSTALL_DATA) sample-config.tcl $(AOLSERVER)/
$(INSTALL_DATA) -n index.adp $(AOLSERVER)/servers/server1/pages/
$(INSTALL_SH) install-sh $(INSTBIN)/
for i in $(dirs); do \
(cd $$i && $(MAKE) install) || exit 1; \
done

install-tests:
$(CP) -r tests $(INSTSRVPAG)

install-tests-new:
$(INSTALL_DATA) tests/new/http-test-config.tcl $(AOLSERVER)/
$(MKDIR) $(INSTSRVPAG)/tests
for i in tests/new/harness.tcl tests/new/*.adp; do \
$(INSTALL_DATA) $$i $(INSTSRVPAG)/tests/; \
done

install-doc:
$(INSTALL_SH) doc/nsinstall-man.sh $(INSTBIN)/
cd doc && $(MAKE) install
dirs=nsthread nsd nsdb nstclsh nssock nslog nsperm nscgi nscp
SRCDIR=.
include include/ns.mak

install-util:
for i in util/*.sh util/*.tcl; do \
$(INSTALL_SH) $$i $(INSTBIN)/; \
done
all: build

test: all
cd tests/new && ./all.tcl
build clean:
$(MAKEALL) $* $(dirs)

clean:
@for i in $(dirs); do \
(cd $$i && $(MAKE) clean) || exit 1; \
done
install:
$(MAKEALL) $* $(dirs)
$(INST) -d $(AOLSERVER) sample-config.tcl
$(INST) -d $(AOLSERVER)/servers/server1/pages -n index.adp
$(INST) -d $(AOLSERVER)/modules/tcl tcl/*.tcl
$(INST) -d $(INSTBIN) util/*.tcl
$(INST) -d $(INSTBIN) -e util/nsinstall-man.sh
$(INST) -d $(INSTINC) include/ns.mak include/*.c include/*.h

distclean: clean
$(RM) config.status config.log config.cache include/Makefile.global include/Makefile.module

.PHONY: all install install-binaries install-doc install-tests clean distclean
$(RM) include/ns.mak include/ns.bak \
config.status config.log config.cache
9 changes: 4 additions & 5 deletions nscgi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nscgi/Makefile,v 1.5 2005/08/08 11:42:22 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nscgi/Makefile,v 1.6 2005/08/17 21:20:17 jgdavidson Exp $
#

LIB = nscgi
LIBOBJS = nscgi.o
MOD = nscgi.so
MOD = nscgi
OBJS = nscgi.o
MODINIT = NsCgi_ModInit
include ../include/Makefile.build
include ../include/ns.mak
9 changes: 4 additions & 5 deletions nscp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nscp/Makefile,v 1.5 2005/08/08 11:30:12 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nscp/Makefile,v 1.6 2005/08/17 21:20:18 jgdavidson Exp $
#

LIB = nscp
LIBOBJS = nscp.o
MOD = nscp.so
MOD = nscp
OBJS = nscp.o
MODINIT = NsCp_ModInit
include ../include/Makefile.build
include ../include/ns.mak
29 changes: 11 additions & 18 deletions nsd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,16 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/Makefile,v 1.47 2005/08/08 11:29:58 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/Makefile,v 1.48 2005/08/17 21:20:18 jgdavidson Exp $
#

INSTALL = install-init
LIB = nsd
LIBINIT = Ns_LibInit
HDRS = nsd.h
PGM = nsd
PGMOBJS = main.o
HDRS = nsd.h
SRCS := $(wildcard *.c ../nsthread/*.c)

LOBJS = adpcmds.o adpeval.o adpparse.o adprequest.o auth.o binder.o \
DLL = nsd
DLLINIT = Ns_LibInit
OBJS = adpcmds.o adpeval.o adpparse.o adprequest.o auth.o binder.o \
cache.o callbacks.o cls.o compress.o config.o conn.o connio.o \
crypt.o dns.o driver.o dsprintf.o dstring.o encoding.o exec.o \
fastpath.o fd.o filter.o form.o httptime.o index.o info.o \
Expand All @@ -49,18 +47,13 @@ LOBJS = adpcmds.o adpeval.o adpparse.o adprequest.o auth.o binder.o \
task.o tclcache.o tclcmds.o tclconf.o tclenv.o tclfile.o \
tclhttp.o tclimg.o tclinit.o tcljob.o tclmisc.o \
tclobj.o tclrequest.o tclresp.o tclsched.o tclset.o tclshare.o \
tclsock.o tclthread.o tclvar.o tclxkeylist.o unix.o url.o \
urlencode.o urlopen.o urlspace.o uuencode.o

LIBOBJS = $(LOBJS) stamp.o

include ../include/Makefile.build
tclsock.o tclthread.o tclvar.o tclxkeylist.o url.o \
urlencode.o urlopen.o urlspace.o uuencode.o stamp.o

stamp.o: $(LOBJS)
$(CC) -c -o stamp.o stamp.c
UNXOBJS = unix.o
WINOBJS = nswin32.o getopt.o

tags: $(SRCS)
ctags $(SRCS)
include ../include/ns.mak

install-init:
$(INSTALL_DATA) init.tcl $(INSTBIN)/
$(INST) -d $(INSTBIN) init.tcl
11 changes: 5 additions & 6 deletions nsdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nsdb/Makefile,v 1.4 2005/08/08 11:30:13 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nsdb/Makefile,v 1.5 2005/08/17 21:20:21 jgdavidson Exp $

LIB = nsdb
LIBOBJS = dbinit.o dbdrv.o dbtcl.o dbutil.o nsdb.o
MOD = nsdb.so
MODINIT = NsDb_ModInit
HDRS = db.h
include ../include/Makefile.build
MOD = nsdb
OBJS = dbinit.o dbdrv.o dbtcl.o dbutil.o nsdb.o
MODINIT = NsDb_ModInit
include ../include/ns.mak
9 changes: 4 additions & 5 deletions nslog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nslog/Makefile,v 1.5 2005/08/08 11:30:13 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nslog/Makefile,v 1.6 2005/08/17 21:20:21 jgdavidson Exp $
#

LIB = nslog
LIBOBJS = nslog.o
MOD = nslog.so
MOD = nslog
OBJS = nslog.o
MODINIT = NsLog_ModInit
include ../include/Makefile.build
include ../include/ns.mak
27 changes: 10 additions & 17 deletions nsperm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,19 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nsperm/Makefile,v 1.7 2005/08/08 11:30:14 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nsperm/Makefile,v 1.8 2005/08/17 21:20:21 jgdavidson Exp $
#

LIB = nsperm
LIBOBJS = nsperm.o
MOD = nsperm.so
MOD = nsperm
OBJS = nsperm.o
MODINIT = NsPerm_ModInit
MODINST = cpfiles
INSTALL = install-perm

include ../include/Makefile.build
include ../include/ns.mak

moddir = nsperm
moddat = $(INSTSRVMOD)/$(moddir)
modtcl = $(INSTTCL)/$(moddir)
modtcl = $(AOLSERVER)/modules/tcl/$(MOD)
moddat = $(AOLSERVER)/servers/server1/modules/$(MOD)

cpfiles:
$(MKDIR) $(modtcl)
$(INSTALL_DATA) init.tcl $(modtcl)/
$(INSTALL_DATA) compat.tcl $(modtcl)/
$(MKDIR) $(moddat)
for f in passwd group hosts.allow hosts.deny perms; do \
$(INSTALL_DATA) -n $$f $(moddat)/; \
done
install-perm:
$(INST) -d $(modtcl) init.tcl compat.tcl
$(INST) -d $(moddat) -n passwd group hosts.allow hosts.deny perms
9 changes: 4 additions & 5 deletions nssock/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nssock/Makefile,v 1.17 2005/08/08 11:30:15 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nssock/Makefile,v 1.18 2005/08/17 21:20:21 jgdavidson Exp $
#

LIB = nssock
LIBOBJS = nssock.o
MOD = nssock.so
MOD = nssock
OBJS = nssock.o
MODINIT = NsSock_ModInit
include ../include/Makefile.build
include ../include/ns.mak
4 changes: 2 additions & 2 deletions nstclsh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nstclsh/Makefile,v 1.1 2005/08/08 11:15:55 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nstclsh/Makefile,v 1.2 2005/08/17 21:20:22 jgdavidson Exp $
#

PGM = nstclsh
PGMOBJS = nstclsh.o
include ../include/Makefile.build
include ../include/ns.mak
17 changes: 9 additions & 8 deletions nsthread/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@
# version of this file under either the License or the GPL.
#
#
# $Header: /Users/dossy/Desktop/cvs/aolserver/nsthread/Makefile,v 1.7 2005/08/08 11:30:51 jgdavidson Exp $
# $Header: /Users/dossy/Desktop/cvs/aolserver/nsthread/Makefile,v 1.8 2005/08/17 21:20:22 jgdavidson Exp $
#

LIB = nsthread
HDRS = thread.h
PGM = nsthreadtest
PGMOBJS = nsthreadtest.o
LIBINIT = NsThreads_LibInit
LIBOBJS = \
error.o master.o memory.o mutex.o cslock.o \
rwlock.o reentrant.o sema.o thread.o tls.o signal.o \
compat.o time.o fork.o pthread.o
DLL = nsthread
DLLINIT = NsThreads_LibInit
OBJS = error.o master.o memory.o mutex.o cslock.o\
rwlock.o reentrant.o sema.o thread.o tls.o \
compat.o time.o
UNIXOBJS= pthread.o fork.o signal.o
WINOBJS = winthread.o

include ../include/Makefile.build
include ../include/ns.mak

0 comments on commit 4272fbd

Please sign in to comment.