<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.sysutils.bsdbuild.scm">
    <title>gmane.comp.sysutils.bsdbuild.scm</title>
    <link>http://blog.gmane.org/gmane.comp.sysutils.bsdbuild.scm</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/45"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/44"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/43"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/42"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/41"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/40"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/39"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/38"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/37"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/36"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/35"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/34"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/33"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/32"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/31"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/30"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/29"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/28"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/27"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/26"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/45">
    <title>BSDBuild: r740 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/45</link>
    <description>Author: vedge
Date: 2008-10-06 10:52:55 -0300 (Mon, 06 Oct 2008)
New Revision: 740

Modified:
   trunk/mkify.pl
Log:
simplify


Modified: trunk/mkify.pl
===================================================================
--- trunk/mkify.pl2008-10-06 11:21:54 UTC (rev 739)
+++ trunk/mkify.pl2008-10-06 13:52:55 UTC (rev 740)
&lt; at &gt;&lt; at &gt; -22,165 +22,235 &lt; at &gt;&lt; at &gt;
 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 # USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
+#
 
-sub MKCopy;
+&lt; at &gt;Scripts = qw(
+mkdep
+mkconcurrent.pl
+manlinks.pl
+cmpfiles.pl
+gen-declspecs.pl);
+  
+&lt; at &gt;LibtoolFiles = qw(
+config.guess
+config.sub
+configure.in
+configure
+ltmain.sh
+ltconfig);
 
-sub MKCopy
+$SHAREDIR = '%SHAREDIR%';
+%copied = ();
+
+#
+# Install file as-is.
+# 
+sub InstallASIS
 {
-my ($src, $dir) = &lt; at &gt;_;
-my $destmk = join('/', 'mk', $src);
-my $srcmk = join('/', $dir, $src);
-my &lt; at &gt;deps = ();
+my $file = shift;
+my $dst = shift;
+
+if (!defined($dst)) { $dst = 'mk/'.$file; }
 
-print "copy: $src\n";
+print STDERR " $file";
+unless (open(SRC, $SHAREDIR.'/'.$file)) {
+print STDERR "Reading $SHAREDIR/$file: $!\n";
+return (0);
+}
+unless (open(DST, "&gt;$dst")) {
+print STDERR "Writing to $dst: $!\n";
+return (0);
+}
+print DST &lt;SRC&gt;;
+close(DST);
+close(SRC);
+return (1);
+}
 
