Commit ccf102e5 authored by Pierre DAVID's avatar Pierre DAVID

Simplify various Makefiles

parent ae819c48
# for packaging and libnetmagis.tcl
VERSION = 3.0.0alpha
DESTDIR = DESTDIR =
PREFIX = /local/netmagis PREFIX = /local/netmagis
...@@ -28,7 +31,8 @@ SUBST = $(TCLSH) \ ...@@ -28,7 +31,8 @@ SUBST = $(TCLSH) \
$(ETCDIR)/netmagis.conf \ $(ETCDIR)/netmagis.conf \
$(BINDIR)/netmagis-config $(BINDIR)/netmagis-config
DIRS = \ VARS = \
VERSION=$(VERSION) \
BINDIR=$(BINDIR) \ BINDIR=$(BINDIR) \
SBINDIR=$(SBINDIR) \ SBINDIR=$(SBINDIR) \
ETCDIR=$(ETCDIR) \ ETCDIR=$(ETCDIR) \
...@@ -48,9 +52,6 @@ TCLCONF = /usr/local/lib/tcl8.6/tclConfig.sh ...@@ -48,9 +52,6 @@ TCLCONF = /usr/local/lib/tcl8.6/tclConfig.sh
TCLCFLAGS = `(cat $(TCLCONF) ; echo 'echo "$$TCL_INCLUDE_SPEC"')|sh` TCLCFLAGS = `(cat $(TCLCONF) ; echo 'echo "$$TCL_INCLUDE_SPEC"')|sh`
TCLLFLAGS = `(cat $(TCLCONF) ; echo 'echo "$$TCL_LIB_SPEC $$TCL_LIBS"')|sh` TCLLFLAGS = `(cat $(TCLCONF) ; echo 'echo "$$TCL_LIB_SPEC $$TCL_LIBS"')|sh`
# for packaging and libnetmagis.tcl
VERSION = 2.3.1
# build debian package for the following architectures # build debian package for the following architectures
DEBIAN_PKG_ARCH = i386 DEBIAN_PKG_ARCH = i386
# default debian distribution # default debian distribution
...@@ -85,51 +86,51 @@ build: build-www build-topo ...@@ -85,51 +86,51 @@ build: build-www build-topo
# NEARLY OBSOLETE # NEARLY OBSOLETE
build-www: build-www:
cd www ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) \ cd www ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) \
TCLCFLAGS="$(TCLCFLAGS)" TCLLFLAGS="$(TCLLFLAGS)" build TCLCFLAGS="$(TCLCFLAGS)" TCLLFLAGS="$(TCLLFLAGS)" build
build-server: build-server:
cd server ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) build cd server ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) build
build-topo: build-topo:
cd topo ; make build cd topo ; $(MAKE) build
install: install-common install-server install-servers install-utils \ install: install-common install-server install-servers install-utils \
install-detecteq install-topo install-metro install-www install-detecteq install-topo install-metro install-www
install-common: install-common:
cd common ; \ cd common ; \
make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) VERSION=$(VERSION) install $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) VERSION=$(VERSION) install
install-server: install-server:
cd server ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) VERSION=$(VERSION) install cd server ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) VERSION=$(VERSION) install
install-servers: install-servers:
cd servers ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install cd servers ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install
# NEARLY OBSOLETE # NEARLY OBSOLETE
install-www: build-www install-www: build-www
cd www ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) \ cd www ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) \
TCLCFLAGS="$(TCLCFLAGS)" TCLLFLAGS="$(TCLLFLAGS)" install TCLCFLAGS="$(TCLCFLAGS)" TCLLFLAGS="$(TCLLFLAGS)" install
install-utils: install-utils:
cd utils ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install cd utils ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install
install-topo: build-topo install-topo: build-topo
cd topo ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install cd topo ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install
install-detecteq: install-detecteq:
cd detecteq ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install cd detecteq ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install
install-metro: install-metro:
cd metro ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install cd metro ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install
# PROBLEM # PROBLEM
install-netmagis.org: build-www install-netmagis.org: build-www
cd doc/netmagis.org ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install cd doc/netmagis.org ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install
install-devtools: install-devtools:
cd devtools ; make $(DIRS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install cd devtools ; $(MAKE) $(VARS) SUBST="$(SUBST)" TCLSH=$(TCLSH) install
distrib: clean distrib: clean
rm -rf /tmp/netmagis-$(VERSION) rm -rf /tmp/netmagis-$(VERSION)
...@@ -150,8 +151,8 @@ freebsd-ports: ...@@ -150,8 +151,8 @@ freebsd-ports:
echo "once netmagis-$(VERSION).tar.gz is on the master site" ; \ echo "once netmagis-$(VERSION).tar.gz is on the master site" ; \
exit 1 ; \ exit 1 ; \
fi fi
for i in pkg/freebsd/netmagis-* ; do (cd $$i ; make clean) ; done for i in pkg/freebsd/netmagis-* ; do (cd $$i ; $(MAKE) clean) ; done
cd pkg/freebsd/netmagis-common ; make makesum cd pkg/freebsd/netmagis-common ; $(MAKE) makesum
tar -czf netmagis-freebsd-ports-$(VERSION).tar.gz -C pkg/freebsd . tar -czf netmagis-freebsd-ports-$(VERSION).tar.gz -C pkg/freebsd .
debian-packages: debian-packages:
...@@ -160,26 +161,26 @@ debian-packages: ...@@ -160,26 +161,26 @@ debian-packages:
echo "once netmagis-$(VERSION).tar.gz is on the master site" ; \ echo "once netmagis-$(VERSION).tar.gz is on the master site" ; \
exit 1 ; \ exit 1 ; \
fi fi
cd pkg/debian ; make VERSION=$(VERSION) release cd pkg/debian ; $(MAKE) VERSION=$(VERSION) release
debian-packages-other-arch: debian-packages-other-arch:
cd pkg/debian ; \ cd pkg/debian ; \
for arch in $(DEBIAN_PKG_ARCH) ; do \ for arch in $(DEBIAN_PKG_ARCH) ; do \
make VERSION=$(VERSION) ARCH=$$arch release-arch ; \ $(MAKE) VERSION=$(VERSION) ARCH=$$arch release-arch ; \
done done
debian-repo: debian-repo:
pkg/debian/update-repo $(VERSION) pkg/debian $(DEBIAN_DISTRIB) $(REPODIR) pkg/debian/update-repo $(VERSION) pkg/debian $(DEBIAN_DISTRIB) $(REPODIR)
clean: clean:
cd common ; make clean cd common ; $(MAKE) clean
cd server ; make clean cd server ; $(MAKE) clean
cd servers ; make clean cd servers ; $(MAKE) clean
cd www ; make clean cd www ; $(MAKE) clean
cd utils ; make clean cd utils ; $(MAKE) clean
cd detecteq ; make clean cd detecteq ; $(MAKE) clean
cd topo ; make clean cd topo ; $(MAKE) clean
cd metro ; make clean cd metro ; $(MAKE) clean
rm -f netmagis-*.tar.gz rm -f netmagis-*.tar.gz
nothing: nothing:
...@@ -18,7 +18,7 @@ install: ...@@ -18,7 +18,7 @@ install:
$(NINSTALL) -m 0644 -e "s/%NMVERSION%/$(VERSION)/" \ $(NINSTALL) -m 0644 -e "s/%NMVERSION%/$(VERSION)/" \
$(SUBST) libnetmagis.tcl $(DESTDIR)$(NMLIBDIR) $(SUBST) libnetmagis.tcl $(DESTDIR)$(NMLIBDIR)
mkdir -p $(DESTDIR)$(NMLIBDIR)/pkgtcl mkdir -p $(DESTDIR)$(NMLIBDIR)/pkgtcl
cd pkgtcl && make $(DIRS) TCLSH=$(TCLSH) clean install cd pkgtcl && $(MAKE) TCLSH=$(TCLSH) clean install
mkdir -p $(DESTDIR)$(NMLIBDIR)/msgs mkdir -p $(DESTDIR)$(NMLIBDIR)/msgs
tar cf - msgs | tar xvf - -C $(DESTDIR)$(NMLIBDIR) tar cf - msgs | tar xvf - -C $(DESTDIR)$(NMLIBDIR)
......
...@@ -5,7 +5,7 @@ build: ...@@ -5,7 +5,7 @@ build:
install: build install: build
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
cd syslog ; make $(DIRS) install cd syslog ; $(MAKE) install
cd radius ; make $(DIRS) install cd radius ; $(MAKE) install
clean: clean:
...@@ -5,6 +5,6 @@ build: ...@@ -5,6 +5,6 @@ build:
install: install:
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
cd tests ; make $(DIRS) install cd tests ; $(MAKE) install
clean: clean:
...@@ -9,9 +9,9 @@ build: ...@@ -9,9 +9,9 @@ build:
install: install:
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
cd bin ; make $(DIRS) install cd bin ; $(MAKE) install
cd lib ; make $(DIRS) install cd lib ; $(MAKE) install
cd ws ; make $(DIRS) install cd ws ; $(MAKE) install
mkdir -p $(DESTDIR)$(NMXMPDIR) mkdir -p $(DESTDIR)$(NMXMPDIR)
$(NINSTALL) -m 0644 \ $(NINSTALL) -m 0644 \
-e "s|%BINDIR%|$(BINDIR)|" \ -e "s|%BINDIR%|$(BINDIR)|" \
......
...@@ -2,16 +2,16 @@ NINSTALL = ../ninstall ...@@ -2,16 +2,16 @@ NINSTALL = ../ninstall
build: build:
@echo ">>> Making build in `pwd`" @echo ">>> Making build in `pwd`"
cd lib ; make build cd lib ; $(MAKE) build
install: install:
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
cd etc ; make $(DIRS) install cd etc ; $(MAKE) install
cd bin ; make $(DIRS) install cd bin ; $(MAKE) install
cd lib ; make $(DIRS) SUBST="$(SUBST)" VERSION=$(VERSION) install cd lib ; $(MAKE) install
cd www ; make NMLIBDIR=$(NMLIBDIR) install cd www ; $(MAKE) install
cd examples ; make $(DIRS) install cd examples ; $(MAKE) install
mkdir -p $(DESTDIR)$(NMVARDIR)/dbdump mkdir -p $(DESTDIR)$(NMVARDIR)/dbdump
clean: clean:
cd lib ; make clean cd lib ; $(MAKE) clean
...@@ -14,5 +14,6 @@ install: ...@@ -14,5 +14,6 @@ install:
mkdir -p $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(BINDIR)
$(NINSTALL) -m 0755 \ $(NINSTALL) -m 0755 \
-e "s|%NMLIBDIR%|$(NMLIBDIR)|" \ -e "s|%NMLIBDIR%|$(NMLIBDIR)|" \
-e "s|%VERSION%|$(VERSION)|" \
-e "s|%BINDIR%|$(BINDIR)|" $(SUBST) \ -e "s|%BINDIR%|$(BINDIR)|" $(SUBST) \
$(SCRIPTS) $(DESTDIR)$(BINDIR) $(SCRIPTS) $(DESTDIR)$(BINDIR)
#!/usr/bin/tclsh8.6 #!%TCLSH%
set pkgdir %NMLIBDIR%/pkgtcl set conf(conffile) %CONFFILE%
set pkgdir ../lib/pkgtcl set conf(addr) 0.0.0.0
set conf(port) 8080
set conf(libdir) %NMLIBDIR%
set conf(files) %NMLIBDIR%/www
set conf(minw) 2
set conf(maxw) 4
set conf(idle) 30
set conf(version) %VERSION%
lappend auto_path $pkgdir set conf(usage) {usage: %s [-h][-d][-c conf][-a addr][-p port][-l libdir][-f files][-m min][-x max][-i idle][-v vers]
package require scgi -h: this help message
-d: debug
-c conf: path to the configuration file
-a addr: listening address (e.g. 0.0.0.0)
-p port: listening port (e.g. 8080)
-l libdir: path to the libdir (with subdirectories worker/ and pkgtcl/)
-f files: path to the directory containing static files
-m min: minimum number of workers threads (e.g. 2)
-x max: maximum number of workers threads (e.g. 4)
-i idletime: maximum time in sec before a worker thread exists (e.g. 30)
-v vers: application version for schema checking (e.g. 3.0.0alpha)
}
set conffile ./netmagis.conf proc usage {} {
global conf
set wrkrdir %NMLIBDIR%/worker puts stderr [format $conf(usage) $argv0]
set wrkrdir ../lib/worker exit 1
}
::scgi::start \ proc main {argv0 argv} {
-debug true \ global conf
-minworkers 1 \
"set conffile $conffile #
set wrkdir $wrkrdir # Argument checking
lappend auto_path $pkgdir #
source $wrkrdir/worker.tcl" \
set debug false
set conffile $conf(conffile)
set addr $conf(addr)
set port $conf(port)
set libdir $conf(libdir)
set files $conf(files)
set minw $conf(minw)
set maxw $conf(maxw)
set idle $conf(idle)
set version $conf(version)
while {[llength $argv] > 0} {
set a [lindex $argv 0]
switch -glob -- $a {
-h {
usage
}
-d {
set debug true
set argv [lreplace $argv 0 0]
}
-c {
set conffile [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-a {
set addr [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-p {
set port [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-l {
set libdir [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-f {
set files [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-m {
set minw [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-x {
set maxw [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-i {
set idle [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-v {
set version [lindex $argv 1]
set argv [lreplace $argv 0 1]
}
-* {
puts stderr "Unknown option '$a'"
usage
}
default {
break
}
}
}
if {[llength $argv] > 0} then {
usage
}
array set wconf [list \
conffile $conffile \
libdir $libdir \
files $files \
version $version \
]
global auto_path
lappend auto_path $libdir/pkgtcl
package require scgi
::scgi::start \
-debug $debug \
-myaddr $addr \
-myport $port \
-minworkers $minw \
-maxworkers $maxw \
-idletime $idle \
"set conf(conffile) $conffile
set conf(libdir) $libdir
set conf(files) $files
set conf(version) $version
lappend auto_path $libdir/pkgtcl
source $libdir/worker/worker.tcl" \
"handle-request" "handle-request"
}
exit [main $argv0 $argv]
...@@ -7,9 +7,9 @@ install: ...@@ -7,9 +7,9 @@ install:
mkdir -p $(DESTDIR)$(NMXMPDIR) mkdir -p $(DESTDIR)$(NMXMPDIR)
$(NINSTALL) -m 0644 -e "s|%SBINDIR%|$(SBINDIR)|" $(SUBST) \ $(NINSTALL) -m 0644 -e "s|%SBINDIR%|$(SBINDIR)|" $(SUBST) \
$(FILES) $(DESTDIR)$(NMXMPDIR) $(FILES) $(DESTDIR)$(NMXMPDIR)
cd no-view ; make $(DIRS) install cd no-view ; $(MAKE) install
cd with-views ; make $(DIRS) install cd with-views ; $(MAKE) install
clean: clean:
cd no-view ; make clean cd no-view ; $(MAKE) clean
cd with-views ; make clean cd with-views ; $(MAKE) clean
...@@ -2,15 +2,15 @@ NINSTALL = ../../ninstall ...@@ -2,15 +2,15 @@ NINSTALL = ../../ninstall
build: build:
@echo ">>> Making build in `pwd`" @echo ">>> Making build in `pwd`"
cd pkgtcl ; make build cd pkgtcl ; $(MAKE) build
install: install:
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
mkdir -p $(DESTDIR)$(NMLIBDIR) mkdir -p $(DESTDIR)$(NMLIBDIR)
cd pkgtcl ; make DIRS="$(DIRS)" SUBST="$(SUBST)" VERSION=$(VERSION) install cd pkgtcl ; $(MAKE) install
cd worker ; make DIRS="$(DIRS)" SUBST="$(SUBST)" install cd worker ; $(MAKE) install
cd upgrade ; make $(DIRS) SUBST="$(SUBST)" install cd upgrade ; $(MAKE) install
tar cf - sql* *.sql | tar xf - -C $(DESTDIR)$(NMLIBDIR) tar cf - sql* *.sql | tar xf - -C $(DESTDIR)$(NMLIBDIR)
clean: clean:
cd pkgtcl ; make clean cd pkgtcl ; $(MAKE) clean
...@@ -2,10 +2,10 @@ NINSTALL = ../../../ninstall ...@@ -2,10 +2,10 @@ NINSTALL = ../../../ninstall
TCLSH = /usr/local/bin/tclsh TCLSH = /usr/local/bin/tclsh
FILES = \ FILES = \
scgi.tcl \
pgdb.tcl \
lconf.tcl \
dbconf.tcl \ dbconf.tcl \
lconf.tcl \
pgdb.tcl \
scgi.tcl \
build: pkgIndex.tcl build: pkgIndex.tcl
@echo ">>> Making build in `pwd`" @echo ">>> Making build in `pwd`"
...@@ -17,10 +17,9 @@ pkgIndex.tcl: $(FILES) ...@@ -17,10 +17,9 @@ pkgIndex.tcl: $(FILES)
install: build install: build
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
mkdir -p $(DESTDIR)$(NMLIBDIR)/pkgtcl mkdir -p $(DESTDIR)$(NMLIBDIR)/pkgtcl
for F in *.tcl ; do \
$(NINSTALL) -m 0644 \ $(NINSTALL) -m 0644 \
-e "s|%NMVERSION%|$(VERSION)|" \ $(SUBST) \
$(SUBST) $$F $(DESTDIR)$(NMLIBDIR)/pkgtcl ; \ $(FILES) $(DESTDIR)$(NMLIBDIR)/pkgtcl ; \
done done
clean: clean:
......
...@@ -4,19 +4,23 @@ TCLSH = /usr/local/bin/tclsh ...@@ -4,19 +4,23 @@ TCLSH = /usr/local/bin/tclsh
FILES = \ FILES = \
worker.tcl \ worker.tcl \
libworker.tcl \ libworker.tcl \
hdl-admin.tcl \
hdl-dhcpranges.tcl \
hdl-domains.tcl \
hdl-files.tcl \ hdl-files.tcl \
hdl-hinfos.tcl \
hdl-login.tcl \ hdl-login.tcl \
hdl-names.tcl \ hdl-names.tcl \
hdl-networks.tcl \ hdl-networks.tcl \
hdl-views.tcl \ hdl-views.tcl \
build:
@echo ">>> Making build in `pwd`"
cd msgs && $(MAKE) build
install: ################## build install: ################## build
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
mkdir -p $(DESTDIR)$(NMLIBDIR)/worker mkdir -p $(DESTDIR)$(NMLIBDIR)/worker
for F in $(FILES) ; do \ $(NINSTALL) -m 0644 $(SUBST) \
$(NINSTALL) -m 0644 \ $(FILES) $(DESTDIR)$(NMLIBDIR)/worker ; \
-e "s|%NMLIBDIR%|$(NMLIBDIR)|" \ cd msgs && $(MAKE) install
$(SUBST) \
$$F $(DESTDIR)$(NMLIBDIR)/worker ; \
done
...@@ -23,7 +23,7 @@ api-handler get {/files/([-a-zA-Z0-9][-a-zA-Z0-9.]*:name)} yes { ...@@ -23,7 +23,7 @@ api-handler get {/files/([-a-zA-Z0-9][-a-zA-Z0-9.]*:name)} yes {
set path "" set path ""
foreach f [list $base.$lang.$ext $base.$ext] { foreach f [list $base.$lang.$ext $base.$ext] {
set p $conf(static-dir)/$f set p $conf(files)/$f
if {[file exists $p]} then { if {[file exists $p]} then {
set path $p set path $p
break break
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
# worker program (worker thread to answer SCGI requests) # worker program (worker thread to answer SCGI requests)
# #
# Tcl variables initialized during the thread start # Tcl variables initialized during the thread start
# - conffile: pathname of configuration file # - conf(conffile): pathname of configuration file
# - wrkdir: pathname of the directory containing this file # - conf(libdir): pathname of the directory containing worker/ and pkgtcl/
# - conf(files): pathname of the directory containing *.html files
# - conf(version): application version
# - auto_path: path of Tcl packages specific to Netmagis # - auto_path: path of Tcl packages specific to Netmagis
# #
set conf(static-dir) %NMLIBDIR%/www
set conf(static-dir) /tmp
set conf(lang) {en fr} set conf(lang) {en fr}
package require snit package require snit
...@@ -32,12 +32,14 @@ array set route { ...@@ -32,12 +32,14 @@ array set route {
# Thread initialisation # Thread initialisation
############################################################################## ##############################################################################
proc thread-init {conffile wdir} { proc thread-init {conffile version wdir} {
global conf
::lconf::lconf create ::lc ::lconf::lconf create ::lc
::lc read $conffile ::lc read $conffile
::pgdb::db create ::dbdns ::pgdb::db create ::dbdns
::dbdns init "dns" ::lc 3.0.0foobar ;# "%NMVERSION%" ::dbdns init "dns" ::lc $version
::pgdb::db create ::dbmac ::pgdb::db create ::dbmac
::dbmac init "mac" ::lc "" ::dbmac init "mac" ::lc ""
...@@ -612,11 +614,13 @@ proc api-handler {method pathspec authneeded paramspec script} { ...@@ -612,11 +614,13 @@ proc api-handler {method pathspec authneeded paramspec script} {
# - stdout: <code> <text> # - stdout: <code> <text>
proc handle-request {uri meth parm cookie} { proc handle-request {uri meth parm cookie} {
global wrkdir global conf
global route global route
set msgdir conf(libdir)/worker/msgs
uplevel #0 mclocale "en" uplevel #0 mclocale "en"
uplevel #0 mcload $wrkdir/msgs uplevel #0 mcload $msgdir
set ok 0 set ok 0
foreach r $route($meth) { foreach r $route($meth) {
...@@ -683,7 +687,7 @@ proc handle-request {uri meth parm cookie} { ...@@ -683,7 +687,7 @@ proc handle-request {uri meth parm cookie} {
if {$l ne ""} then { if {$l ne ""} then {
uplevel #0 mclocale $l uplevel #0 mclocale $l
uplevel #0 mcload $wrkdir/msgs uplevel #0 mcload $msgdir
} }
# #
...@@ -744,7 +748,7 @@ proc check-route {uri parm re vars paramspec} { ...@@ -744,7 +748,7 @@ proc check-route {uri parm re vars paramspec} {
} }
try { try {
thread-init $conffile $wrkdir thread-init $conf(conffile) $conf(version) $conf(libdir)/worker
} on error msg { } on error msg {
puts stderr $msg puts stderr $msg
exit 1 exit 1
......
...@@ -2,16 +2,16 @@ NINSTALL = ../ninstall ...@@ -2,16 +2,16 @@ NINSTALL = ../ninstall
build: build:
@echo ">>> Making build in `pwd`" @echo ">>> Making build in `pwd`"
cd lib ; make build cd lib ; $(MAKE) build
cd src ; make build cd src ; $(MAKE) build
install: build install: build
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
cd src ; make $(DIRS) install cd src ; $(MAKE) install
cd eqvirt ; make $(DIRS) install cd eqvirt ; $(MAKE) install
mkdir -p $(DESTDIR)$(NMVARDIR)/eqvirt mkdir -p $(DESTDIR)$(NMVARDIR)/eqvirt
mkdir -p $(DESTDIR)$(NMVARDIR)/eqgen mkdir -p $(DESTDIR)$(NMVARDIR)/eqgen
clean: clean:
cd lib ; make clean cd lib ; $(MAKE) clean
cd src ; make clean cd src ; $(MAKE) clean
...@@ -2,7 +2,7 @@ NINSTALL = ../ninstall ...@@ -2,7 +2,7 @@ NINSTALL = ../ninstall
build: build:
@echo ">>> Making build in `pwd`" @echo ">>> Making build in `pwd`"
cd htg ; make TCLCFLAGS="$(TCLCFLAGS)" TCLLFLAGS="$(TCLLFLAGS)" build cd htg ; $(MAKE) TCLCFLAGS="$(TCLCFLAGS)" TCLLFLAGS="$(TCLLFLAGS)" build
install: build install: build
@echo ">>> Making install in `pwd`" @echo ">>> Making install in `pwd`"
...@@ -10,12 +10,12 @@ install: build ...@@ -10,12 +10,12 @@ install: build
# install CGI # install CGI
# #
mkdir -p $(DESTDIR)$(NMCGIDIR) mkdir -p $(DESTDIR)$(NMCGIDIR)
cd cgi ; make $(DIRS) install cd cgi ; $(MAKE) install
# #
# install API # install API
# #
mkdir -p $(DESTDIR)$(NMCGIDIR) mkdir -p $(DESTDIR)$(NMCGIDIR)
cd nmd ; make $(DIRS) install cd nmd ; $(MAKE) install
############################## WARNING : REMOVE AS SOON AS POSSIBLE ############################## WARNING : REMOVE AS SOON AS POSSIBLE