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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/Core.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -71,23 +71,101 @@
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) = @_;
print << "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" > \${cache}/exec-$define
+ echo \$MK_EXEC_FOUND > \${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) = @_;
+
+ print << "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)" >> 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" > \${cache}/exec-$define
+ echo \$MK_EXEC_FOUND > \${cache}/exec-found-$define
+ echo \$MK_EXEC_FOUND_PATH > \${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) = @_;
+
+ print << "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
@@ -203,35 +281,47 @@
sub TryCompile
{
- my $def = shift;
+ my $define = shift;
- while (my $code = shift) {
- print << "EOF";
-cat << EOT > conftest.c
+ print << "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 << EOT > conftest.c
$code
EOT
+ echo "\$CC \$CFLAGS \$TEST_CFLAGS -o \$testdir/conftest conftest.c"
>>config.log
+ \$CC \$CFLAGS \$TEST_CFLAGS -o \$testdir/conftest conftest.c
2>>config.log
+ if [ \$? != 0 ]; then
+ echo "-> failed (\$?)" >> config.log
+ MK_COMPILE_STATUS="FAIL(\$?)"
+ fi
+fi
EOF
- print << 'EOF';
-compile="ok"
-echo "$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c" >>config..log
-$CC $CFLAGS $TEST_CFLAGS -o $testdir/conftest conftest.c 2>>config.log
-if [ $? != 0 ]; then
- echo "-> failed ($?)" >> 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 << "EOF";
+if [ "\${cache}" != "" ]; then
+ echo "\$$define" > \${cache}/ctest-$define
+ echo \$MK_COMPILE_STATUS > \${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
@@ -308,10 +398,7 @@
#
sub MkCompileAndRunC
{
- my $define = shift;
- my $cflags = shift;
- my $libs = shift;
- my $code = shift;
+ my ($define, $cflags, $libs, $code) = @_;
print << "EOF";
cat << EOT > conftest.c
@@ -383,64 +470,89 @@
sub TryCompileFlagsC
{
- my $define = shift;
- my $flags = shift;
+ my ($define, $flags, $code) = @_;
- while (my $code = shift) {
- print << "EOF";
-cat << EOT > conftest.c
+ print << "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 << EOT > conftest.c
$code
EOT
+ echo "\$CC \$CFLAGS \$TEST_CFLAGS $flags -o \$testdir/conftest
conftest..c" >>config.log
+ \$CC \$CFLAGS \$TEST_CFLAGS $flags -o \$testdir/conftest conftest.c
2>>config.log
+ if [ \$? != 0 ]; then
+ echo "-> failed (\$?)" >> config.log
+ MK_COMPILE_STATUS="FAIL(\$?)"
+ fi
+fi
EOF
- print << "EOF";
-compile="ok"
-echo "\$CC \$CFLAGS \$TEST_CFLAGS $flags -o \$testdir/conftest conftest.c"
>>config.log
-\$CC \$CFLAGS \$TEST_CFLAGS $flags -o \$testdir/conftest conftest.c
2>>config.log
-if [ \$? != 0 ]; then
- echo "-> failed (\$?)" >> config.log
- compile="failed"
+
+ MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+ MkPrint('yes');
+ MkSaveCompileSuccess($define);
+ MkElse;
+ MkPrint('no');
+ MkSaveCompileFailed($define);
+ MkEndif;
+
+print << "EOF";
+if [ "\${cache}" != "" ]; then
+ echo "\$$define" > \${cache}/ctest-$define
+ echo \$MK_COMPILE_STATUS > \${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) = @_;
- while (my $code = shift) {
- print << "EOF";
-cat << EOT > conftest.cpp
+ print << "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 << EOT > conftest.cpp
$code
EOT
+ echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $flags -o \$testdir/conftest
conftest.cpp" >>config.log
+ \$CXX \$CXXFLAGS \$TEST_CXXFLAGS $flags -o \$testdir/conftest
conftest.cpp 2>>config.log
+ if [ \$? != 0 ]; then
+ echo "-> failed (\$?)" >> config.log
+ MK_COMPILE_STATUS="FAIL(\$?)"
+ fi
+fi
EOF
- print << "EOF";
-compile="ok"
-echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $flags -o \$testdir/conftest
conftest.cpp" >>config.log
-\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $flags -o \$testdir/conftest conftest.cpp
2>>config.log
-if [ \$? != 0 ]; then
- echo "-> failed (\$?)" >> config.log
- compile="failed"
+ MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+ MkPrint('yes');
+ MkSaveCompileSuccess($define);
+ MkElse;
+ MkPrint('no');
+ MkSaveCompileFailed($define);
+ MkEndif;
+
+print << "EOF";
+if [ "\${cache}" != "" ]; then
+ echo "\$$define" > \${cache}/cxxtest-$define
+ echo \$MK_COMPILE_STATUS > \${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;
- }
}
#
@@ -452,32 +564,46 @@
#
sub MkCompileC
{
- my $define = shift;
- my $cflags = shift;
- my $libs = shift;
+ my ($define, $cflags, $libs, $code) = @_;
- while (my $code = shift) {
- print << "EOF";
-cat << EOT > conftest.c
+ print << "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 << EOT > conftest.c
$code
EOT
+ echo "\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest
conftest.c $libs" >>config.log
+ \$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest.c
$libs 2>>config.log
+ if [ \$? != 0 ]; then
+ echo "-> failed (\$?)" >> config.log
+ MK_COMPILE_STATUS="FAIL(\$?)"
+ fi
+fi
EOF
- print << "EOF";
-echo "\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest..c
$libs" >>config.log
-\$CC \$CFLAGS \$TEST_CFLAGS $cflags -o \$testdir/conftest conftest.c $libs
2>>config.log
+
+ MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+ MkPrint('yes');
+ MkSaveCompileSuccess($define);
+ MkElse;
+ MkPrint('no');
+ MkSaveCompileFailed($define);
+ MkEndif;
+
+print << "EOF";
+if [ "\${cache}" != "" ]; then
+ echo "\$$define" > \${cache}/ctest-$define
+ echo \$MK_COMPILE_STATUS > \${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";
- }
}
#
@@ -489,32 +615,47 @@
#
sub MkCompileCXX
{
- my $define = shift;
- my $cxxflags = shift;
- my $libs = shift;
+ my ($define, $cxxflags, $libs, $code) = @_;
- while (my $code = shift) {
- print << "EOF";
-cat << EOT > conftest.cpp
+ print << "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 << EOT > conftest.cpp
$code
EOT
+ echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest
conftest.cpp $libs" >>config.log
+ \$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest
conftest.cpp $libs 2>>config.log
+ if [ \$? != 0 ]; then
+ echo "-> failed (\$?)" >> config.log
+ MK_COMPILE_STATUS="FAIL(\$?)"
+ fi
+fi
EOF
- print << "EOF";
-echo "\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest
conftest.cpp $libs" >>config.log
-\$CXX \$CXXFLAGS \$TEST_CXXFLAGS $cxxflags -o \$testdir/conftest conftest.cpp
$libs 2>>config.log
+ MkIf('"${MK_COMPILE_STATUS}" = "OK"');
+ MkPrint('yes');
+ MkDefine('compile', 'ok');
+ MkSaveCompileSuccess($define);
+ MkElse;
+ MkPrint('no');
+ MkDefine('compile', 'failed');
+ MkSaveCompileFailed($define);
+ MkEndif;
+
+print << "EOF";
+if [ "\${cache}" != "" ]; then
+ echo "\$$define" > \${cache}/cxxtest-$define
+ echo \$MK_COMPILE_STATUS > \${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";
- }
}
#
@@ -554,7 +695,7 @@
$^W = 0;
@ISA = qw(Exporter);
- @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);
+ @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/Makefile 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/Makefile 2008-10-05 03:58:31 UTC (rev 735)
@@ -45,8 +45,6 @@
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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-core.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -27,7 +27,7 @@
{
my ($ver) = @_;
- 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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-dev.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -28,8 +28,8 @@
{
my ($ver) = @_;
- 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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-map.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -29,8 +29,8 @@
{
my ($ver) = @_;
- 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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-net.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -29,7 +29,7 @@
{
my ($ver) = @_;
- 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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-rg.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -29,8 +29,8 @@
{
my ($ver) = @_;
- 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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar-vg.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -29,8 +29,8 @@
{
my ($ver) = @_;
- 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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/agar.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -29,7 +29,7 @@
{
my ($ver) = @_;
- 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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/edacious.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -27,10 +27,10 @@
{
my ($ver) = @_;
- 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.pm 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/BSDBuild/freesg.pm 2008-10-05 03:58:31 UTC (rev 735)
@@ -28,8 +28,8 @@
{
my ($ver) = @_;
- 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.pl 2008-10-05 01:55:45 UTC (rev 734)
+++ trunk/mkconfigure.pl 2008-10-05 03:58:31 UTC (rev 735)
@@ -142,7 +142,10 @@
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'));
@@ -151,6 +154,7 @@
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",
@@ -164,15 +168,15 @@
"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]\"",
@HELP);
@@ -329,6 +333,9 @@
--testdir=*)
testdir=$optarg
;;
+ --cache=*)
+ cache=$optarg
+ ;;
*)
echo "invalid argument: $arg"
echo "try ./configure --help"
_______________________________________________
BSDBuild-Commits mailing list
[email protected]
http://mail231.csoft.net/mailman/listinfo/bsdbuild-commits