You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2003/08/22 10:58:55 UTC
cvs commit: tcl-rivet/src/buildscripts aardvark.tcl
davidw 2003/08/22 01:58:55
Modified: . ChangeLog INSTALL
debian rules
src configure.in.tcl configure.tcl make.tcl mod_rivet.c
src/buildscripts aardvark.tcl
Log:
* src/buildscripts/aardvark.tcl (aardvark::runbuildcommand): Rebuild
only if file depended on is newer than the target, rather than >=.
This prevents some files from being remade if make is run again.
* src/configure.tcl (configure::ProcessOptions): Added 'verbose' flag
to configure. (configure::test): Exit on tcl failure in test
procedures. (configure::assert): Added assert command. Fail on
error or 0.
* src/configure.in.tcl: Changed INC variable to use TCL_INCLUDE_SPEC.
Revision Changes Path
1.132 +15 -0 tcl-rivet/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /home/cvs/tcl-rivet/ChangeLog,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- ChangeLog 20 Aug 2003 22:32:24 -0000 1.131
+++ ChangeLog 22 Aug 2003 08:58:54 -0000 1.132
@@ -1,4 +1,19 @@
+2003-08-22 David N. Welton <da...@dedasys.com>
+
+ * src/buildscripts/aardvark.tcl (aardvark::runbuildcommand):
+ Rebuild only if file depended on is newer than the target, rather
+ than >=. This prevents some files from being remade if make is
+ run again.
+
+ * src/configure.tcl (configure::ProcessOptions): Added 'verbose'
+ flag to configure.
+ (configure::test): Exit on tcl failure in test procedures.
+ (configure::assert): Added assert command. Fail on error or 0.
+
2003-08-21 David N. Welton <da...@dedasys.com>
+
+ * src/configure.in.tcl: Changed INC variable to use
+ TCL_INCLUDE_SPEC.
* INSTALL: Updated instructions.
1.7 +3 -3 tcl-rivet/INSTALL
Index: INSTALL
===================================================================
RCS file: /home/cvs/tcl-rivet/INSTALL,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- INSTALL 20 Aug 2003 22:32:24 -0000 1.6
+++ INSTALL 22 Aug 2003 08:58:54 -0000 1.7
@@ -10,8 +10,8 @@
./make.tcl install to install everything.
cd src
-./configure.tcl
-./make.tcl shared
-./make.tcl install
+tclsh ./configure.tcl
+tclsh ./make.tcl shared
+tclsh ./make.tcl install
For more detailed instructions, see the docs/html/ directory.
1.5 +2 -2 tcl-rivet/debian/rules
Index: rules
===================================================================
RCS file: /home/cvs/tcl-rivet/debian/rules,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- rules 20 Aug 2003 17:20:47 -0000 1.4
+++ rules 22 Aug 2003 08:58:54 -0000 1.5
@@ -8,7 +8,7 @@
build:
$(checkdir)
- ( export C_INCLUDE_PATH=/usr/include/tcl$(TCL_VERSION)/ ; cd src ; ./make.tcl shared )
+ ( cd src ; ./make.tcl shared )
touch build
clean:
1.2 +7 -5 tcl-rivet/src/configure.in.tcl
Index: configure.in.tcl
===================================================================
RCS file: /home/cvs/tcl-rivet/src/configure.in.tcl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- configure.in.tcl 20 Aug 2003 17:20:48 -0000 1.1
+++ configure.in.tcl 22 Aug 2003 08:58:54 -0000 1.2
@@ -2,6 +2,9 @@
# $Id$
+# We need Tcl 8.3 or later.
+package require Tcl 8.3
+
# Add some command-line configuration options specific to Rivet.
configure::AddOption -flag with-apxs -var APXS \
-desc "Location of the apxs binary" -arg -default apxs
@@ -38,18 +41,17 @@
}
configure::test INC {
- set tmp "-I$INCLUDEDIR -I[file join $TCL_PREFIX include]"
+ set tmp "-I$INCLUDEDIR $TCL_INCLUDE_SPEC"
}
configure::test COMPILE {
if { $DEBUGSYMBOLS } {
- set tmp "$TCL_CC $TCL_CFLAGS_DEBUG $TCL_CFLAGS_OPTIMIZE $TCL_CFLAGS_WARNING $TCL_SHLIB_CFLAGS $INC $TCL_EXTRA_CFLAGS $TCL_THREADED -c"
+ set tmp "$TCL_CC $TCL_CFLAGS_DEBUG $TCL_CFLAGS_OPTIMIZE $TCL_CFLAGS_WARNING $TCL_SHLIB_CFLAGS $INC $TCL_EXTRA_CFLAGS $TCL_THREADED -c"
} else {
- set tmp "$TCL_CC $TCL_CFLAGS_OPTIMIZE $TCL_CFLAGS_WARNING $TCL_SHLIB_CFLAGS $INC $TCL_EXTRA_CFLAGS $TCL_THREADED -c"
+ set tmp "$TCL_CC $TCL_CFLAGS_OPTIMIZE $TCL_CFLAGS_WARNING $TCL_SHLIB_CFLAGS $INC $TCL_EXTRA_CFLAGS $TCL_THREADED -c"
}
}
configure::test CRYPT_LIB {
configure::lib_has_function crypt crypt
}
-
1.3 +52 -5 tcl-rivet/src/configure.tcl
Index: configure.tcl
===================================================================
RCS file: /home/cvs/tcl-rivet/src/configure.tcl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- configure.tcl 20 Aug 2003 22:32:24 -0000 1.2
+++ configure.tcl 22 Aug 2003 08:58:54 -0000 1.3
@@ -14,6 +14,7 @@
array set errors {}
set useroptions {}
array set optionvars {}
+ set verbose 0
}
namespace eval configs {}
@@ -37,11 +38,13 @@
global argv argv0
variable useroptions
variable optionvars
+ variable verbose
set optionvars(prefix) PREFIX
set optionvars(enable-symbols) DEBUGSYMBOLS
set options {
{prefix.arg "" "prefix - where"}
{enable-symbols "enable debugging symbols"}
+ {verbose "verbose output"}
}
set options [concat $options $useroptions]
set usage "options:"
@@ -56,6 +59,9 @@
set ::configs::[set optionvars($key)] $val
}
}
+ if { $params(verbose) } {
+ set verbose 1
+ }
}
@@ -137,22 +143,32 @@
proc configure::test {varname body} {
variable errors
+ variable verbose
- puts -nonewline "."
- flush stdout
+ if { ! $verbose } {
+ puts -nonewline "."
+ flush stdout
+ }
if { [info exists ::configs::${varname}] && [set ::configs::[set varname]] != "" } {
# It already exists - it was probably passed on the command
# line.
return
}
+
set val ""
set oldvars [lsort [info vars ::configs::*]]
if { [catch {set val [namespace eval ::configs $body]} err] } {
- set errors($varname) $err
+ # Exit on error.
+ puts stderr ""
+ puts stderr "Error in $varname test: $err"
+ exit 1
} else {
set ::configs::${varname} $val
}
set newvars [lsort [info vars ::configs::*]]
+ if { $verbose } {
+ puts "$varname = $val"
+ }
# Clean up temporary variables.
foreach var $newvars {
if { [lsearch $oldvars $var] < 0 } {
@@ -163,6 +179,37 @@
}
}
+
+# configure::assert --
+#
+# Exits if an assertion is false. We use this to make sure the
+# environment meets specific criterion.
+#
+# Arguments:
+# name - useful for looking it up, doesn't really matter.
+# body - code to test.
+#
+# Side Effects:
+# Exits on failure.
+#
+# Results:
+# None.
+
+proc configure::assert {name body} {
+ set val 0
+ set errmsg ""
+ if { [catch {set val [namespace eval ::configs $body]} err] } {
+ set errmsg "$name assertion error: $err"
+ } elseif { $val == 0 } {
+ set errmsg "$name assertion false: $body"
+ } else {
+ return
+ }
+ puts stderr ""
+ puts stderr $errmsg
+ exit 1
+}
+
# Helper procedures for findtclconfig
proc configure::RelToExec {exe cf} {
@@ -335,7 +382,7 @@
exit 1
}
-puts -nonewline "Configuring "
+puts "Configuring"
# Here is where we actually read in the user's tests.
source [file join [file dirname [info script]] configure.in.tcl]
1.49 +8 -6 tcl-rivet/src/make.tcl
Index: make.tcl
===================================================================
RCS file: /home/cvs/tcl-rivet/src/make.tcl,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- make.tcl 20 Aug 2003 17:20:48 -0000 1.48
+++ make.tcl 22 Aug 2003 08:58:54 -0000 1.49
@@ -5,6 +5,8 @@
# $Id$
#
# This file is responsible for the top-level "make" style processing.
+# It uses the 'aardvark' make-like system, located in the buildscripts
+# directory.
# Source the other scripts we need.
source [file join [file dirname [info script]] buildscripts buildscripts.tcl]
@@ -14,17 +16,17 @@
# Get the configuration options generated by ./configure.tcl
getconfigs configs.tcl
-# These are targets
+# These are build targets.
set MOD_STLIB mod_rivet.a
set MOD_SHLIB mod_rivet[info sharedlibextension]
set MOD_OBJECTS {apache_multipart_buffer.o apache_request.o rivetChannel.o rivetParser.o rivetCore.o mod_rivet.o TclWebapache.o}
set RIVETLIB_STLIB librivet.a
set RIVETLIB_SHLIB librivet[info sharedlibextension]
-set RIVETLIB_OBJECTS "rivetList.o rivetCrypt.o rivetWWW.o rivetPkgInit.o"
+set RIVETLIB_OBJECTS {rivetList.o rivetCrypt.o rivetWWW.o rivetPkgInit.o}
set PARSER_SHLIB librivetparser[info sharedlibextension]
-set PARSER_OBJECTS "rivetParser.o parserPkgInit.o"
+set PARSER_OBJECTS {rivetParser.o parserPkgInit.o}
set XML_DOCS [glob [file join .. doc packages * *].xml]
set HTML_DOCS [string map {.xml .html} $XML_DOCS]
@@ -202,7 +204,7 @@
}
}
-AddNode ../VERSION {
+AddNode [file join .. VERSION] {
tcl cd ..
sh ./cvsversion.tcl
tcl cd src/
@@ -233,7 +235,7 @@
# moment, as it uses the bourne shell and unix commands.
AddNode dist {
- depends distclean distdoc ../VERSION $PKGINDEX
+ depends distclean distdoc [file join .. VERSION] $PKGINDEX
tcl {
set fl [open [file join .. VERSION]]
set VERSION [string trim [read $fl]]
1.67 +3 -3 tcl-rivet/src/mod_rivet.c
Index: mod_rivet.c
===================================================================
RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- mod_rivet.c 1 Jul 2003 07:46:45 -0000 1.66
+++ mod_rivet.c 22 Aug 2003 08:58:54 -0000 1.67
@@ -181,8 +181,8 @@
rsc = Rivet_GetConf( req->req );
/* If the user configuration has indeed been updated, I guess that
- * pretty much invalidates anything that might have been
- * cached. */
+ pretty much invalidates anything that might have been
+ cached. */
/* This is all horrendously slow, and means we should *also* be
doing caching on the modification time of the .htaccess files
1.16 +3 -3 tcl-rivet/src/buildscripts/aardvark.tcl
Index: aardvark.tcl
===================================================================
RCS file: /home/cvs/tcl-rivet/src/buildscripts/aardvark.tcl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- aardvark.tcl 20 Aug 2003 17:20:48 -0000 1.15
+++ aardvark.tcl 22 Aug 2003 08:58:54 -0000 1.16
@@ -85,14 +85,14 @@
}
# rebuild if dependencies are newer than file
- if { [ llength $deps ] > 0 } {
+ if { [llength $deps] > 0 } {
foreach dep $deps {
if { [file exists $dep] } {
set depmtime [file mtime $dep]
} else {
set depmtime 0
}
- if { $depmtime >= $mtime } {
+ if { $depmtime > $mtime } {
set rebuild 1
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org