-unless (-f $srcmk) {
-#print STDERR "src $srcmk: $!\n";
-return 0;
+#
+# Copy files needed by &lt;build.www.mk&gt;.
+#
+sub CopyDepsWWW
+{
+if (!-e 'xsl') {
+unless (mkdir('xsl', 0755)) {
+print STDERR "xsl/: $!\n";
+return (0);
+}
 }
-unless (open(SRC, $srcmk)) {
-#print STDERR "src $srcmk: $!\n";
+InstallASIS('ml.xsl', 'xsl/ml.xsl') || return (0);
+InstallASIS('hstrip.pl') || return (0);
+}
+
+#
+# Copy files needed by &lt;build.lib.mk&gt;.
+#
+sub CopyDepsLIB
+{
+if (! -e 'mk/libtool') {
+unless (mkdir('mk/libtool', 0755)) {
+print STDERR "mk/libtool/: $!\n";
+return (0);
+}
+}
+foreach my $f (&lt; at &gt;LibtoolFiles) {
+InstallASIS('libtool/'.$f) || return (0);
+}
+chmod(0755, 'mk/libtool/config.sub') ||
+    print STDERR "mk/libtool/config.sub: $!\n";
+
+return (1);
+}
+
+#
+# Install a .mk file. Scan the file for include dependency and install
+# these as well.
+#
+sub InstallMK ($)
+{
+my ($file) = &lt; at &gt;_;
+my $dst = 'mk/'.$file;
+my $path = $SHAREDIR.'/'.$file;
+my &lt; at &gt;deps = ();
+
+print STDERR " $file";
+
+unless (open(SRC, $SHAREDIR.'/'.$file)) {
+print STDERR "$SHAREDIR/$file: $!\n";
 return 0;
 }
 chop(&lt; at &gt;src = &lt;SRC&gt;);
 close(SRC);
 
-unless (open(DEST, "&gt;$destmk")) {
-print STDERR "dst $destmk: $!\n";
+unless (open(DEST, "&gt;$dst")) {
+print STDERR "dst $dst: $!\n";
 close(SRC);
 return 0;
 }
 foreach $_ (&lt; at &gt;src) {
 print DEST $_, "\n";
 
-if (/^include .+\/mk\/(.+)$/) {
-print "$src: depends on $1\n";
-push &lt; at &gt;deps, $1;
+if (/^include\s*.+\/mk\/(.+)\s*$/) {
+if (!exists($copied{$1})) {
+push &lt; at &gt;deps, $1;
+$copied{$1}++;
+}
 }
 }
 close(DEST);
 
 foreach my $dep (&lt; at &gt;deps) {
-MKCopy($dep, $dir);
+InstallMK($dep);
 }
-if ($src eq 'build.www.mk') {
-MKCopy('hstrip.pl', $dir);
+if ($file eq 'build.www.mk') {
+CopyDepsWWW() || return (0);
 }
-if ($src eq 'build.lib.mk') {
-mkdir("mk/libtool");
-for $lf ('config.guess', 'config.sub', 'configure',
-         'configure.in', 'ltconfig', 'ltmain.sh') {
-if (open(LF, "$dir/libtool/$lf")) {
-open(DF, "&gt;mk/libtool/$lf");
-print DF &lt;LF&gt;;
-close(DF);
-close(LF);
-}
-}
-chmod(0755, 'mk/libtool/config.sub');
+if ($file eq 'build.lib.mk') {
+CopyDepsLIB() || return (0);
 }
-
+
+$copied{$file}++;
 return 1;
 }
 
-BEGIN
-{
-my $dir = '%PREFIX%/share/bsdbuild';
-my $mk = './mk';
+if (!-d 'mk' &amp;&amp; &lt; at &gt;ARGV &lt; 1) {
+print STDERR "Usage: $0 [module-name ...]\n";
+exit(1);
+}
 
-unless (&lt; at &gt;ARGV) {
-print STDERR "Usage: $0 [module1 module2 ...]\n\n";
-print STDERR "Possible modules include: \n";
-print STDERR "\tprog     Executable\n";
-print STDERR "\tlib      Library\n";
-print STDERR "\tman      Manual pages\n";
-print STDERR "\twww      HTML pages\n\n";
-print STDERR "See contents of $dir for full list\n";
-exit(1);
+if (!-e 'mk' || &lt; at &gt;ARGV &gt; 0) {
+if (! -e 'mk') {
+unless (mkdir('mk', 0755)) {
+print STDERR "mk/: $!\n";
+exit (1);
+}
 }
-if (! -d $mk &amp;&amp; !mkdir($mk)) {
-print STDERR "mkdir $mk: $!\n";
-exit (1);
+print STDERR "Installing in mk:";
+foreach my $type (&lt; at &gt;ARGV) {
+InstallMK("build.${type}.mk");
 }
-if (opendir(MKDIR, $mk)) {
-foreach my $f (readdir(MKDIR)) {
-next unless -f "$mk/$f";
-MKCopy($f, $dir);
-}
-closedir(MKDIR);
-} else {
-print "opendir $mk: $!\n";
-exit (1);
+print STDERR ".\n";
+} else {
+unless (opendir(MKDIR, 'mk')) {
+print "mk/: $!\n";
+exit(1);
 }
-my $type = '';
-foreach my $f (&lt; at &gt;ARGV) {
-$type = $f;
-$f = join('.', 'build', $f, 'mk');
-my $dest = join('/', $mk, $f);
-
-MKCopy($f, $dir);
-
-if ($type eq 'www') {
-mkdir('xsl');
-    open(IN, $dir.'/ml.xsl') || die "$dir/ml.xsl: $!";
-    open(OUT, '&gt;xsl/ml.xsl') || die "xsl/ml.xsl: $!";
-foreach my $l (&lt;IN&gt;) {
-print OUT $l;
-}
-close(OUT);
-close(IN);
+print STDERR "Updating mk:";
+foreach my $f (readdir(MKDIR)) {
+if ($f =~ /^\./ || -d 'mk/'.$f) { next; }
+if ($f =~ /^(build\.[\w]+\.mk)$/) {
+InstallMK($f);
+} elsif (-e $SHAREDIR.'/'.$f) {
+InstallASIS($f);
 }
 }
+print STDERR ".\n";
+closedir(MKDIR);
+}
 
-MKCopy('mkdep', $dir);
-MKCopy('mkconcurrent.pl', $dir);
-MKCopy('mkpremake.pl', $dir);
-MKCopy('manlinks.pl', $dir);
-MKCopy('cmpfiles.pl', $dir);
+print STDERR "Installing scripts:";
+foreach my $script (&lt; at &gt;Scripts) {
+InstallASIS($script);
+}
+print STDERR ".\n";
 
-if (!-e 'configure.in' &amp;&amp;
-    open(CONFIN, '&gt;configure.in')) {
-print CONFIN &lt;&lt; 'EOF';
+if (!-e 'configure.in' &amp;&amp;
+    open(CONFIN, '&gt;configure.in')) {
+print CONFIN &lt;&lt; 'EOF';
 # Public domain
 #
-# Sample BSDbuild configure script source.
+# Sample BSDbuild configure script source. Standard Bourne script fragments
+# and BSDBuild directives are both allowed. See mkconfigure(1) for details.
+#
 # To generate a configure script, use the command:
-#
 #     $ cat configure.in |mkconfigure &gt; configure
 #
 
-# Name and version of the application, written to config/progname.h
-# and config/version.h.
-HDEFINE(PROGNAME, "\"foo\"")
-HDEFINE(VERSION, "\"1.0-beta\"")
+# Name and version of the application. HDEFINE() will write the value of
+# the variable to config/progname.h and config/version.h.
+HDEFINE(PROGNAME, "foo")
+HDEFINE(VERSION, "1.0-beta")
 
-# Codename of the release (optional).
-HDEFINE(RELEASE, "\"Foo\"")
+# An optional codename for the current release.
+HDEFINE(RELEASE, "Foo")
 
-# Register the ${enable_warnings} option.
+# We can insert arbitrary Bourne script.
+echo "Building release: ${RELEASE}"
+
+# Register a ./configure option named "--enable-warnings".
 REGISTER("--enable-warnings",   "Enable compiler warnings [default: no]")
 
 # Check for a suitable C compiler.
 CHECK(cc)
 
-# Output these CFLAGS to Makefile.config.
-MDEFINE(CFLAGS, "$CFLAGS -I$SRC")
+# Add current directory to C include.
+C_INCDIR($SRC)
+# We could have also used:
+# MDEFINE(CFLAGS, "$CFLAGS -I$SRC")
 
-# Set the recommended -Wall switches.
+# Set our preferred -Wall switches.
 if [ "${enable_warnings}" = "yes" ]; then
-        MDEFINE(CFLAGS, "$CFLAGS -Wall -Werror -Wmissing-prototypes")
-        MDEFINE(CFLAGS, "$CFLAGS -Wno-unused")
+# HAVE_GCC has been set by CHECK(cc).
+if [ "${HAVE_GCC}" = "yes" ]; then
+MDEFINE(CFLAGS, "$CFLAGS -Wall -Werror -Wmissing-prototypes")
+MDEFINE(CFLAGS, "$CFLAGS -Wno-unused")
+fi
 fi
 EOF
-system('mkconfigure &lt; configure.in &gt; configure');
-chmod(0755, 'configure');
-close(CONFIN);
+close(CONFIN);
+
+system("$BINDIR/mkconfigure &lt; configure.in &gt; configure");
+if ($? != 0) {
+print STDERR "mkconfigure failed\n";
+exit(1);
 }
+chmod(0755, 'configure') || print STDERR "chmod: $!\n";
+}
 
-if (!-e 'Makefile' &amp;&amp;
-    open(MAKE, '&gt;Makefile')) {
-if ($type eq 'prog') {
-print MAKE &lt;&lt; 'EOF';
+if (!-e 'Makefile' &amp;&amp;
+    open(MAKE, '&gt;Makefile')) {
+if ($type eq 'prog') {
+print MAKE &lt;&lt; 'EOF';
 # Sample Makefile for a program.
 
 # Path to parent directory of "mk".
&lt; at &gt;&lt; at &gt; -198,8 +268,8 &lt; at &gt;&lt; at &gt;
 include ${TOP}/Makefile.config
 include ${TOP}/mk/build.prog.mk
 EOF
-} elsif ($type eq 'lib') {
-print MAKE &lt;&lt; 'EOF';
+} elsif ($type eq 'lib') {
+print MAKE &lt;&lt; 'EOF';
 # Sample Makefile for a library.
 
 # Path to parent directory of "mk".
&lt; at &gt;&lt; at &gt; -217,8 +287,8 &lt; at &gt;&lt; at &gt;
 include ${TOP}/Makefile.config
 include ${TOP}/mk/build.lib.mk
 EOF
-} elsif ($type eq 'www') {
-print MAKE &lt;&lt; 'EOF';
+} elsif ($type eq 'www') {
+print MAKE &lt;&lt; 'EOF';
 # Sample Makefile for a webpage or website.
 
 # Path to parent directory of "mk".
&lt; at &gt;&lt; at &gt; -234,12 +304,11 &lt; at &gt;&lt; at &gt;
 
 include ${TOP}/mk/build.www.mk
 EOF
-}
-close(MAKE);
 }
-if (!-e 'Makefile.config' &amp;&amp;
-    open(MAKE, '&gt;Makefile.config')) {
-print MAKE "# File is auto-generated, do not edit\n";
-close(MAKE);
-}
+close(MAKE);
 }
+if (!-e 'Makefile.config' &amp;&amp;
+    open(MAKE, '&gt;Makefile.config')) {
+print MAKE "# File is auto-generated, do not edit\n";
+close(MAKE);
+}
</description>
    <dc:creator>BSDBuild-SVN</dc:creator>
    <dc:date>2008-10-06T13:53:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/44">
    <title>BSDBuild: r738 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/44</link>
    <description>Author: vedge
Date: 2008-10-06 08:21:10 -0300 (Mon, 06 Oct 2008)
New Revision: 738

Modified:
   trunk/configure
   trunk/configure.in
Log:
2.4

Modified: trunk/configure
===================================================================
--- trunk/configure2008-10-05 06:38:22 UTC (rev 737)
+++ trunk/configure2008-10-06 11:21:10 UTC (rev 738)
&lt; at &gt;&lt; at &gt; -8,7 +8,7 &lt; at &gt;&lt; at &gt;
 #
 #     $ cat configure.in | mkconfigure &gt; configure
 #
-# Copyright (c) 2001-2007 Hypertriton, Inc. &lt;http://hypertriton.com/&gt;
+# Copyright (c) 2001-2008 Hypertriton, Inc. &lt;http://hypertriton.com/&gt;
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
&lt; at &gt;&lt; at &gt; -112,6 +112,9 &lt; at &gt;&lt; at &gt;
 --testdir=*)
     testdir=$optarg
     ;;
+--cache=*)
+    cache=$optarg
+    ;;
 *)
     echo "invalid argument: $arg"
     echo "try ./configure --help"
&lt; at &gt;&lt; at &gt; -169,14 +172,15 &lt; at &gt;&lt; at &gt;
 echo "    --infodir                 Info directory [$PREFIX/share/info]"
 echo "    --srcdir                  Source tree for concurrent build [.]"
 echo "    --testdir                 Directory in which to execute tests [.]"
-echo "    --help                    Display this message"
-echo "    --enable-nls              Native Language Support [no]"
-echo "    --with-gettext            Use gettext tools (msgmerge, ...) [check]"
-echo "    --with-libtool            Specify path to libtool [bundled]"
-echo "    --with-cygwin             Add cygwin dependencies under cygwin [no]"
+echo "    --cache                   Cache directory for test results [none]"
 echo "    --with-manpages           Manual pages (-mdoc) [yes]"
 echo "    --with-manlinks           Manual pages links for functions [no]"
+echo "    --with-ctags              Automatically generate tag files [no]"
 echo "    --with-docs               Printable docs (-me/tbl/eqn/pic/refer) [no]"
+echo "    --with-libtool            Specify path to libtool [use bundled]"
+echo "    --with-cygwin             Add cygwin dependencies under cygwin [no]"
+echo "    --enable-nls              Native Language Support [no]"
+echo "    --with-gettext            Use gettext tools [check]"
 echo "    --enable-debug            Include debugging code [no]"
 exit 1
 fi
&lt; at &gt;&lt; at &gt; -195,7 +199,19 &lt; at &gt;&lt; at &gt;
 do
 echo "Argument: $arg" &gt;&gt; config.log
 done
-mkdir config 1&gt;/dev/null 2&gt;&amp;1
+if [ -e "config" ]; then
+if [ -f "config" ]; then
+echo "File ./config is in the way. Please remove it first."
+exit 1;
+else
+rm -fR config;
+fi
+fi
+mkdir config
+if [ $? != 0 ]; then
+echo "Could not create ./config/ directory."
+exit 1
+fi
 
 HAVE_MANDOC="no"
 NROFF=""
&lt; at &gt;&lt; at &gt; -269,6 +285,23 &lt; at &gt;&lt; at &gt;
 echo "ENABLE_NLS=${ENABLE_NLS}" &gt;&gt; Makefile.config
 echo "HAVE_GETTEXT=${HAVE_GETTEXT}" &gt;&gt; Makefile.config
 
+CTAGS=""
+if [ "${with_ctags}" = "yes" ]; then
+for path in `echo $PATH | sed 's/:/ /g'`; do
+if [ -x "${path}/ectags" ]; then
+CTAGS="${path}/ectags"
+fi
+done
+if [ "${CTAGS}" = "" ]; then
+for path in `echo $PATH | sed 's/:/ /g'`; do
+if [ -x "${path}/ctags" ]; then
+CTAGS="${path}/ctags"
+fi
+done
+fi
+fi
+echo "CTAGS=${CTAGS}" &gt;&gt; Makefile.config
+
 LIBTOOL_BUNDLED="yes"
 LIBTOOL=\${TOP}/mk/libtool/libtool
 echo "LIBTOOL=${LIBTOOL}" &gt;&gt; Makefile.config
&lt; at &gt;&lt; at &gt; -351,11 +384,13 &lt; at &gt;&lt; at &gt;
 SHAREDIR="$PREFIX/share/bsdbuild"
 echo "SHAREDIR=$SHAREDIR" &gt;&gt;Makefile.config
 echo "mdefs[\"SHAREDIR\"] = \"$SHAREDIR\"" &gt;&gt;configure.lua
-VERSION="2.3"
+VERSION="2.4"
 echo "VERSION=$VERSION" &gt;&gt;Makefile.config
 echo "mdefs[\"VERSION\"] = \"$VERSION\"" &gt;&gt;configure.lua
-RELEASE="Witching Hour"
+RELEASE="Alive in Strange Reality"
 echo "RELEASE=$RELEASE" &gt;&gt;Makefile.config
 echo "mdefs[\"RELEASE\"] = \"$RELEASE\"" &gt;&gt;configure.lua
-echo "Don't forget to run \"make depend\"."
-echo "Don't forget to run \"make depend\"." &gt;&gt; config.log
+echo "*"
+echo "* Use \"make all install\" to compile and install BSDBuild."
+echo "* Use \"make install-links\" to install links to source (for developers)."
+echo "*"

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in2008-10-05 06:38:22 UTC (rev 737)
+++ trunk/configure.in2008-10-06 11:21:10 UTC (rev 738)
&lt; at &gt;&lt; at &gt; -1,5 +1,11 &lt; at &gt;&lt; at &gt;
 # Public domain
 
 MDEFINE(SHAREDIR, "$PREFIX/share/bsdbuild");
-MDEFINE(VERSION, "2.3");
-MDEFINE(RELEASE, "Witching Hour");
+MDEFINE(VERSION, "2.4");
+MDEFINE(RELEASE, "Alive in Strange Reality")
+
+echo "*"
+echo "* Use \"make all install\" to compile and install BSDBuild."
+echo "* Use \"make install-links\" to install links to source (for developers)."
+echo "*"
+
</description>
    <dc:creator>BSDBuild-SVN</dc:creator>
    <dc:date>2008-10-06T11:21:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/43">
    <title>BSDBuild: r737 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/43</link>
    <description>Author: vedge
Date: 2008-10-05 03:38:22 -0300 (Sun, 05 Oct 2008)
New Revision: 737

Modified:
   trunk/BSDBuild/Core.pm
   trunk/BSDBuild/byte_order.pm
   trunk/BSDBuild/cc.pm
   trunk/BSDBuild/cxx.pm
Log:
always set $MK_COMPILE_STATUS


Modified: trunk/BSDBuild/Core.pm
===================================================================
--- trunk/BSDBuild/Core.pm2008-10-05 04:35:22 UTC (rev 736)
+++ trunk/BSDBuild/Core.pm2008-10-05 06:38:22 UTC (rev 737)
&lt; at &gt;&lt; at &gt; -350,16 +350,16 &lt; at &gt;&lt; at &gt;
 echo "int main (int argc, char *argv[]) { return (0); }" &gt;&gt; conftest.c
 EOF
 print &lt;&lt; 'EOF';
-compile="ok"
+MK_COMPILE_STATUS="OK"
 echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" &gt;&gt;config..log
 $CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c 2&gt;&gt;config.log
 if [ $? != 0 ]; then
 echo "-&gt; failed ($?)" &gt;&gt; config.log
-compile="failed"
+MK_COMPILE_STATUS="FAIL($?)"
 fi
 rm -f $testdir/conftest conftest.c
 EOF
-MkIf('"${compile}" = "ok"');
+MkIf('"${MK_COMPILE_STATUS}" = "OK"');
 MkDefine($def, 'yes');
 MkSaveDefine($def);
 MkIf('"${TEST_HEADERS}" = "Yes"');
&lt; at &gt;&lt; at &gt; -401,30 +401,52 &lt; at &gt;&lt; at &gt;
 my ($define, $cflags, $libs, $code) = &lt; at &gt;_;
 
 print &lt;&lt; "EOF";
-cat &lt;&lt; EOT &gt; conftest.c
+MK_CACHED="No"
+MK_COMPILE_STATUS="OK"
+MK_RUN_STATUS="OK"
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/ctest-$define" ]; then
+$define=`cat \${cache}/ctest-$define`
+MK_COMPILE_STATUS=`cat \${cache}/ctest-status-$define`
+MK_RUN_STATUS=`cat \${cache}/ctest-runstatus-$define`
+MK_CACHED="Yes"
+fi
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+cat &lt;&lt; EOT &gt; conftest.c
 $code
 EOT
+echo "\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest.c $libs" &gt;&gt;config.log
+\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest.c $libs 2&gt;&gt;config.log
+if [ \$? != 0 ]; then
+echo "-&gt; failed (\$?)" &gt;&gt; config.log
+MK_COMPILE_STATUS="FAIL(\$?)"
+fi
+fi
 EOF
-print &lt;&lt; "EOF";
-echo "\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest..c $libs" &gt;&gt;config.log
-\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest.c $libs 2&gt;&gt;config.log
-EOF
-MkIf('$? != 0');
-MkPrint('no (compile failed)');
-MkDefine('compile', 'failed');
-MkSaveCompileFailed($define);
-MkElse;
-MkDefine('compile', 'ok');
+MkIf('"${MK_COMPILE_STATUS}" = "OK"');
 print '(cd $testdir &amp;&amp; ./conftest) &gt;&gt; config.log', "\n";
 MkIf('"$?" = "0"');
 MkPrint('yes');
 MkSaveCompileSuccess($define);
 MkElse;
-MkPrint('no (exec failed)');
+MkPrint('no (test program failed)');
+MkDefine('MK_RUN_STATUS', 'FAIL(\$?)');
 MkSaveCompileFailed($define);
 MkEndif;
+MkElse;
+MkPrint('no (compilation failed)');
+MkDefine('MK_RUN_STATUS', 'FAIL(\$?)');
+MkSaveCompileFailed($define);
 MkEndif;
-print 'rm -f $testdir/conftest conftest.c', "\n";
+print &lt;&lt; "EOF";
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/ctest-$define
+echo \$MK_COMPILE_STATUS &gt; \${cache}/ctest-status-$define
+echo \$MK_RUN_STATUS &gt; \${cache}/ctest-runstatus-$define
+fi
+rm -f \$testdir/conftest conftest.c
+EOF
 }
 
 #
&lt; at &gt;&lt; at &gt; -436,36 +458,50 &lt; at &gt;&lt; at &gt;
 #
 sub MkCompileAndRunCXX
 {
-my $define = shift;
-my $cxxflags = shift;
-my $libs = shift;
-my $code = shift;
+my ($define, $cxxflags, $libs, $code) = &lt; at &gt;_;
 
 print &lt;&lt; "EOF";
-cat &lt;&lt; EOT &gt; conftest.cpp
+MK_CACHED="No"
+MK_COMPILE_STATUS="OK"
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/cxxtest-$define" ]; then
+$define=`cat \${cache}/cxxtest-$define`
+MK_COMPILE_STATUS=`cat \${cache}/cxxtest-status-$define`
+MK_CACHED="Yes"
+fi
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+cat &lt;&lt; EOT &gt; conftest.cpp
 $code
 EOT
+echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp $libs" &gt;&gt;config.log
+\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp $libs 2&gt;&gt;config.log
+if [ \$? != 0 ]; then
+echo "-&gt; failed (\$?)" &gt;&gt; config.log
+MK_COMPILE_STATUS="FAIL(\$?)"
+fi
 EOF
-print &lt;&lt; "EOF";
-echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp $libs" &gt;&gt;config.log
-\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp $libs 2&gt;&gt;config.log
-EOF
-MkIf('$? != 0');
-MkPrint('no (compile failed)');
-MkDefine('compile', 'failed');
-MkSaveCompileFailed($define);
-MkElse;
-MkDefine('compile', 'ok');
+MkIf('"${MK_COMPILE_STATUS}" = "OK"');
 print '(cd $testdir &amp;&amp; ./conftest) &gt;&gt; config.log', "\n";
 MkIf('"$?" = "0"');
 MkPrint('yes');
 MkSaveCompileSuccess($define);
 MkElse;
-MkPrint('no (exec failed)');
+MkPrint('no (test program failed)');
 MkSaveCompileFailed($define);
 MkEndif;
+MkElse;
+MkPrint('no (compilation failed)');
+MkSaveCompileFailed($define);
 MkEndif;
-print 'rm -f $testdir/conftest conftest.cpp', "\n";
+
+print &lt;&lt; "EOF";
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/cxxtest-$define
+echo \$MK_COMPILE_STATUS &gt; \${cache}/cxxtest-status-$define
+fi
+rm -f \$testdir/conftest conftest.cpp
+EOF
 }
 
 sub TryCompileFlagsC
&lt; at &gt;&lt; at &gt; -641,11 +677,9 &lt; at &gt;&lt; at &gt;
 EOF
 MkIf('"${MK_COMPILE_STATUS}" = "OK"');
 MkPrint('yes');
-MkDefine('compile', 'ok');
 MkSaveCompileSuccess($define);
 MkElse;
 MkPrint('no');
-MkDefine('compile', 'failed');
 MkSaveCompileFailed($define);
 MkEndif;
 

Modified: trunk/BSDBuild/byte_order.pm
===================================================================
--- trunk/BSDBuild/byte_order.pm2008-10-05 04:35:22 UTC (rev 736)
+++ trunk/BSDBuild/byte_order.pm2008-10-05 06:38:22 UTC (rev 737)
&lt; at &gt;&lt; at &gt; -76,7 +76,7 &lt; at &gt;&lt; at &gt;
 return (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-MkIf('"${compile}" = "failed"');
+MkIf('"${MK_COMPILE_STATUS}" != "OK"');
 MkFail('Unable to determine byte order');
 MkEndif;
 MkIf('"${_MK_LITTLE_ENDIAN}" = "no"');

Modified: trunk/BSDBuild/cc.pm
===================================================================
--- trunk/BSDBuild/cc.pm2008-10-05 04:35:22 UTC (rev 736)
+++ trunk/BSDBuild/cc.pm2008-10-05 06:38:22 UTC (rev 737)
&lt; at &gt;&lt; at &gt; -191,7 +191,7 &lt; at &gt;&lt; at &gt;
 }
 EOF
 print &lt;&lt; 'EOF';
-if [ "${compile}" = "ok" ]; then
+if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
 if [ "${with_cygwin}" != "yes" ]; then
 CFLAGS="$CFLAGS -mno-cygwin"
 echo "CFLAGS=$CFLAGS" &gt;&gt; Makefile.config

Modified: trunk/BSDBuild/cxx.pm
===================================================================
--- trunk/BSDBuild/cxx.pm2008-10-05 04:35:22 UTC (rev 736)
+++ trunk/BSDBuild/cxx.pm2008-10-05 06:38:22 UTC (rev 737)
&lt; at &gt;&lt; at &gt; -145,7 +145,7 &lt; at &gt;&lt; at &gt;
 }
 EOF
 print &lt;&lt; 'EOF';
-if [ "${compile}" = "ok" ]; then
+if [ "${MK_COMPILE_STATUS}" = "OK" ]; then
 if [ "${with_cygwin}" != "yes" ]; then
 CXXFLAGS="$CXXFLAGS -mno-cygwin"
 echo "CXXFLAGS=$CXXFLAGS" &gt;&gt; Makefile.config
</description>
    <dc:creator>BSDBuild-SVN</dc:creator>
    <dc:date>2008-10-05T06:38:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/42">
    <title>BSDBuild: r736 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/42</link>
    <description>Author: vedge
Date: 2008-10-05 01:35:22 -0300 (Sun, 05 Oct 2008)
New Revision: 736

Modified:
   trunk/BSDBuild/Core.pm
Log:
fix code in TryCompile()


Modified: trunk/BSDBuild/Core.pm
===================================================================
--- trunk/BSDBuild/Core.pm2008-10-05 03:58:31 UTC (rev 735)
+++ trunk/BSDBuild/Core.pm2008-10-05 04:35:22 UTC (rev 736)
&lt; at &gt;&lt; at &gt; -281,7 +281,7 &lt; at &gt;&lt; at &gt;
 
 sub TryCompile
 {
-my $define = shift;
+my ($define, $code) = &lt; at &gt;_;
 
 print &lt;&lt; "EOF";
 MK_CACHED="No"
</description>
    <dc:creator>BSDBuild-SVN</dc:creator>
    <dc:date>2008-10-05T04:35:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/41">
    <title>BSDBuild: r735 - in trunk: . BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/41</link>
    <description>Author: vedge
Date: 2008-10-05 00:58:31 -0300 (Sun, 05 Oct 2008)
New Revision: 735

Removed:
   trunk/BSDBuild/agar-sc.pm
   trunk/BSDBuild/agar-sg.pm
Modified:
   trunk/BSDBuild/Core.pm
   trunk/BSDBuild/Makefile
   trunk/BSDBuild/agar-core.pm
   trunk/BSDBuild/agar-dev.pm
   trunk/BSDBuild/agar-map.pm
   trunk/BSDBuild/agar-net.pm
   trunk/BSDBuild/agar-rg.pm
   trunk/BSDBuild/agar-vg.pm
   trunk/BSDBuild/agar.pm
   trunk/BSDBuild/edacious.pm
   trunk/BSDBuild/freesg.pm
   trunk/mkconfigure.pl
Log:
- implement --cache option.
- warn users about multiple instances of "foo-config" scripts in $PATH.


Modified: trunk/BSDBuild/Core.pm
===================================================================
--- trunk/BSDBuild/Core.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/Core.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -71,23 +71,101 &lt; at &gt;&lt; at &gt;
 EOF
 }
 
-# Read the output of a program into a variable.
-# Set an empty string if the binary is not found.
+# Write the standard output of a program into variable "$define".
+# Set an empty string and $MK_EXEC_FOUND="No" if the binary is not found.
 sub MkExecOutput
 {
 my ($bin, $args, $define) = &lt; at &gt;_;
 
 print &lt;&lt; "EOF";
-$define=""
-for path in `echo \$PATH | sed 's/:/ /g'`; do
-if [ -x "\${path}/$bin" ]; then
-$define=`\${path}/$bin $args`
-break
+MK_EXEC_FOUND="No"
+MK_CACHED="No"
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/exec-$define" ]; then
+$define=`cat \${cache}/exec-$define`
+MK_EXEC_FOUND=`cat \${cache}/exec-found-$define`
+MK_CACHED="Yes"
 fi
-done
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+$define=""
+for path in `echo \$PATH | sed 's/:/ /g'`; do
+if [ -x "\${path}/$bin" ]; then
+$define=`\${path}/$bin $args`
+MK_EXEC_FOUND="Yes"
+break
+fi
+done
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/exec-$define
+echo \$MK_EXEC_FOUND &gt; \${cache}/exec-found-$define
+fi
+fi
 EOF
 }
 
+# 
+# Variant of MkExecOutput() which warns when binary exists multiple
+# times in the $PATH. If binary exists once, set $MK_EXEC_UNIQUE="Yes"..
+# 
+sub MkExecOutputUnique
+{
+my ($bin, $args, $define) = &lt; at &gt;_;
+
+print &lt;&lt; "EOF";
+MK_EXEC_FOUND="No"
+MK_CACHED="No"
+MK_EXEC_UNIQUE="No"
+MK_EXEC_FOUND_PATH=""
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/exec-$define" ]; then
+$define=`cat \${cache}/exec-$define`
+MK_EXEC_FOUND=`cat \${cache}/exec-found-$define`
+MK_EXEC_FOUND_PATH=`cat \${cache}/exec-found-path-$define`
+MK_CACHED="Yes"
+fi
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+$define=""
+for path in `echo \$PATH | sed 's/:/ /g'`; do
+if [ -x "\${path}/$bin" ]; then
+if [ "\$MK_EXEC_FOUND" = "Yes" ]; then
+echo "yes."
+echo "* Warning: Multiple '$bin' exist in PATH (using \$MK_EXEC_FOUND_PATH)"
+echo "* Warning: Multiple '$bin' exist in PATH (using \$MK_EXEC_FOUND_PATH)" &gt;&gt; config.log
+break;
+fi
+$define=`\${path}/$bin $args`
+MK_EXEC_FOUND="Yes"
+MK_EXEC_FOUND_PATH="\${path}/$bin"
+fi
+done
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/exec-$define
+echo \$MK_EXEC_FOUND &gt; \${cache}/exec-found-$define
+echo \$MK_EXEC_FOUND_PATH &gt; \${cache}/exec-found-path-$define
+fi
+fi
+EOF
+}
+
+# Write contents of a file into variable "$define".
+# Set an empty string and $MK_FILE_FOUND="No" if the file is not found..
+sub MkFileOutput
+{
+my ($file, $define) = &lt; at &gt;_;
+
+print &lt;&lt; "EOF";
+MK_FILE_FOUND="No"
+if [ -e "$file" ]; then
+$define="`cat $file`"
+MK_FILE_FOUND="Yes"
+else
+$define=""
+fi
+EOF
+}
+
 # Return the absolute path name of a binary into a variable.
 # Set an empty string if the binary is not found.
 sub Which
&lt; at &gt;&lt; at &gt; -203,35 +281,47 &lt; at &gt;&lt; at &gt;
 
 sub TryCompile
 {
-my $def = shift;
+my $define = shift;
 
-while (my $code = shift) {
-print &lt;&lt; "EOF";
-cat &lt;&lt; EOT &gt; conftest.c
+print &lt;&lt; "EOF";
+MK_CACHED="No"
+MK_COMPILE_STATUS="OK"
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/ctest-$define" ]; then
+$define=`cat \${cache}/ctest-$define`
+MK_COMPILE_STATUS=`cat \${cache}/ctest-status-$define`
+MK_CACHED="Yes"
+fi
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+cat &lt;&lt; EOT &gt; conftest.c
 $code
 EOT
+echo "\$CC \$CFLAGS \$TEST_CFLAGS -o \$testdir/conftest conftest.c" &gt;&gt;config.log
+\$CC \$CFLAGS \$TEST_CFLAGS -o \$testdir/conftest conftest.c 2&gt;&gt;config.log
+if [ \$? != 0 ]; then
+echo "-&gt; failed (\$?)" &gt;&gt; config.log
+MK_COMPILE_STATUS="FAIL(\$?)"
+fi
+fi
 EOF
-print &lt;&lt; 'EOF';
-compile="ok"
-echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" &gt;&gt;config..log
-$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c 2&gt;&gt;config.log
-if [ $? != 0 ]; then
-echo "-&gt; failed ($?)" &gt;&gt; config.log
-compile="failed"
+
+MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+MkPrint('yes');
+MkDefine($define, 'yes');
+MkSaveDefine($define);
+MkElse;
+MkPrint('no');
+MkDefine($define, 'no');
+MkSaveUndef($define);
+MkEndif;
+
+print &lt;&lt; "EOF";
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/ctest-$define
+echo \$MK_COMPILE_STATUS &gt; \${cache}/ctest-status-$define
 fi
-rm -f $testdir/conftest conftest.c
 EOF
-
-MkIf('"${compile}" = "ok"');
-MkPrint('yes');
-MkDefine($def, 'yes');
-MkSaveDefine($def);
-MkElse;
-MkPrint('no');
-MkDefine($def, 'no');
-MkSaveUndef($def);
-MkEndif;
-}
 }
 
 sub BeginTestHeaders
&lt; at &gt;&lt; at &gt; -308,10 +398,7 &lt; at &gt;&lt; at &gt;
 #
 sub MkCompileAndRunC
 {
-my $define = shift;
-my $cflags = shift;
-my $libs = shift;
-my $code = shift;
+my ($define, $cflags, $libs, $code) = &lt; at &gt;_;
 
 print &lt;&lt; "EOF";
 cat &lt;&lt; EOT &gt; conftest.c
&lt; at &gt;&lt; at &gt; -383,64 +470,89 &lt; at &gt;&lt; at &gt;
 
 sub TryCompileFlagsC
 {
-my $define = shift;
-my $flags = shift;
+my ($define, $flags, $code) = &lt; at &gt;_;
 
-while (my $code = shift) {
-print &lt;&lt; "EOF";
-cat &lt;&lt; EOT &gt; conftest.c
+print &lt;&lt; "EOF";
+MK_CACHED="No"
+MK_COMPILE_STATUS="OK"
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/ctest-$define" ]; then
+$define=`cat \${cache}/ctest-$define`
+MK_COMPILE_STATUS=`cat \${cache}/ctest-status-$define`
+MK_CACHED="Yes"
+fi
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+cat &lt;&lt; EOT &gt; conftest.c
 $code
 EOT
+echo "\$CC \$CFLAGS \$TEST_CFLAGS $flags -o \$testdir/conftest conftest..c" &gt;&gt;config.log
+\$CC \$CFLAGS \$TEST_CFLAGS $flags -o \$testdir/conftest conftest.c 2&gt;&gt;config.log
+if [ \$? != 0 ]; then
+echo "-&gt; failed (\$?)" &gt;&gt; config.log
+MK_COMPILE_STATUS="FAIL(\$?)"
+fi
+fi
 EOF
-print &lt;&lt; "EOF";
-compile="ok"
-echo "\$CC \$CFLAGS \$TEST_CFLAGS $flags -o \$testdir/conftest conftest.c" &gt;&gt;config.log
-\$CC \$CFLAGS \$TEST_CFLAGS $flags -o \$testdir/conftest conftest.c 2&gt;&gt;config.log
-if [ \$? != 0 ]; then
-echo "-&gt; failed (\$?)" &gt;&gt; config.log
-compile="failed"
+
+MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+MkPrint('yes');
+MkSaveCompileSuccess($define);
+MkElse;
+MkPrint('no');
+MkSaveCompileFailed($define);
+MkEndif;
+
+print &lt;&lt; "EOF";
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/ctest-$define
+echo \$MK_COMPILE_STATUS &gt; \${cache}/ctest-status-$define
 fi
 rm -f \$testdir/conftest conftest.c
 EOF
-MkIf('"${compile}" = "ok"');
-MkPrint('yes');
-MkSaveCompileSuccess($define);
-MkElse;
-MkPrint('no');
-MkSaveCompileFailed($define);
-MkEndif;
-}
 }
 
 sub TryCompileFlagsCXX
 {
-my $define = shift;
-my $flags = shift;
+my ($define, $flags, $code) = &lt; at &gt;_;
 
-while (my $code = shift) {
-print &lt;&lt; "EOF";
-cat &lt;&lt; EOT &gt; conftest.cpp
+print &lt;&lt; "EOF";
+MK_CACHED="No"
+MK_COMPILE_STATUS="OK"
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/cxxtest-$define" ]; then
+$define=`cat \${cache}/cxxtest-$define`
+MK_COMPILE_STATUS=`cat \${cache}/cxxtest-status-$define`
+MK_CACHED="Yes"
+fi
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+cat &lt;&lt; EOT &gt; conftest.cpp
 $code
 EOT
+echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $flags -o \$testdir/conftest conftest.cpp" &gt;&gt;config.log
+\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $flags -o \$testdir/conftest conftest.cpp 2&gt;&gt;config.log
+if [ \$? != 0 ]; then
+echo "-&gt; failed (\$?)" &gt;&gt; config.log
+MK_COMPILE_STATUS="FAIL(\$?)"
+fi
+fi
 EOF
-print &lt;&lt; "EOF";
-compile="ok"
-echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $flags -o \$testdir/conftest conftest.cpp" &gt;&gt;config.log
-\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $flags -o \$testdir/conftest conftest.cpp 2&gt;&gt;config.log
-if [ \$? != 0 ]; then
-echo "-&gt; failed (\$?)" &gt;&gt; config.log
-compile="failed"
+MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+MkPrint('yes');
+MkSaveCompileSuccess($define);
+MkElse;
+MkPrint('no');
+MkSaveCompileFailed($define);
+MkEndif;
+
+print &lt;&lt; "EOF";
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/cxxtest-$define
+echo \$MK_COMPILE_STATUS &gt; \${cache}/cxxtest-status-$define
 fi
 rm -f \$testdir/conftest conftest.cpp
 EOF
-MkIf('"${compile}" = "ok"');
-MkPrint('yes');
-MkSaveCompileSuccess($define);
-MkElse;
-MkPrint('no');
-MkSaveCompileFailed($define);
-MkEndif;
-}
 }
 
 #
&lt; at &gt;&lt; at &gt; -452,32 +564,46 &lt; at &gt;&lt; at &gt;
 #
 sub MkCompileC
 {
-my $define = shift;
-my $cflags = shift;
-my $libs = shift;
+my ($define, $cflags, $libs, $code) = &lt; at &gt;_;
 
-while (my $code = shift) {
-print &lt;&lt; "EOF";
-cat &lt;&lt; EOT &gt; conftest.c
+print &lt;&lt; "EOF";
+MK_CACHED="No"
+MK_COMPILE_STATUS="OK"
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/ctest-$define" ]; then
+$define=`cat \${cache}/ctest-$define`
+MK_COMPILE_STATUS=`cat \${cache}/ctest-status-$define`
+MK_CACHED="Yes"
+fi
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+cat &lt;&lt; EOT &gt; conftest.c
 $code
 EOT
+echo "\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest.c $libs" &gt;&gt;config.log
+\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest.c $libs 2&gt;&gt;config.log
+if [ \$? != 0 ]; then
+echo "-&gt; failed (\$?)" &gt;&gt; config.log
+MK_COMPILE_STATUS="FAIL(\$?)"
+fi
+fi
 EOF
-print &lt;&lt; "EOF";
-echo "\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest..c $libs" &gt;&gt;config.log
-\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest.c $libs 2&gt;&gt;config.log
+
+MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+MkPrint('yes');
+MkSaveCompileSuccess($define);
+MkElse;
+MkPrint('no');
+MkSaveCompileFailed($define);
+MkEndif;
+
+print &lt;&lt; "EOF";
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/ctest-$define
+echo \$MK_COMPILE_STATUS &gt; \${cache}/ctest-status-$define
+fi
+rm -f \$testdir/conftest conftest.c
 EOF
-MkIf('"$?" = "0"');
-MkPrint('yes');
-MkDefine('compile', 'ok');
-MkSaveCompileSuccess($define);
-MkElse;
-MkPrint('no');
-MkDefine('compile', 'failed');
-MkSaveCompileFailed($define);
-MkEndif;
-
-print 'rm -f $testdir/conftest conftest.c', "\n";
-}
 }
 
 #
&lt; at &gt;&lt; at &gt; -489,32 +615,47 &lt; at &gt;&lt; at &gt;
 #
 sub MkCompileCXX
 {
-my $define = shift;
-my $cxxflags = shift;
-my $libs = shift;
+my ($define, $cxxflags, $libs, $code) = &lt; at &gt;_;
 
-while (my $code = shift) {
-print &lt;&lt; "EOF";
-cat &lt;&lt; EOT &gt; conftest.cpp
+print &lt;&lt; "EOF";
+MK_CACHED="No"
+MK_COMPILE_STATUS="OK"
+if [ "\${cache}" != "" ]; then
+if [ -e "\${cache}/cxxtest-$define" ]; then
+$define=`cat \${cache}/cxxtest-$define`
+MK_COMPILE_STATUS=`cat \${cache}/cxxtest-status-$define`
+MK_CACHED="Yes"
+fi
+fi
+if [ "\${MK_CACHED}" = "No" ]; then
+cat &lt;&lt; EOT &gt; conftest.cpp
 $code
 EOT
+echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp $libs" &gt;&gt;config.log
+\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp $libs 2&gt;&gt;config.log
+if [ \$? != 0 ]; then
+echo "-&gt; failed (\$?)" &gt;&gt; config.log
+MK_COMPILE_STATUS="FAIL(\$?)"
+fi
+fi
 EOF
-print &lt;&lt; "EOF";
-echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp $libs" &gt;&gt;config.log
-\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp $libs 2&gt;&gt;config.log
+MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+MkPrint('yes');
+MkDefine('compile', 'ok');
+MkSaveCompileSuccess($define);
+MkElse;
+MkPrint('no');
+MkDefine('compile', 'failed');
+MkSaveCompileFailed($define);
+MkEndif;
+
+print &lt;&lt; "EOF";
+if [ "\${cache}" != "" ]; then
+echo "\$$define" &gt; \${cache}/cxxtest-$define
+echo \$MK_COMPILE_STATUS &gt; \${cache}/cxxtest-status-$define
+fi
+rm -f \$testdir/conftest conftest.cpp
 EOF
-MkIf('"$?" = "0"');
-MkPrint('yes');
-MkDefine('compile', 'ok');
-MkSaveCompileSuccess($define);
-MkElse;
-MkPrint('no');
-MkDefine('compile', 'failed');
-MkSaveCompileFailed($define);
-MkEndif;
-
-print 'rm -f $testdir/conftest conftest.cpp', "\n";
-}
 }
 
 #
&lt; at &gt;&lt; at &gt; -554,7 +695,7 &lt; at &gt;&lt; at &gt;
     $^W = 0;
 
     &lt; at &gt;ISA = qw(Exporter);
-    &lt; at &gt;EXPORT = qw($LUA %TESTS %DESCR MkExecOutput Which MkFail MKSave TryCompile MkCompileC MkCompileCXX MkCompileAndRunC MkCompileAndRunCXX TryCompileFlagsC TryCompileFlagsCXX Log MkDefine MkAppend MkIf MkElif MkElse MkEndif MkSaveMK MkSaveDefine MkSaveUndef MkPrint MkPrintN PmComment PmDefineBool PmDefineString PmIncludePath PmLibPath PmBuildFlag DetectHeaderC BeginTestHeaders EndTestHeaders);
+    &lt; at &gt;EXPORT = qw($LUA %TESTS %DESCR MkExecOutput MkExecOutputUnique MkFileOutput Which MkFail MKSave TryCompile MkCompileC MkCompileCXX MkCompileAndRunC MkCompileAndRunCXX TryCompileFlagsC TryCompileFlagsCXX Log MkDefine MkAppend MkIf MkElif MkElse MkEndif MkSaveMK MkSaveDefine MkSaveUndef MkPrint MkPrintN PmComment PmDefineBool PmDefineString PmIncludePath PmLibPath PmBuildFlag DetectHeaderC BeginTestHeaders EndTestHeaders);
 }
 
 ;1

Modified: trunk/BSDBuild/Makefile
===================================================================
--- trunk/BSDBuild/Makefile2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/Makefile2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -45,8 +45,6 &lt; at &gt;&lt; at &gt;
 agar.pm \
 agar-core.pm \
 agar-net.pm \
-agar-sg.pm \
-agar-sc.pm \
 agar-rg.pm \
 agar-vg.pm \
 agar-map.pm \

Modified: trunk/BSDBuild/agar-core.pm
===================================================================
--- trunk/BSDBuild/agar-core.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-core.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -27,7 +27,7 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-core-config', '--version', 'AGAR_CORE_VERSION');
+MkExecOutputUnique('agar-core-config', '--version', 'AGAR_CORE_VERSION');
 MkIf('"${AGAR_CORE_VERSION}" != ""');
 MkPrint('yes');
 MkExecOutput('agar-core-config', '--cflags', 'AGAR_CORE_CFLAGS');

Modified: trunk/BSDBuild/agar-dev.pm
===================================================================
--- trunk/BSDBuild/agar-dev.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-dev.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -28,8 +28,8 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
-MkExecOutput('agar-dev-config', '--version', 'AGAR_DEV_VERSION');
+MkExecOutputUnique('agar-config', '--version', 'AGAR_VERSION');
+MkExecOutputUnique('agar-dev-config', '--version', 'AGAR_DEV_VERSION');
 MkIf('"${AGAR_VERSION}" != "" -a "${AGAR_DEV_VERSION}" != ""');
 MkPrint('yes');
 MkPrintN('checking whether agar-dev works...');

Modified: trunk/BSDBuild/agar-map.pm
===================================================================
--- trunk/BSDBuild/agar-map.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-map.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -29,8 +29,8 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
-MkExecOutput('agar-map-config', '--version', 'AGAR_MAP_VERSION');
+MkExecOutputUnique('agar-config', '--version', 'AGAR_VERSION');
+MkExecOutputUnique('agar-map-config', '--version', 'AGAR_MAP_VERSION');
 MkIf('"${AGAR_VERSION}" != "" -a "${AGAR_MAP_VERSION}" != ""');
 MkPrint('yes');
 MkPrintN('checking whether agar-map works...');

Modified: trunk/BSDBuild/agar-net.pm
===================================================================
--- trunk/BSDBuild/agar-net.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-net.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -29,7 +29,7 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-net-config', '--version', 'AGAR_NET_VERSION');
+MkExecOutputUnique('agar-net-config', '--version', 'AGAR_NET_VERSION');
 MkIf('"${AGAR_NET_VERSION}" != ""');
 MkPrint('yes');
 MkExecOutput('agar-net-config', '--cflags', 'AGAR_NET_CFLAGS');

Modified: trunk/BSDBuild/agar-rg.pm
===================================================================
--- trunk/BSDBuild/agar-rg.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-rg.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -29,8 +29,8 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
-MkExecOutput('agar-rg-config', '--version', 'AGAR_RG_VERSION');
+MkExecOutputUnique('agar-config', '--version', 'AGAR_VERSION');
+MkExecOutputUnique('agar-rg-config', '--version', 'AGAR_RG_VERSION');
 MkIf('"${AGAR_VERSION}" != "" -a "${AGAR_RG_VERSION}" != ""');
 MkPrint('yes');
 MkPrintN('checking whether agar-rg works...');

Deleted: trunk/BSDBuild/agar-sc.pm

Deleted: trunk/BSDBuild/agar-sg.pm

Modified: trunk/BSDBuild/agar-vg.pm
===================================================================
--- trunk/BSDBuild/agar-vg.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-vg.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -29,8 +29,8 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
-MkExecOutput('agar-vg-config', '--version', 'AGAR_VG_VERSION');
+MkExecOutputUnique('agar-config', '--version', 'AGAR_VERSION');
+MkExecOutputUnique('agar-vg-config', '--version', 'AGAR_VG_VERSION');
 MkIf('"${AGAR_VERSION}" != "" -a "${AGAR_VG_VERSION}" != ""');
 MkPrint('yes');
 MkPrintN('checking whether agar-vg works...');

Modified: trunk/BSDBuild/agar.pm
===================================================================
--- trunk/BSDBuild/agar.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -29,7 +29,7 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
+MkExecOutputUnique('agar-config', '--version', 'AGAR_VERSION');
 MkIf('"${AGAR_VERSION}" != ""');
 MkPrint('yes');
 MkExecOutput('agar-config', '--cflags', 'AGAR_CFLAGS');

Modified: trunk/BSDBuild/edacious.pm
===================================================================
--- trunk/BSDBuild/edacious.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/edacious.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -27,10 +27,10 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
-MkExecOutput('agar-vg-config', '--version', 'AGAR_VG_VERSION');
-MkExecOutput('agar-math-config', '--version', 'AGAR_MATH_VERSION');
-MkExecOutput('edacious-config', '--version', 'EDACIOUS_VERSION');
+MkExecOutputUnique('agar-config', '--version', 'AGAR_VERSION');
+MkExecOutputUnique('agar-vg-config', '--version', 'AGAR_VG_VERSION');
+MkExecOutputUnique('agar-math-config', '--version', 'AGAR_MATH_VERSION');
+MkExecOutputUnique('edacious-config', '--version', 'EDACIOUS_VERSION');
 MkIf('"${AGAR_VERSION}" != "" -a "${AGAR_VG_VERSION}" != "" '.
      '-a "${AGAR_MATH_VERSION}" != "" -a "${EDACIOUS_VERSION}" != ""');
 MkPrint('yes');

Modified: trunk/BSDBuild/freesg.pm
===================================================================
--- trunk/BSDBuild/freesg.pm2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/freesg.pm2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -28,8 +28,8 &lt; at &gt;&lt; at &gt;
 {
 my ($ver) = &lt; at &gt;_;
 
-MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
-MkExecOutput('freesg-config', '--version', 'FREESG_VERSION');
+MkExecOutputUnique('agar-config', '--version', 'AGAR_VERSION');
+MkExecOutputUnique('freesg-config', '--version', 'FREESG_VERSION');
 MkIf('"${AGAR_VERSION}" != "" -a "${FREESG_VERSION}" != ""');
 MkPrint('yes');
 MkPrintN('checking whether FreeSG works...');

Modified: trunk/mkconfigure.pl
===================================================================
--- trunk/mkconfigure.pl2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/mkconfigure.pl2008-10-05 03:58:31 UTC (rev 735)
&lt; at &gt;&lt; at &gt; -142,7 +142,10 &lt; at &gt;&lt; at &gt;
     my $infodir_opt = pack('A' x 25, split('', '--infodir'));
     my $srcdir_opt = pack('A' x 25, split('', '--srcdir'));
     my $testdir_opt = pack('A' x 25, split('', '--testdir'));
+
+    my $cache_opt = pack('A' x 25, split('', '--cache'));
     my $help_opt = pack('A' x 25, split('', '--help'));
+
     my $nls_opt = pack('A' x 25, split('', '--enable-nls'));
     my $gettext_opt = pack('A' x 25, split('', '--with-gettext'));
     my $libtool_opt = pack('A' x 25, split('', '--with-libtool'));
&lt; at &gt;&lt; at &gt; -151,6 +154,7 &lt; at &gt;&lt; at &gt;
     my $manlinks_opt = pack('A' x 25, split('', '--with-manlinks'));
     my $ctags_opt = pack('A' x 25, split('', '--with-ctags'));
     my $docs_opt = pack('A' x 25, split('', '--with-docs'));
+    
     my $debug_opt = pack('A' x 25, split('', '--enable-debug'));
 
     my $regs = join("\n",
&lt; at &gt;&lt; at &gt; -164,15 +168,15 &lt; at &gt;&lt; at &gt;
         "echo \"    $infodir_opt Info directory [\$PREFIX/share/info]\"",
         "echo \"    $srcdir_opt Source tree for concurrent build [.]\"",
         "echo \"    $testdir_opt Directory in which to execute tests [.]\"",
-        "echo \"    $help_opt Display this message\"",
-        "echo \"    $nls_opt Native Language Support [no]\"",
-        "echo \"    $gettext_opt Use gettext tools (msgmerge, ...) [check]\"",
-        "echo \"    $libtool_opt Specify path to libtool [bundled]\"",
-        "echo \"    $cygwin_opt Add cygwin dependencies under cygwin [no]\"",
+        "echo \"    $cache_opt Cache directory for test results [none]\"",
         "echo \"    $manpages_opt Manual pages (-mdoc) [yes]\"",
         "echo \"    $manlinks_opt Manual pages links for functions [no]\"",
         "echo \"    $ctags_opt Automatically generate tag files [no]\"",
         "echo \"    $docs_opt Printable docs (-me/tbl/eqn/pic/refer) [no]\"",
+        "echo \"    $libtool_opt Specify path to libtool [use bundled]\"",
+        "echo \"    $cygwin_opt Add cygwin dependencies under cygwin [no]\"",
+        "echo \"    $nls_opt Native Language Support [no]\"",
+        "echo \"    $gettext_opt Use gettext tools [check]\"",
         "echo \"    $debug_opt Include debugging code [no]\"",
 &lt; at &gt;HELP);
 
&lt; at &gt;&lt; at &gt; -329,6 +333,9 &lt; at &gt;&lt; at &gt;
 --testdir=*)
     testdir=$optarg
     ;;
+--cache=*)
+    cache=$optarg
+    ;;
 *)
     echo "invalid argument: $arg"
     echo "try ./configure --help"
</description>
    <dc:creator>BSDBuild-SVN</dc:creator>
    <dc:date>2008-10-05T03:58:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/40">
    <title>BSDBuild: r734 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/40</link>
    <description>Author: vedge
Date: 2008-10-04 22:55:45 -0300 (Sat, 04 Oct 2008)
New Revision: 734

Modified:
   trunk/build.lib.mk
   trunk/build.man.mk
   trunk/build.po.mk
   trunk/build.prog.mk
   trunk/build.proj.mk
Log:
avoid usage of "echo -n"


Modified: trunk/build.lib.mk
===================================================================
--- trunk/build.lib.mk2008-10-05 01:55:28 UTC (rev 733)
+++ trunk/build.lib.mk2008-10-05 01:55:45 UTC (rev 734)
&lt; at &gt;&lt; at &gt; -334,14 +334,14 &lt; at &gt;&lt; at &gt;
     rm -f ${CLEANFILES}; \
 fi
 &lt; at &gt;if [ -e ".depend" ]; then \
-echo "echo -n &gt;.depend"; \
-echo -n &gt;.depend; \
+echo "echo &gt;.depend"; \
+echo &gt;.depend; \
 fi
 
 cleandir-lib:
 rm -f ${LIBTOOL} ${LIBTOOL_COOKIE} ${LTCONFIG_LOG} config.log tags
 if [ -e "./config/prefix.h" ]; then rm -fr ./config; fi
-if [ -e "Makefile.config" ]; then echo -n &gt;Makefile.config; fi
+if [ -e "Makefile.config" ]; then echo &gt;Makefile.config; fi
 
 install-lib: ${LIBTOOL_COOKIE}
 &lt; at &gt;if [ "${INCL}" != "none" -a "${INCL}" != "none" ]; then \

Modified: trunk/build.man.mk
===================================================================
--- trunk/build.man.mk2008-10-05 01:55:28 UTC (rev 733)
+++ trunk/build.man.mk2008-10-05 01:55:45 UTC (rev 734)
&lt; at &gt;&lt; at &gt; -560,7 +560,7 &lt; at &gt;&lt; at &gt;
 fi
 
 manlinks: Makefile
-echo -n &gt; .manlinks.mk
+echo &gt; .manlinks.mk
 &lt; at &gt;if [ "${MAN2}" != "" ]; then \
 for F in ${MAN2}; do \
 echo "cat $$F |perl ${TOP}/mk/manlinks.pl $$F &gt;&gt;.manlinks.mk"; \

Modified: trunk/build.po.mk
===================================================================
--- trunk/build.po.mk2008-10-05 01:55:28 UTC (rev 733)
+++ trunk/build.po.mk2008-10-05 01:55:45 UTC (rev 734)
&lt; at &gt;&lt; at &gt; -139,7 +139,7 &lt; at &gt;&lt; at &gt;
 
 count:
 &lt; at &gt;for F in ${POS}; do \
-echo -n "$$F: "; \
+echo "$$F"; \
 cat $$F |grep "^msgid " |cut -c 7- |\
     perl -pe '!s/^\"(.*)\"/$$1/' | \
     perl -pe '!s/&lt;.+&gt;//g' | \

Modified: trunk/build.prog.mk
===================================================================
--- trunk/build.prog.mk2008-10-05 01:55:28 UTC (rev 733)
+++ trunk/build.prog.mk2008-10-05 01:55:45 UTC (rev 734)
&lt; at &gt;&lt; at &gt; -285,14 +285,14 &lt; at &gt;&lt; at &gt;
     rm -f ${CLEANFILES}; \
 fi
 &lt; at &gt;if [ -e ".depend" ]; then \
-echo "echo -n &gt;.depend"; \
-echo -n &gt;.depend; \
+echo "echo &gt;.depend"; \
+echo &gt;.depend; \
 fi
 
 cleandir-prog:
 rm -f *.core config.log tags
 if [ -e "./config/prefix.h" ]; then rm -fr ./config; fi
-if [ -e "Makefile.config" ]; then echo -n &gt;Makefile.config; fi
+if [ -e "Makefile.config" ]; then echo &gt;Makefile.config; fi
 
 install-prog:
 &lt; at &gt;if [ ! -e "${BINDIR}" ]; then \

Modified: trunk/build.proj.mk
===================================================================
--- trunk/build.proj.mk2008-10-05 01:55:28 UTC (rev 733)
+++ trunk/build.proj.mk2008-10-05 01:55:45 UTC (rev 734)
&lt; at &gt;&lt; at &gt; -87,11 +87,11 &lt; at &gt;&lt; at &gt;
 /bin/sh ./configure.tmp $$_tgtopts --with-proj-generation; \
 if [ $$? != 0 ]; then \
 echo "configure failed"; \
-echo -n &gt; Makefile.config; \
+echo &gt; Makefile.config; \
 exit 1; \
 fi; \
 rm -f configure.tmp config.log; \
-echo -n &gt;Makefile.config; \
+echo &gt;Makefile.config; \
         perl ${TOP}/mk/cmpfiles.pl; \
         echo "cat Makefile | ${MKPROJFILES} "$$_tgtflav" \
     ${PROJINCLUDES} &gt; ${PREMAKEOUT}";\
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-10-05T01:56:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/39">
    <title>BSDBuild: r733 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/39</link>
    <description>Author: vedge
Date: 2008-10-04 22:55:28 -0300 (Sat, 04 Oct 2008)
New Revision: 733

Modified:
   trunk/mkconcurrent.pl
Log:
+ Makefile.prog to &lt; at &gt;MKFILES


Modified: trunk/mkconcurrent.pl
===================================================================
--- trunk/mkconcurrent.pl2008-10-05 01:54:06 UTC (rev 732)
+++ trunk/mkconcurrent.pl2008-10-05 01:55:28 UTC (rev 733)
&lt; at &gt;&lt; at &gt; -32,6 +32,7 &lt; at &gt;&lt; at &gt;
 $BUILD = '';
 &lt; at &gt;MKFILES = (
 'Makefile.proj',
+'Makefile.prog',
 '\.mk$',
 '\.inc$',
 '^mkdep$',
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-10-05T01:55:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/38">
    <title>BSDBuild: r732 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/38</link>
    <description>Author: vedge
Date: 2008-10-04 22:54:06 -0300 (Sat, 04 Oct 2008)
New Revision: 732

Modified:
   trunk/BSDBuild/pthreads.pm
Log:
test for the pthreadsGC* libraries from Pthreads-w32; patch from Ryan Lindeman.


Modified: trunk/BSDBuild/pthreads.pm
===================================================================
--- trunk/BSDBuild/pthreads.pm2008-09-28 06:05:03 UTC (rev 731)
+++ trunk/BSDBuild/pthreads.pm2008-10-05 01:54:06 UTC (rev 732)
&lt; at &gt;&lt; at &gt; -25,10 +25,36 &lt; at &gt;&lt; at &gt;
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 # USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
 
-my $pthreads_test = &lt;&lt; 'EOF';
+my &lt; at &gt;include_dirs = (
+'/usr/include/pthreads',
+'/usr/local/include',
+'/usr/local/include/pthreads',
+);
+
+my &lt; at &gt;lib_dirs = (
+'/usr/local/lib',
+);
+
+my &lt; at &gt;lib_files = (
+'pthread',
+'pthreadGC1',
+'pthreadGC1d',
+'pthreadGCE1',
+'pthreadGCE1d',
+'pthreadGC2',
+'pthreadGC2d',
+'pthreadGCE2',
+'pthreadGCE2d',
+);
+
+my $test_std = &lt;&lt; 'EOF';
 #include &lt;pthread.h&gt;
 #include &lt;signal.h&gt;
-static void *start_routine(void *arg) { return (NULL); }
+
+static void *start_routine(void *arg)
+{
+return (NULL);
+}
 int main(int argc, char *argv[])
 {
 pthread_mutex_t mutex;
&lt; at &gt;&lt; at &gt; -42,23 +68,82 &lt; at &gt;&lt; at &gt;
 }
 EOF
 
+my $test_xopen = &lt;&lt; 'EOF';
+#include &lt;pthread.h&gt;
+#include &lt;signal.h&gt;
+
+int main(int argc, char *argv[])
+{
+pthread_mutex_t mutex;
+pthread_mutexattr_t mutexattr;
+pthread_mutexattr_settype(&amp;mutexattr, PTHREAD_MUTEX_RECURSIVE);
+pthread_mutex_init(&amp;mutex, &amp;mutexattr);
+return (0);
+}
+EOF
+
+sub SearchIncludes ($)
+{
+my $def = shift;
+
+foreach my $dir (&lt; at &gt;include_dirs) {
+MkIf qq{-f "$dir/pthread.h"};
+MkDefine('PTHREADS_CFLAGS', "-I$dir");
+MkEndif;
+}
+}
+
+sub SearchLibs ($)
+{
+my $def = shift;
+
+foreach my $dir (&lt; at &gt;lib_dirs) {
+foreach my $file (&lt; at &gt;lib_files) {
+MkIf qq{-f "$dir/lib$file.a"};
+MkDefine($def, "-L$dir -l$file");
+MkEndif;
+}
+}
+}
+
 sub TestPthreadsStd
 {
 MkDefine('PTHREADS_CFLAGS', '');
-MkDefine('PTHREADS_LIBS', '-lpthread');
-MkCompileC('HAVE_PTHREADS', '', '${PTHREADS_LIBS}', $pthreads_test);
+MkDefine('PTHREADS_LIBS', "-lpthread");
+
+# Try the standard -lpthread.
+MkCompileC('HAVE_PTHREADS',
+    '${PTHREADS_CFLAGS}', '${PTHREADS_LIBS}',
+    $test_std);
 MkIf('"${HAVE_PTHREADS}" = "yes"');
 MkDefine('CFLAGS', '${CFLAGS} ${PTHREADS_CFLAGS}');
 MkSaveMK('CFLAGS', 'PTHREADS_CFLAGS', 'PTHREADS_LIBS');
 MkSaveDefine('PTHREADS_CFLAGS', 'PTHREADS_LIBS');
 MkElse();
+# Fallback to -pthread.
 MkPrintN('checking for -pthread...');
 MkDefine('PTHREADS_LIBS', '-pthread');
-MkCompileC('HAVE_PTHREADS', '', '${PTHREADS_LIBS}', $pthreads_test);
+MkCompileC('HAVE_PTHREADS',
+    '${PTHREADS_CFLAGS}', '${PTHREADS_LIBS}',
+$test_std);
 MkIf('"${HAVE_PTHREADS}" = "yes"');
 MkDefine('CFLAGS', '${CFLAGS} ${PTHREADS_CFLAGS}');
 MkSaveMK('CFLAGS', 'PTHREADS_CFLAGS','PTHREADS_LIBS');
 MkSaveDefine('PTHREADS_CFLAGS','PTHREADS_LIBS');
+MkElse();
+# Fallback to scanning libs and include files.
+MkDefine('PTHREADS_CFLAGS', '');
+MkDefine('PTHREADS_LIBS', '');
+SearchIncludes('PTHREADS_CFLAGS');
+SearchLibs('PTHREADS_LIBS');
+MkCompileC('HAVE_PTHREADS',
+    '${PTHREADS_CFLAGS}', '${PTHREADS_LIBS}',
+$test_std);
+MkIf('"${HAVE_PTHREADS}" = "yes"');
+MkDefine('CFLAGS', '${CFLAGS} ${PTHREADS_CFLAGS}');
+MkSaveMK('CFLAGS', 'PTHREADS_CFLAGS', 'PTHREADS_LIBS');
+MkSaveDefine('PTHREADS_CFLAGS', 'PTHREADS_LIBS');
+MkEndif();
 MkEndif();
 MkEndif();
 return (0);
&lt; at &gt;&lt; at &gt; -119,33 +204,39 &lt; at &gt;&lt; at &gt;
 sub TestPthreadsXOpenExt
 {
 MkPrintN('checking for the X/Open Threads Extension...');
+
+# Define _XOPEN_SOURCE=600 except under FreeBSD.
 MkIf('"${SYSTEM}" = "FreeBSD"');
-MkDefine('PTHREADS_XOPEN_CFLAGS', '');# Not needed
+MkDefine('PTHREADS_XOPEN_CFLAGS', '');
 MkElse;
 MkDefine('PTHREADS_XOPEN_CFLAGS',
          '-U_XOPEN_SOURCE -D_XOPEN_SOURCE=600');
 MkEndif;
-MkDefine('PTHREADS_XOPEN_LIBS', '-lpthread');
+
+# Try the standard -lpthread
+MkDefine('PTHREADS_XOPEN_LIBS', "-lpthread");
 MkCompileC('HAVE_PTHREADS_XOPEN',
-    '${PTHREADS_XOPEN_CFLAGS}', '${PTHREADS_XOPEN_LIBS}', &lt;&lt; 'EOF');
-#include &lt;pthread.h&gt;
-#include &lt;signal.h&gt;
-
-int main(int argc, char *argv[])
-{
-pthread_mutex_t mutex;
-pthread_mutexattr_t mutexattr;
-pthread_mutexattr_settype(&amp;mutexattr, PTHREAD_MUTEX_RECURSIVE);
-pthread_mutex_init(&amp;mutex, &amp;mutexattr);
-return (0);
-}
-EOF
+    '${PTHREADS_XOPEN_CFLAGS}', '${PTHREADS_XOPEN_LIBS}',
+$test_xopen);
 MkIf('"${HAVE_PTHREADS_XOPEN}" = "yes"');
 MkSaveMK('PTHREADS_XOPEN_CFLAGS', 'PTHREADS_XOPEN_LIBS');
-MkSaveDefine('HAVE_PTHREADS_XOPEN', 'PTHREADS_XOPEN_CFLAGS',
-             'PTHREADS_XOPEN_LIBS');
+MkSaveDefine('HAVE_PTHREADS_XOPEN');
+MkSaveDefine('PTHREADS_XOPEN_CFLAGS', 'PTHREADS_XOPEN_LIBS');
 MkElse;
-MkSaveUndef('HAVE_PTHREADS_XOPEN');
+# Fallback to scanning libraries and includes.
+MkDefine('PTHREADS_XOPEN_LIBS', '');
+SearchLibs('PTHREADS_XOPEN_LIBS');
+SearchIncludes('PTHREADS_XOPEN_CFLAGS');
+MkCompileC('HAVE_PTHREADS_XOPEN',
+    '${PTHREADS_XOPEN_CFLAGS}', '${PTHREADS_XOPEN_LIBS}',
+$test_xopen);
+MkIf('"${HAVE_PTHREADS_XOPEN}" = "yes"');
+MkSaveMK('PTHREADS_XOPEN_CFLAGS', 'PTHREADS_XOPEN_LIBS');
+MkSaveDefine('HAVE_PTHREADS_XOPEN');
+MkSaveDefine('PTHREADS_XOPEN_CFLAGS', 'PTHREADS_XOPEN_LIBS');
+MkElse;
+MkSaveUndef('HAVE_PTHREADS_XOPEN');
+MkEndif;
 MkEndif;
 return (0);
 }
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-10-05T01:54:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/37">
    <title>BSDBuild: r731 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/37</link>
    <description>Author: vedge
Date: 2008-09-28 03:05:03 -0300 (Sun, 28 Sep 2008)
New Revision: 731

Added:
   trunk/BSDBuild/percgi.pm
Modified:
   trunk/BSDBuild/Makefile
Log:
test for PerCGI


Modified: trunk/BSDBuild/Makefile
===================================================================
--- trunk/BSDBuild/Makefile2008-09-27 05:53:00 UTC (rev 730)
+++ trunk/BSDBuild/Makefile2008-09-28 06:05:03 UTC (rev 731)
&lt; at &gt;&lt; at &gt; -86,7 +86,8 &lt; at &gt;&lt; at &gt;
 dyld.pm \
 shl_load.pm \
 float_h.pm \
-agar-math.pm
+agar-math.pm \
+percgi.pm
 
 all:
 

Added: trunk/BSDBuild/percgi.pm
===================================================================
--- trunk/BSDBuild/percgi.pm                        (rev 0)
+++ trunk/BSDBuild/percgi.pm2008-09-28 06:05:03 UTC (rev 731)
&lt; at &gt;&lt; at &gt; -0,0 +1,65 &lt; at &gt;&lt; at &gt;
+# vim:ts=4
+#
+# Copyright (c) 2008 Hypertriton, Inc. &lt;http://hypertriton.com/&gt;
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution..
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
+
+sub Test
+{
+my ($ver) = &lt; at &gt;_;
+
+MkExecOutput('percgi-config', '--version', 'PERCGI_VERSION');
+
+MkIf('"${PERCGI_VERSION}" != ""');
+MkPrint('yes');
+MkExecOutput('percgi-config', '--cflags', 'PERCGI_CFLAGS');
+MkExecOutput('percgi-config', '--libs', 'PERCGI_LIBS');
+        MkSaveMK('PERCGI_CFLAGS', 'PERCGI_LIBS');
+        MkSaveDefine('PERCGI_CFLAGS', 'PERCGI_LIBS');
+
+MkPrintN('checking whether PerCGI works...');
+MkCompileC('HAVE_PERCGI', '${PERCGI_CFLAGS}', '${PERCGI_LIBS}',
+           &lt;&lt; 'EOF');
+#include &lt;percgi/cgi.h&gt;
+
+int
+main(int argc, char *argv[])
+{
+CGI_Init(NULL);
+return (0);
+}
+EOF
+MkElse;
+MkPrint('no');
+    MkSaveUndef('HAVE_PERCGI', 'PERCGI_CFLAGS', 'PERCGI_LIBS');
+MkEndif;
+return (0);
+}
+
+BEGIN
+{
+$TESTS{'percgi'} = \&amp;Test;
+$DEPS{'percgi'} = 'cc';
+$DESCR{'percgi'} = 'PerCGI (http://percgi.org/)';
+}
+
+;1
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-09-28T06:05:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/36">
    <title>BSDBuild: r730 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/36</link>
    <description>Author: vedge
Date: 2008-09-27 02:53:00 -0300 (Sat, 27 Sep 2008)
New Revision: 730

Modified:
   trunk/build.proj.mk
Log:
pass --with-proj-generation to configure scripts (useful to avoid symlink
creation, etc).


Modified: trunk/build.proj.mk
===================================================================
--- trunk/build.proj.mk2008-09-27 05:51:54 UTC (rev 729)
+++ trunk/build.proj.mk2008-09-27 05:53:00 UTC (rev 730)
&lt; at &gt;&lt; at &gt; -84,7 +84,7 &lt; at &gt;&lt; at &gt;
 rm -fR configure.tmp configure.lua; \
 exit 1; \
 fi; \
-/bin/sh ./configure.tmp $$_tgtopts; \
+/bin/sh ./configure.tmp $$_tgtopts --with-proj-generation; \
 if [ $$? != 0 ]; then \
 echo "configure failed"; \
 echo -n &gt; Makefile.config; \
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-09-27T05:53:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/35">
    <title>BSDBuild: r729 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/35</link>
    <description>Author: vedge
Date: 2008-09-27 02:51:54 -0300 (Sat, 27 Sep 2008)
New Revision: 729

Modified:
   trunk/mkconfigure.pl
Log:
- don't quote variables in C_INCDIR().
- pre-check for any conflicting ./config files.


Modified: trunk/mkconfigure.pl
===================================================================
--- trunk/mkconfigure.pl2008-09-02 02:27:18 UTC (rev 728)
+++ trunk/mkconfigure.pl2008-09-27 05:51:54 UTC (rev 729)
&lt; at &gt;&lt; at &gt; -70,7 +70,7 &lt; at &gt;&lt; at &gt;
 my $dir = shift;
 my $qdir = $dir;
 
-if ($dir =~ /^\$/) { $qdir = '\"'.$dir.'\"'; }
+#if ($dir =~ /^\$/) { $qdir = '\"'.$dir.'\"'; }
 MkDefine('CFLAGS', '$CFLAGS -I'.$qdir);
 MkDefine('CXXFLAGS', '$CXXFLAGS -I'.$qdir);
 MkSaveMK('CFLAGS');
&lt; at &gt;&lt; at &gt; -84,7 +84,7 &lt; at &gt;&lt; at &gt;
 {
 my $dir = shift;
 
-if ($dir =~ /^\$/) { $qdir = '\"'.$dir.'\"'; }
+#if ($dir =~ /^\$/) { $qdir = '\"'.$dir.'\"'; }
 MkDefine('LIBS', '$LIBS -L'.$dir);
 MkSaveMK('LIBS');
 
&lt; at &gt;&lt; at &gt; -428,7 +428,19 &lt; at &gt;&lt; at &gt;
 do
 echo "Argument: $arg" &gt;&gt; config.log
 done
-mkdir config 1&gt;/dev/null 2&gt;&amp;1
+if [ -e "config" ]; then
+if [ -f "config" ]; then
+echo "File ./config is in the way. Please remove it first."
+exit 1;
+else
+rm -fR config;
+fi
+fi
+mkdir config
+if [ $? != 0 ]; then
+echo "Could not create ./config/ directory."
+exit 1
+fi
 
 HAVE_MANDOC="no"
 NROFF=""
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-09-27T05:52:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/34">
    <title>BSDBuild: r728 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/34</link>
    <description>Author: vedge
Date: 2008-09-01 23:27:18 -0300 (Mon, 01 Sep 2008)
New Revision: 728

Modified:
   trunk/build.lib.mk
   trunk/build.prog.mk
Log:
fix dependencies with in-place builds, don't rely on the BSD make behavior
of including .depend by default; reported by smeuuh&lt; at &gt;


Modified: trunk/build.lib.mk
===================================================================
--- trunk/build.lib.mk2008-09-02 01:49:57 UTC (rev 727)
+++ trunk/build.lib.mk2008-09-02 02:27:18 UTC (rev 728)
&lt; at &gt;&lt; at &gt; -333,10 +333,13 &lt; at &gt;&lt; at &gt;
     echo "rm -f ${CLEANFILES}"; \
     rm -f ${CLEANFILES}; \
 fi
+&lt; at &gt;if [ -e ".depend" ]; then \
+echo "echo -n &gt;.depend"; \
+echo -n &gt;.depend; \
+fi
 
 cleandir-lib:
-rm -f ${LIBTOOL} ${LIBTOOL_COOKIE} ${LTCONFIG_LOG} config.log
-rm -f .depend tags
+rm -f ${LIBTOOL} ${LIBTOOL_COOKIE} ${LTCONFIG_LOG} config.log tags
 if [ -e "./config/prefix.h" ]; then rm -fr ./config; fi
 if [ -e "Makefile.config" ]; then echo -n &gt;Makefile.config; fi
 
&lt; at &gt;&lt; at &gt; -465,3 +468,4 &lt; at &gt;&lt; at &gt;
 include ${TOP}/mk/build.dep.mk
 include ${TOP}/mk/build.proj.mk
 include ${TOP}/mk/build.subdir.mk
+include .depend

Modified: trunk/build.prog.mk
===================================================================
--- trunk/build.prog.mk2008-09-02 01:49:57 UTC (rev 727)
+++ trunk/build.prog.mk2008-09-02 02:27:18 UTC (rev 728)
&lt; at &gt;&lt; at &gt; -284,9 +284,13 &lt; at &gt;&lt; at &gt;
     echo "rm -f ${CLEANFILES}"; \
     rm -f ${CLEANFILES}; \
 fi
+&lt; at &gt;if [ -e ".depend" ]; then \
+echo "echo -n &gt;.depend"; \
+echo -n &gt;.depend; \
+fi
 
 cleandir-prog:
-rm -f core *.core config.log .depend tags
+rm -f *.core config.log tags
 if [ -e "./config/prefix.h" ]; then rm -fr ./config; fi
 if [ -e "Makefile.config" ]; then echo -n &gt;Makefile.config; fi
 
&lt; at &gt;&lt; at &gt; -402,3 +406,4 &lt; at &gt;&lt; at &gt;
 include ${TOP}/mk/build.dep.mk
 include ${TOP}/mk/build.proj.mk
 include ${TOP}/mk/build.subdir.mk
+include .depend
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-09-02T02:27:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/33">
    <title>BSDBuild: r727 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/33</link>
    <description>Author: vedge
Date: 2008-09-01 22:49:57 -0300 (Mon, 01 Sep 2008)
New Revision: 727

Modified:
   trunk/mkconfigure.pl
Log:
in C_INCDIR() and C_LIBDIR(), enquote sh variable references.


Modified: trunk/mkconfigure.pl
===================================================================
--- trunk/mkconfigure.pl2008-09-02 00:48:03 UTC (rev 726)
+++ trunk/mkconfigure.pl2008-09-02 01:49:57 UTC (rev 727)
&lt; at &gt;&lt; at &gt; -68,9 +68,11 &lt; at &gt;&lt; at &gt;
 sub c_incdir
 {
 my $dir = shift;
-
-MkDefine('CFLAGS', '$CFLAGS -I'.$dir);
-MkDefine('CXXFLAGS', '$CXXFLAGS -I'.$dir);
+my $qdir = $dir;
+
+if ($dir =~ /^\$/) { $qdir = '\"'.$dir.'\"'; }
+MkDefine('CFLAGS', '$CFLAGS -I'.$qdir);
+MkDefine('CXXFLAGS', '$CXXFLAGS -I'.$qdir);
 MkSaveMK('CFLAGS');
 MkSaveMK('CXXFLAGS');
 
&lt; at &gt;&lt; at &gt; -80,9 +82,10 &lt; at &gt;&lt; at &gt;
 
 sub c_libdir
 {
-my $def = shift;
+my $dir = shift;
 
-MkDefine('LIBS', '$LIBS -L'.$def);
+if ($dir =~ /^\$/) { $qdir = '\"'.$dir.'\"'; }
+MkDefine('LIBS', '$LIBS -L'.$dir);
 MkSaveMK('LIBS');
 
 $dir =~ s/\$SRC/\./g;
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-09-02T01:50:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/32">
    <title>BSDBuild: r726 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/32</link>
    <description>Author: vedge
Date: 2008-09-01 21:48:03 -0300 (Mon, 01 Sep 2008)
New Revision: 726

Added:
   trunk/BSDBuild/agar-math.pm
Modified:
   trunk/BSDBuild/Makefile
   trunk/BSDBuild/edacious.pm
Log:
test for agar-math


Modified: trunk/BSDBuild/Makefile
===================================================================
--- trunk/BSDBuild/Makefile2008-08-20 00:57:46 UTC (rev 725)
+++ trunk/BSDBuild/Makefile2008-09-02 00:48:03 UTC (rev 726)
&lt; at &gt;&lt; at &gt; -75,7 +75,6 &lt; at &gt;&lt; at &gt;
 so_peercred.pm \
 getpeereid.pm \
 freesg.pm \
-freesg_m.pm \
 math_c99.pm \
 getopt.pm \
 byte_order.pm \
&lt; at &gt;&lt; at &gt; -86,7 +85,8 &lt; at &gt;&lt; at &gt;
 dlopen.pm \
 dyld.pm \
 shl_load.pm \
-float_h.pm
+float_h.pm \
+agar-math.pm
 
 all:
 

Added: trunk/BSDBuild/agar-math.pm
===================================================================
--- trunk/BSDBuild/agar-math.pm                        (rev 0)
+++ trunk/BSDBuild/agar-math.pm2008-09-02 00:48:03 UTC (rev 726)
&lt; at &gt;&lt; at &gt; -0,0 +1,123 &lt; at &gt;&lt; at &gt;
+# vim:ts=4
+#
+# Copyright (c) 2008 Hypertriton, Inc. &lt;http://hypertriton.com/&gt;
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution..
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
+
+sub Test
+{
+my ($ver) = &lt; at &gt;_;
+
+MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
+MkExecOutput('agar-math-config', '--version', 'AGAR_MATH_VERSION');
+MkIf('"${AGAR_VERSION}" != "" -a "${AGAR_MATH_VERSION}" != ""');
+MkPrint('yes');
+MkPrintN('checking whether FreeSG works...');
+MkExecOutput('agar-config', '--cflags', 'AGAR_CFLAGS');
+MkExecOutput('agar-config', '--libs', 'AGAR_LIBS');
+MkExecOutput('agar-math-config', '--cflags', 'AGAR_MATH_CFLAGS');
+MkExecOutput('agar-math-config', '--libs', 'AGAR_MATH_LIBS');
+MkCompileC('HAVE_AGAR_MATH',
+    '${AGAR_MATH_CFLAGS} ${AGAR_CFLAGS}',
+    '${AGAR_MATH_LIBS} ${AGAR_LIBS}',
+           &lt;&lt; 'EOF');
+#include &lt;agar/core.h&gt;
+#include &lt;agar/math.h&gt;
+int main(int argc, char *argv[]) {
+M_Matrix *A = M_New(2,2);
+AG_InitCore("test", 0);
+M_InitSubsystem();
+M_SetIdentity(A);
+AG_Destroy();
+return (0);
+}
+EOF
+MkIf('"${HAVE_AGAR_MATH}" != ""');
+MkSaveMK('AGAR_MATH_CFLAGS', 'AGAR_MATH_LIBS');
+MkSaveDefine('AGAR_MATH_CFLAGS', 'AGAR_MATH_LIBS');
+MkEndif;
+MkElse;
+MkPrint('no');
+MkSaveUndef('HAVE_AGAR_MATH', 'AGAR_MATH_CFLAGS', 'AGAR_MATH_LIBS');
+MkEndif;
+return (0);
+}
+
+sub Emul
+{
+my ($os, $osrel, $machine) = &lt; at &gt;_;
+
+if ($os eq 'darwin') {
+MkDefine('AGAR_MATH_CFLAGS', '-I/opt/local/include/agar '.
+                             '-I/opt/local/include '.
+                             '-I/usr/local/include/agar '.
+         '-I/usr/local/include '.
+                             '-I/usr/include/agar -I/usr/include '.
+                             '-D_THREAD_SAFE');
+MkDefine('AGAR_MATH_LIBS', '-L/usr/lib -L/opt/local/lib '.
+                           '-L/usr/local/lib -L/usr/X11R6/lib '.
+                           '-lag_math');
+} elsif ($os eq 'windows') {
+MkDefine('AGAR_MATH_CFLAGS', '');
+MkDefine('AGAR_MATH_LIBS', 'ag_math');
+} elsif ($os eq 'linux' || $os =~ /^(open|net|free)bsd$/) {
+MkDefine('AGAR_MATH_CFLAGS', '-I/usr/include/agar -I/usr/include '.
+                             '-I/usr/local/include/agar '.
+         '-I/usr/local/include ');
+MkDefine('AGAR_MATH_LIBS', '-L/usr/local/lib -lag_math');
+} else {
+goto UNAVAIL;
+}
+MkDefine('HAVE_AGAR_MATH', 'yes');
+MkSaveDefine('HAVE_AGAR_MATH', 'AGAR_MATH_CFLAGS', 'AGAR_MATH_LIBS');
+MkSaveMK('AGAR_MATH_CFLAGS', 'AGAR_MATH_LIBS');
+return (1);
+UNAVAIL:
+MkDefine('HAVE_AGAR_MATH', 'no');
+MkSaveUndef('HAVE_AGAR_MATH');
+MkSaveMK('AGAR_MATH_CFLAGS', 'AGAR_MATH_LIBS');
+return (1);
+}
+
+sub Link
+{
+my $var = shift;
+
+if ($var eq 'ag_math') {
+print &lt;&lt; 'EOF';
+tinsert(package.links, { "ag_math" })
+EOF
+return (1);
+}
+return (0);
+}
+
+BEGIN
+{
+$TESTS{'agar-math'} = \&amp;Test;
+$DESCR{'agar-math'} = 'Agar-Math library (http://libagar.org/)';
+$DEPS{'agar-math'} = 'cc,agar';
+$EMUL{'agar-math'} = \&amp;Emul;
+$LINK{'agar-math'} = \&amp;Link;
+}
+
+;1

Modified: trunk/BSDBuild/edacious.pm
===================================================================
--- trunk/BSDBuild/edacious.pm2008-08-20 00:57:46 UTC (rev 725)
+++ trunk/BSDBuild/edacious.pm2008-09-02 00:48:03 UTC (rev 726)
&lt; at &gt;&lt; at &gt; -29,24 +29,24 &lt; at &gt;&lt; at &gt;
 
 MkExecOutput('agar-config', '--version', 'AGAR_VERSION');
 MkExecOutput('agar-vg-config', '--version', 'AGAR_VG_VERSION');
-MkExecOutput('freesg-config', '--version', 'FREESG_VERSION');
+MkExecOutput('agar-math-config', '--version', 'AGAR_MATH_VERSION');
 MkExecOutput('edacious-config', '--version', 'EDACIOUS_VERSION');
 MkIf('"${AGAR_VERSION}" != "" -a "${AGAR_VG_VERSION}" != "" '.
-     '-a "${FREESG_VERSION}" != "" -a "${EDACIOUS_VERSION}" != ""');
+     '-a "${AGAR_MATH_VERSION}" != "" -a "${EDACIOUS_VERSION}" != ""');
 MkPrint('yes');
 MkPrintN('checking whether Edacious works...');
 MkExecOutput('agar-config', '--cflags', 'AGAR_CFLAGS');
 MkExecOutput('agar-config', '--libs', 'AGAR_LIBS');
 MkExecOutput('agar-vg-config', '--cflags', 'AGAR_VG_CFLAGS');
 MkExecOutput('agar-vg-config', '--libs', 'AGAR_VG_LIBS');
-MkExecOutput('freesg-config', '--cflags', 'FREESG_CFLAGS');
-MkExecOutput('freesg-config', '--libs', 'FREESG_LIBS');
+MkExecOutput('agar-math-config', '--cflags', 'AGAR_MATH_CFLAGS');
+MkExecOutput('agar-math-config', '--libs', 'AGAR_MATH_LIBS');
 MkExecOutput('edacious-config', '--cflags', 'EDACIOUS_CFLAGS');
 MkExecOutput('edacious-config', '--libs', 'EDACIOUS_LIBS');
 MkCompileC('HAVE_EDACIOUS',
-    '${EDACIOUS_CFLAGS} ${FREESG_CFLAGS} ${AGAR_VG_CFLAGS} '.
+    '${EDACIOUS_CFLAGS} ${AGAR_MATH_CFLAGS} ${AGAR_VG_CFLAGS} '.
 '${AGAR_CFLAGS}',
-    '${EDACIOUS_LIBS} ${FREESG_LIBS} ${AGAR_VG_LIBS} '.
+    '${EDACIOUS_LIBS} ${AGAR_MATH_LIBS} ${AGAR_VG_LIBS} '.
 '${AGAR_LIBS}',
            &lt;&lt; 'EOF');
 #include &lt;edacious/core.h&gt;
&lt; at &gt;&lt; at &gt; -85,7 +85,7 &lt; at &gt;&lt; at &gt;
 {
 $TESTS{'edacious'} = \&amp;Test;
 $DESCR{'edacious'} = 'Edacious (http://edacious.hypertriton.com/)';
-$DEPS{'edacious'} = 'cc,agar,agar-vg,freesg';
+$DEPS{'edacious'} = 'cc,agar,agar-vg,agar-math';
 $LINK{'edacious'} = \&amp;Link;
 }
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-09-02T00:48:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/31">
    <title>BSDBuild: r725 - trunk/man</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/31</link>
    <description>Author: vedge
Date: 2008-08-19 21:57:46 -0300 (Tue, 19 Aug 2008)
New Revision: 725

Modified:
   trunk/man/build.lib.mk.5
   trunk/man/build.prog.mk.5
Log:
document LIBDIR and BINDIR


Modified: trunk/man/build.lib.mk.5
===================================================================
--- trunk/man/build.lib.mk.52008-08-19 11:00:07 UTC (rev 724)
+++ trunk/man/build.lib.mk.52008-08-20 00:57:46 UTC (rev 725)
&lt; at &gt;&lt; at &gt; -76,6 +76,9 &lt; at &gt;&lt; at &gt;
 .It Ev LIB
 Name of target library.
 Platform-specific transforms will be applied to the name.
+.It Ev LIBDIR
+Target installation directory for libraries
+(usually set by configure).
 .It Ev LIB_INSTALL
 If set to
 .Sq Yes ,

Modified: trunk/man/build.prog.mk.5
===================================================================
--- trunk/man/build.prog.mk.52008-08-19 11:00:07 UTC (rev 724)
+++ trunk/man/build.prog.mk.52008-08-20 00:57:46 UTC (rev 725)
&lt; at &gt;&lt; at &gt; -87,6 +87,9 &lt; at &gt;&lt; at &gt;
 for a server program.
 Defaults to
 .Sq CLI .
+.It Ev BINDIR
+Target installation directory for executables
+(usually set by configure).
 .It Ev PROG_INSTALL
 If set to
 .Sq Yes ,
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-08-20T00:58:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/30">
    <title>BSDBuild: r724 - trunk</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/30</link>
    <description>Author: vedge
Date: 2008-08-19 08:00:07 -0300 (Tue, 19 Aug 2008)
New Revision: 724

Modified:
   trunk/h2mandoc.pl
Log:
fix no .Ft case


Modified: trunk/h2mandoc.pl
===================================================================
--- trunk/h2mandoc.pl2008-08-19 10:58:07 UTC (rev 723)
+++ trunk/h2mandoc.pl2008-08-19 11:00:07 UTC (rev 724)
&lt; at &gt;&lt; at &gt; -110,13 +110,15 &lt; at &gt;&lt; at &gt;
 my $fnName = $1;
 my $argList = $2;
 $type =~ s/\n//g;
-print '.Ft "'.$type."\"\n";
-print '.Fn '.$fnName;
-foreach my $arg (split(',', $argList)) {
-$arg =~ s/\s*([\w\s]+)\s*/$1/g;
-print ' "'.$arg.'"';
+if ($type) {
+print '.Ft "'.$type."\"\n";
+print '.Fn '.$fnName;
+foreach my $arg (split(',', $argList)) {
+$arg =~ s/\s*([\w\s]+)\s*/$1/g;
+print ' "'.$arg.'"';
+}
+print "\n.Pp\n";
 }
-print "\n.Pp\n";
 }
 }
 }
&lt; at &gt;&lt; at &gt; -129,5 +131,4 &lt; at &gt;&lt; at &gt;
 The
 .Nm
 interface first appeared in FOO 1.3.
-.nr nS 0
 EOF
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-08-19T11:00:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/29">
    <title>BSDBuild: r722 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/29</link>
    <description>Author: vedge
Date: 2008-08-19 07:57:50 -0300 (Tue, 19 Aug 2008)
New Revision: 722

Modified:
   trunk/BSDBuild/Makefile
Log:
+ dlopen, etc.


Modified: trunk/BSDBuild/Makefile
===================================================================
--- trunk/BSDBuild/Makefile2008-08-19 10:57:37 UTC (rev 721)
+++ trunk/BSDBuild/Makefile2008-08-19 10:57:50 UTC (rev 722)
&lt; at &gt;&lt; at &gt; -82,7 +82,11 &lt; at &gt;&lt; at &gt;
 openmgi.pm \
 iconv.pm \
 curl.pm \
-edacious.pm
+edacious.pm \
+dlopen.pm \
+dyld.pm \
+shl_load.pm \
+float_h.pm
 
 all:
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-08-19T10:58:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/28">
    <title>BSDBuild: r721 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/28</link>
    <description>Author: vedge
Date: 2008-08-19 07:57:37 -0300 (Tue, 19 Aug 2008)
New Revision: 721

Modified:
   trunk/BSDBuild/Core.pm
Log:
implement DetectHeaderC()


Modified: trunk/BSDBuild/Core.pm
===================================================================
--- trunk/BSDBuild/Core.pm2008-08-19 10:57:22 UTC (rev 720)
+++ trunk/BSDBuild/Core.pm2008-08-19 10:57:37 UTC (rev 721)
&lt; at &gt;&lt; at &gt; -234,6 +234,53 &lt; at &gt;&lt; at &gt;
 }
 }
 
+sub BeginTestHeaders
+{
+MkDefine('TEST_CFLAGS_ORIG', '${TEST_CFLAGS}');
+MkDefine('TEST_HEADERS', 'Yes');
+}
+
+sub EndTestHeaders
+{
+MkDefine('TEST_CFLAGS', '${TEST_CFLAGS_ORIG}');
+MkDefine('TEST_HEADERS', '');
+}
+
+sub DetectHeaderC
+{
+my $def = shift;
+
+print "echo &gt; conftest.c\n";
+while (my $hdr = shift) {
+print &lt;&lt; "EOF";
+echo "#include $hdr" &gt;&gt; conftest.c
+EOF
+}
+print &lt;&lt; 'EOF';
+echo "int main (int argc, char *argv[]) { return (0); }" &gt;&gt; conftest.c
+EOF
+print &lt;&lt; 'EOF';
+compile="ok"
+echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" &gt;&gt;config..log
+$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c 2&gt;&gt;config.log
+if [ $? != 0 ]; then
+echo "-&gt; failed ($?)" &gt;&gt; config.log
+compile="failed"
+fi
+rm -f $testdir/conftest conftest.c
+EOF
+MkIf('"${compile}" = "ok"');
+MkDefine($def, 'yes');
+MkSaveDefine($def);
+MkIf('"${TEST_HEADERS}" = "Yes"');
+MkDefine('TEST_CFLAGS', "\${TEST_CFLAGS} -D$def");
+MkEndif;
+MkElse;
+MkDefine($def, 'no');
+MkSaveUndef($def);
+MkEndif;
+}
+
 sub MkSaveCompileSuccess ($)
 {
 my $define = shift;
&lt; at &gt;&lt; at &gt; -507,7 +554,7 &lt; at &gt;&lt; at &gt;
     $^W = 0;
 
     &lt; at &gt;ISA = qw(Exporter);
-    &lt; at &gt;EXPORT = qw($LUA %TESTS %DESCR MkExecOutput Which MkFail MKSave TryCompile MkCompileC MkCompileCXX MkCompileAndRunC MkCompileAndRunCXX TryCompileFlagsC TryCompileFlagsCXX Log MkDefine MkAppend MkIf MkElif MkElse MkEndif MkSaveMK MkSaveDefine MkSaveUndef MkPrint MkPrintN PmComment PmDefineBool PmDefineString PmIncludePath PmLibPath PmBuildFlag);
+    &lt; at &gt;EXPORT = qw($LUA %TESTS %DESCR MkExecOutput Which MkFail MKSave TryCompile MkCompileC MkCompileCXX MkCompileAndRunC MkCompileAndRunCXX TryCompileFlagsC TryCompileFlagsCXX Log MkDefine MkAppend MkIf MkElif MkElse MkEndif MkSaveMK MkSaveDefine MkSaveUndef MkPrint MkPrintN PmComment PmDefineBool PmDefineString PmIncludePath PmLibPath PmBuildFlag DetectHeaderC BeginTestHeaders EndTestHeaders);
 }
 
 ;1
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-08-19T10:58:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/27">
    <title>BSDBuild: r720 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/27</link>
    <description>Author: vedge
Date: 2008-08-19 07:57:22 -0300 (Tue, 19 Aug 2008)
New Revision: 720

Added:
   trunk/BSDBuild/dlopen.pm
   trunk/BSDBuild/dyld.pm
   trunk/BSDBuild/shl_load.pm
Log:
test for various dynamic linker interfaces.


Added: trunk/BSDBuild/dlopen.pm
===================================================================
--- trunk/BSDBuild/dlopen.pm                        (rev 0)
+++ trunk/BSDBuild/dlopen.pm2008-08-19 10:57:22 UTC (rev 720)
&lt; at &gt;&lt; at &gt; -0,0 +1,74 &lt; at &gt;&lt; at &gt;
+# vim:ts=4
+#
+# Copyright (c) 2008 Hypertriton, Inc. &lt;http://hypertriton.com/&gt;
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution..
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
+
+sub Test
+{
+my $code = &lt;&lt; 'EOF';
+#ifdef HAVE_DLFCN_H
+#include &lt;dlfcn.h&gt;
+#endif
+
+int
+main(int argc, char *argv[])
+{
+void *handle;
+char *error;
+handle = dlopen("foo.so", 0);
+error = dlerror();
+(void)dlsym(handle, "foo");
+return (0);
+}
+EOF
+
+MkDefine('DSO_CFLAGS', '');
+MkDefine('DSO_LIBS', '');
+
+BeginTestHeaders();
+DetectHeaderC('HAVE_DLFCN_H','&lt;dlfcn.h&gt;');
+TryCompile('HAVE_DLOPEN', $code);
+MkIf('"${HAVE_DLOPEN}" != "yes"');
+MkPrintN('checking for dlopen() in -ldl...');
+TryCompileFlagsC('HAVE_DLOPEN', '-ldl', $code);
+MkIf('"${HAVE_DLOPEN}" = "yes"');
+MkDefine('DSO_CFLAGS', '');
+MkDefine('DSO_LIBS', '-ldl');
+MkEndif;
+MkEndif;
+
+EndTestHeaders();
+
+MkSaveMK('DSO_CFLAGS', 'DSO_LIBS');
+MkSaveDefine('DSO_CFLAGS', 'DSO_LIBS');
+}
+
+BEGIN
+{
+$DESCR{'dlopen'} = 'dlopen() interface';
+$TESTS{'dlopen'} = \&amp;Test;
+$EMUL{'dlopen'} = undef;
+$DEPS{'dlopen'} = 'cc';
+}
+
+;1

Added: trunk/BSDBuild/dyld.pm
===================================================================
--- trunk/BSDBuild/dyld.pm                        (rev 0)
+++ trunk/BSDBuild/dyld.pm2008-08-19 10:57:22 UTC (rev 720)
&lt; at &gt;&lt; at &gt; -0,0 +1,94 &lt; at &gt;&lt; at &gt;
+# vim:ts=4
+#
+# Copyright (c) 2008 Hypertriton, Inc. &lt;http://hypertriton.com/&gt;
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution..
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
+
+sub Test
+{
+MkDefine('DSO_CFLAGS', '');
+MkDefine('DSO_LIBS', '');
+
+BeginTestHeaders();
+DetectHeaderC('HAVE_MACH_O_DYLD_H','&lt;mach-o/dyld.h&gt;');
+
+TryCompile 'HAVE_DYLD', &lt;&lt; 'EOF';
+#ifdef HAVE_MACH_O_DYLD_H
+#include &lt;mach-o/dyld.h&gt;
+#endif
+int
+main(int argc, char *argv[])
+{
+NSObjectFileImage img;
+NSObjectFileImageReturnCode rv;
+
+rv = NSCreateObjectFileImageFromFile("foo", &amp;img);
+return (rv == NSObjectFileImageSuccess);
+}
+EOF
+
+MkIf('"${HAVE_DYLD}" = "Yes"');
+MkPrint('checking for NSLINKMODULE_OPTION_RETURN_ON_ERROR');
+TryCompile 'HAVE_DYLD_RETURN_ON_ERROR', &lt;&lt; 'EOF';
+#ifdef HAVE_MACH_O_DYLD_H
+#include &lt;mach-o/dyld.h&gt;
+#endif
+int
+main(int argc, char *argv[])
+{
+NSObjectFileImage img;
+NSObjectFileImageReturnCode rv;
+void *handle;
+
+rv = NSCreateObjectFileImageFromFile("foo", &amp;img);
+handle = (void *)NSLinkModule(img, "foo",
+    NSLINKMODULE_OPTION_RETURN_ON_ERROR|
+NSLINKMODULE_OPTION_NONE);
+if (handle == NULL) {
+NSLinkEditErrors errs;
+int n;
+const char *f, *s = NULL;
+NSLinkEditError(&amp;errs, &amp;n, &amp;f, &amp;s);
+}
+return (0);
+}
+EOF
+MkElse;
+MkDefine('HAVE_DYLD_RETURN_ON_ERROR', 'no');
+MkSaveUndef('HAVE_DYLD_RETURN_ON_ERROR');
+MkEndif;
+
+EndTestHeaders();
+
+MkSaveMK('DSO_CFLAGS', 'DSO_LIBS');
+MkSaveDefine('DSO_CFLAGS', 'DSO_LIBS');
+}
+
+BEGIN
+{
+$DESCR{'dyld'} = 'dyld interface';
+$TESTS{'dyld'} = \&amp;Test;
+$EMUL{'dyld'} = undef;
+$DEPS{'dyld'} = 'cc';
+}
+
+;1

Added: trunk/BSDBuild/shl_load.pm
===================================================================
--- trunk/BSDBuild/shl_load.pm                        (rev 0)
+++ trunk/BSDBuild/shl_load.pm2008-08-19 10:57:22 UTC (rev 720)
&lt; at &gt;&lt; at &gt; -0,0 +1,71 &lt; at &gt;&lt; at &gt;
+# vim:ts=4
+#
+# Copyright (c) 2008 Hypertriton, Inc. &lt;http://hypertriton.com/&gt;
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution..
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
+
+sub Test
+{
+MkDefine('DSO_CFLAGS', '');
+MkDefine('DSO_LIBS', '');
+
+BeginTestHeaders();
+DetectHeaderC('HAVE_DL_H','&lt;dl.h&gt;');
+
+TryCompileFlagsC 'HAVE_SHL_LOAD', '-ldld', &lt;&lt; 'EOF';
+#ifdef HAVE_DL_H
+#include &lt;dl.h&gt;
+#endif
+
+int
+main(int argc, char *argv[])
+{
+void *handle;
+void **p;
+
+handle = shl_load("foo.so", BIND_IMMEDIATE, 0);
+(void)shl_findsym((shl_t *)&amp;handle, "foo", TYPE_PROCEDURE, p);
+(void)shl_findsym((shl_t *)&amp;handle, "foo", TYPE_DATA, p);
+shl_unload((shl_t)handle);
+return (0);
+}
+EOF
+MkIf('"${HAVE_SHL_LOAD}" = "yes"');
+MkDefine('DSO_CFLAGS', '');
+MkDefine('DSO_LIBS', '-ldld');
+MkEndif;
+
+EndTestHeaders();
+
+MkSaveMK('DSO_CFLAGS', 'DSO_LIBS');
+MkSaveDefine('DSO_CFLAGS', 'DSO_LIBS');
+}
+
+BEGIN
+{
+$DESCR{'shl_load'} = 'shl_load() interface';
+$TESTS{'shl_load'} = \&amp;Test;
+$EMUL{'shl_load'} = undef;
+$DEPS{'shl_load'} = 'cc';
+}
+
+;1
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-08-19T10:58:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/26">
    <title>BSDBuild: r719 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/26</link>
    <description>Author: vedge
Date: 2008-08-19 07:56:11 -0300 (Tue, 19 Aug 2008)
New Revision: 719

Added:
   trunk/BSDBuild/float_h.pm
Log:
test for &lt;float.h&gt;


Added: trunk/BSDBuild/float_h.pm
===================================================================
--- trunk/BSDBuild/float_h.pm                        (rev 0)
+++ trunk/BSDBuild/float_h.pm2008-08-19 10:56:11 UTC (rev 719)
&lt; at &gt;&lt; at &gt; -0,0 +1,42 &lt; at &gt;&lt; at &gt;
+# vim:ts=4
+# Public domain
+
+sub Test
+{
+MkCompileC('_MK_HAVE_FLOAT_H', '', '', &lt;&lt; 'EOF');
+#include &lt;float.h&gt;
+
+int main(int argc, char *argv[]) {
+float flt = 0.0f;
+double dbl = 0.0;
+
+flt += FLT_EPSILON;
+dbl += DBL_EPSILON;
+return (0);
+}
+EOF
+return (0);
+}
+
+sub Emul
+{
+my ($os, $osrel, $machine) = &lt; at &gt;_;
+
+if ($os eq 'linux' || $os eq 'darwin' || $os =~ /^(open|net|free)bsd$/) {
+MkDefine('_MK_HAVE_FLOAT_H', 'yes');
+MkSaveDefine('_MK_HAVE_FLOAT_H');
+} else {
+MkSaveUndef('_MK_HAVE_FLOAT_H');
+}
+return (1);
+}
+
+BEGIN
+{
+$DESCR{'float_h'} = 'compatible &lt;float.h&gt;';
+$TESTS{'float_h'} = \&amp;Test;
+$EMUL{'float_h'} = \&amp;Emul;
+$DEPS{'float_h'} = 'cc';
+}
+
+;1
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-08-19T10:56:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/25">
    <title>BSDBuild: r718 - trunk/BSDBuild</title>
    <link>http://permalink.gmane.org/gmane.comp.sysutils.bsdbuild.scm/25</link>
    <description>Author: vedge
Date: 2008-08-04 12:11:44 -0300 (Mon, 04 Aug 2008)
New Revision: 718

Modified:
   trunk/BSDBuild/unistd_h.pm
Log:
missing &lt;sys/types.h&gt;


Modified: trunk/BSDBuild/unistd_h.pm
===================================================================
--- trunk/BSDBuild/unistd_h.pm2008-07-14 14:22:07 UTC (rev 717)
+++ trunk/BSDBuild/unistd_h.pm2008-08-04 15:11:44 UTC (rev 718)
&lt; at &gt;&lt; at &gt; -29,6 +29,7 &lt; at &gt;&lt; at &gt;
 {
 MkCompileC('_MK_HAVE_UNISTD_H', '', '', &lt;&lt; 'EOF');
 #include &lt;unistd.h&gt;
+#include &lt;sys/types.h&gt;
 int main(int argc, char *argv[]) {
 uid_t uid = 0;
 pid_t pid = 0;
</description>
    <dc:creator>Notices of SVN commits on the BSDBuild source repository</dc:creator>
    <dc:date>2008-08-04T15:11:47</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.sysutils.bsdbuild.scm">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.sysutils.bsdbuild.scm</link>
  </textinput>
</rdf:RDF>
