User: ben
Date: 05/10/14 02:53:52
Modified: xemacs-builds/ben bash-functions build config-inc cvs-update
filter-scratch-wscompile generate-build-values
global-replace gr runcc scratch-wscompile wscompile
wsconfig wsdir
Added: xemacs-builds/ben build-packages crw2
scratch-wscompile-packages
Removed: xemacs-builds/ben info-build-config
Log:
rewrote generate-build-values in perl, to handle configure options for different
versions; added support for building package directories and appropriately filtering the
output; updated runcc for latest builds; new bash-functions for various sorts of
finding/grepping; other changes
Revision Changes Path
1.2 +168 -9 XEmacs/xemacs-builds/ben/bash-functions
Index: bash-functions
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/bash-functions,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- bash-functions 2004/11/13 23:01:07 1.1
+++ bash-functions 2005/10/14 00:53:42 1.2
@@ -20,6 +20,8 @@ else
fi
# echo "Fullpath is $fullpath"
+# Find all files matching $1 (a shell-type wildcard) in the subdirectory
+# tree under .
function fin()
{
if [ -z "$1" ] ; then
@@ -29,6 +31,17 @@ function fin()
fi
}
+# Find all files matching $1 (a shell-type wildcard) in the curent
+# directory, but no subdirs.
+function nfin()
+{
+ if [ -z "$1" ] ; then
+ find . -name . -o -type d -prune -o -print
+ else
+ find . -name . -o -type d -prune -o -name "$1" -print
+ fi
+}
+
function ov()
{
dir=`pwd`
@@ -41,6 +54,46 @@ function ov()
done
}
+# cddn -- cd to the directory that $1 (a file) is in.
+
+function cddn()
+{
+ cd "$dirname($1)"
+}
+
+# cdwhich -- cd to the directory that a program is in. Looks through
+# the path.
+
+function cdwhich()
+{
+ local cmd
+ local wh
+ local oldcmd
+ cmd=$1
+ wh=$(which $cmd)
+
+ while echo "$wh" | perl -ne 'exit !/: aliased to /' ; do
+ oldcmd=$cmd
+ cmd=`echo $wh | perl -pe 's/^.*: aliased to ([^ ]+).*$/$1/'`
+ if [ "$oldcmd" = "$cmd" ] ; then
+ wh=$(which -p "$cmd")
+ if [ -d "$wh" ] ; then
+ cd "$(dirname $wh)"
+ else
+ echo $wh
+ fi
+ else
+ wh=$(which $cmd)
+ fi
+ done
+
+ if [ -f "$wh" ] ; then
+ cd "$(dirname $wh)"
+ else
+ echo $wh
+ fi
+}
+
function dorec()
{
find . | xargs "$@"
@@ -89,8 +142,61 @@ function rg()
-name "*.mo" -o \
-name "image.0*" -o \
-name "*.xpm" -o \
+ -name ".\#*" -o \
+ -type f -print0 | xargs -0 grep -P "$@" | more
+}
+
+# Print out non-binary files
+function printtext()
+{
+ find . \
+ -name "*.orig" -prune -o \
+ -name CVS -prune -o \
+ -name "temacs.bsc" -o \
+ -name "*.elc" -o \
+ -name "*.exe" -o \
+ -name "*.obj" -o \
+ -name "*.pdb" -o \
+ -name "*.a" -o \
+ -name "*.dll" -o \
+ -name "*.ncb" -o \
+ -name "*.mo" -o \
+ -name "image.0*" -o \
+ -name "*.xpm" -o \
+ -name "*.sbr" -o \
+ -name "*.o" -o \
+ -name "*.jpg" -o \
+ -name "*.png" -o \
+ -name "*.gif" -o \
+ -name "*.gz" -o \
+ -name "*.Z" -o \
+ -name "*.bz2" -o \
+ -name "*.tgz" -o \
+ -name "*.au" -o \
+ -name "*.ico" -o \
+ -name "*.bmp" -o \
+ -type f -print
+}
+
+# Like recursive grep, but look only in the current directory.
+function nrg()
+{
+ find . -name . -o -type d -prune -o \
+ -name "temacs.bsc" -o \
+ -name "*~" -o \
+ -name "*.elc" -o \
+ -name "*.exe" -o \
+ -name "*.obj" -o \
+ -name "TAGS" -o \
+ -name "*.pdb" -o \
+ -name "*.a" -o \
+ -name "*.dll" -o \
+ -name "*.ncb" -o \
+ -name "*.mo" -o \
+ -name "image.0*" -o \
+ -name "*.xpm" -o \
-name ".\#*" -o \
- -type f -print0 | xargs -0 egrep "$@" | more
+ -type f -print0 | xargs -0 grep -P "$@" | more
}
# For use in XEmacs src directory. Grep all important files. For me
@@ -112,6 +218,19 @@ function gh()
egrep "$@" *.[hH] | more
}
+##### Global Search/Replace
+
+# `grx FIND-EXPR REPLACE-EXPR [FILES ...]'. For use in XEmacs src directory.
+# Do a global search and replace over the source files in the XEmacs source
+# directory, including all useful files. Include also the files in
+# FILES. For me (under Cygwin), this is much faster than using `find'.
+function grx()
+{
+ f1="$1"; f2="$2"
+ shift 2
+ gr "$f1" "$f2" *.[chCH] s/*.[hH] m/*.[hH] *.in.in *.h.in
${1+"$@"}
+}
+
##### Diffing
alias diff='diff -u'
@@ -240,9 +359,30 @@ function cldiff()
cvs-merge-diff -from $val -to c "$@" | more
}
+# `cdicom ARGS': Do a commit of a directory tree using cvs-commit, with the
+# ARGS collected together as the log message. Before committing, do a
+# `cvs-diff' to get the changes you made, and send them to a temp file,
+# whose name is printed at the end of the commit output.
+
+function cdicom()
+{
+ tmp=$x/$$.txt
+ cvs-diff > $tmp
+ ccom -m "$*"
+ echo "output is $tmp"
+}
##### Tar functions
+function bzuntar()
+{
+ if [ -z "$1" ] ; then
+ tar xjf -
+ else
+ tar xjf $1
+ fi
+}
+
function zuntar()
{
if [ -z "$1" ] ; then
@@ -261,6 +401,15 @@ function untar()
fi
}
+function bztarls()
+{
+ if [ -z "$1" ] ; then
+ tar tjf -
+ else
+ tar tjf $1
+ fi
+}
+
function ztarls()
{
if [ -z "$1" ] ; then
@@ -315,14 +464,6 @@ function nmgrep()
done
}
-function cdicom()
-{
- tmp=$x/$$.txt
- cvs-diff > $tmp
- ccom -m "$*"
- echo "output is $tmp"
-}
-
# now where is a real which, plus a `type' which does which plus
# gives info about built-in commands/aliases/etc.
## function which()
@@ -532,6 +673,24 @@ function rebunf()
ws="$1"
shift
build --keep-going --no-filter $ws rebuild "$@"
+}
+
+# basic function to build a package workspace from scratch. arguments are
+# workspace name.
+function bup()
+{
+ ws="$1"
+ shift
+ build --packages --keep-going $ws scratch "$@"
+}
+
+# basic function to rebuild an existing package workspace. arguments are
+# workspace name and configuration(s).
+function rebup()
+{
+ ws="$1"
+ shift
+ build --packages --keep-going $ws rebuild "$@"
}
# basic function to build a workspace from scratch for workspaces
1.4 +36 -5 XEmacs/xemacs-builds/ben/build
Index: build
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/build,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- build 2004/11/13 23:01:07 1.3
+++ build 2005/10/14 00:53:43 1.4
@@ -25,6 +25,8 @@
# All configuration information is contained in `config-inc'.
+# --packages means build a package workspace.
+
# --no-mule-on-win indicates that in this workspace, Mule support doesn't
# work on MS Windows. (Pre 21.5.)
@@ -56,6 +58,24 @@
## build --keep-going $ws rebuild "$@"
## }
##
+## # basic function to build a package workspace from scratch. arguments are
+## # workspace name.
+## function bup()
+## {
+## ws="$1"
+## shift
+## build --packages --keep-going $ws scratch "$@"
+## }
+##
+## # basic function to rebuild an existing package workspace. arguments are
+## # workspace name and configuration(s).
+## function rebup()
+## {
+## ws="$1"
+## shift
+## build --packages --keep-going $ws rebuild "$@"
+## }
+##
## # basic function to build a workspace from scratch for workspaces
## # where the Mule support doesn't work under Windows. arguments are
## # workspace name and configuration(s).
@@ -80,6 +100,7 @@
no_mule_on_win=
filter="--filter"
+packages=
keep_going=
ws_full_out=
ws_filtered_out=
@@ -96,6 +117,8 @@ while [ "$1" != "" ] && [
"$badoption" =
no_mule_on_win=t
elif [ "$1" = "--no-filter" -o "$1" = "-nf" ]
; then
filter=""
+ elif [ "$1" = "--packages" ] ; then
+ packages="--packages"
elif [ "$1" = "--keep-going" -o "$1" = "-k" ]
; then
keep_going="--keep-going"
elif [ "$1" = "--full-output-file" ] ; then
@@ -113,6 +136,10 @@ while [ "$1" != "" ] && [
"$badoption" =
fi
done
+if [ -n "$filter" ] && [ -n "$packages" ] ; then
+ filter="--filter=packages"
+fi
+
workspace="$1"
shift
command="$1"
@@ -144,16 +171,20 @@ fi
function crazy()
{
args=`config_options "$2" "$4"`
- dir=`generate-build-values "$3" $args`
- build_full_out=$conf_outtop/$dir/$conf_fullout
- build_filtered_out=$conf_outtop/$dir/$conf_filteredout
+ dir=`generate-build-values $packages "$3" $args`
+ build_full_out=$dir/$conf_fullout
+ build_filtered_out=$dir/$conf_filteredout
if [ "$1" = "scratch" ] ; then
- runcccmd=scratch-wscompile
+ if [ -n "$packages" ] ; then
+ runcccmd=scratch-wscompile-packages
+ else
+ runcccmd=scratch-wscompile
+ fi
else
runcccmd=wscompile
fi
- runcc $filter --output="$build_full_out" -- $runcccmd "$3"
$keep_going $args | tee $build_filtered_out
+ runcc $filter --output="$build_full_out" -- $runcccmd $packages $keep_going
"$3" $args | tee $build_filtered_out
cat $build_full_out >> $ws_full_out
cat $build_filtered_out >> $ws_filtered_out
}
1.2 +12 -9 XEmacs/xemacs-builds/ben/config-inc
Index: config-inc
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/config-inc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- config-inc 2004/11/13 23:01:08 1.1
+++ config-inc 2005/10/14 00:53:43 1.2
@@ -1,5 +1,8 @@
#!/bin/bash
+# Sample config.inc file. This file gives the settings of the user's
+# environment.
+
# This file gives specifics about the layout of the workspaces that
# are to be compiled. The file is included in each of the other scripts.
@@ -75,26 +78,26 @@ function config_options()
b ) args="$mule" ;;
bp ) args="$mule pdump" ;;
# Maximal error catching, with KKCC
- 0 | 0p ) args="$mule union cpp pdump kkcc optimized" ;;
+ 0 | 0p ) args="$mule union cpp pdump kkcc bignum optimized" ;;
# Maximal error catching, sans union, which tends to screw things up
- 0a ) args="$mule cpp pdump kkcc optimized" ;;
+ 0a ) args="$mule cpp pdump kkcc bignum optimized" ;;
# Maximal error catching, sans union and pdump (recent pdump crashes
# observed)
- 0b ) args="$mule cpp kkcc optimized" ;;
+ 0b ) args="$mule cpp kkcc bignum optimized" ;;
# Maximal difference with stuff still enabled
- 1 ) args="optimized noerror nodebug sysmalloc" ;;
- 1p ) args="optimized noerror nodebug sysmalloc pdump" ;;
+ 1 ) args="optimized bignum noerror nodebug sysmalloc" ;;
+ 1p ) args="optimized bignum noerror nodebug sysmalloc pdump" ;;
1n ) args="noerror nodebug sysmalloc" ;;
# All window systems, Mule, turn off all graphical features
2 ) args="$mule nodebug nomenubars noscrollbars notoolbars nodialogs nowidgets
nogif nojpeg nopng notiff noxface noxpm cpp" ;;
2p ) args="$mule nodebug nomenubars noscrollbars notoolbars nodialogs
nowidgets nogif nojpeg nopng notiff noxface noxpm cpp pdump" ;;
# No window systems, no Mule, all graphical features
- 3 | 3p ) args="union pdump cpp noclash" ;;
+ 3 | 3p ) args="union pdump bignum cpp noclash" ;;
# Build a nicely optimized one
- 4 | 4p ) args="$mule noerror optimized pdump" ;;
+ 4 | 4p ) args="$mule noerror bignum optimized pdump" ;;
# Turn off half of the graphical features, some window systems
- 5 ) args="nox notty nomenubars notoolbars nowidgets nojpeg notiff noxpm"
;;
- 5p ) args="nox notty nomenubars notoolbars nowidgets nojpeg notiff noxpm
pdump" ;;
+ 5 ) args="bignum nox notty nomenubars notoolbars nowidgets nojpeg notiff
noxpm" ;;
+ 5p ) args="bignum nox notty nomenubars notoolbars nowidgets nojpeg notiff
noxpm pdump" ;;
# Turn off the other half, other window systems
6 | 6p ) args="$mule union noerror nodebug cpp pdump nowin noscrollbars
nodialogs nogif nopng noxface" ;;
# Everything off
1.4 +13 -3 XEmacs/xemacs-builds/ben/cvs-update
Index: cvs-update
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/cvs-update,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- cvs-update 2004/11/13 23:01:09 1.3
+++ cvs-update 2005/10/14 00:53:43 1.4
@@ -2,7 +2,7 @@
### cvs-update --- front end to `cvs update'
-## Copyright (C) 2001, 2002, 2003, 2004 Ben Wing.
+## Copyright (C) 2001, 2002, 2003, 2004, 2005 Ben Wing.
## Author: Ben Wing <ben(a)xemacs.org>
## Based on: Earlier version by Martin Buchholz <martin(a)xemacs.org>
@@ -97,6 +97,7 @@ my @merged = ();
my @warnings = ();
my @updated = ();
my @locally_modified = ();
+my @locally_removed = ();
my $print = grep (/^-p$/, @ARGV);
my $current_merge;
@@ -148,6 +149,10 @@ while (<CVS>)
{
push @added, $1;
}
+ if (/^R (.*)$/)
+ {
+ push @locally_removed, $1;
+ }
my ($code, $file) = split(' ');
next unless defined ($code) and grep ($code eq $_, qw(U P M C));
next unless defined ($file) and -r $file;
@@ -157,9 +162,8 @@ while (<CVS>)
{
print "Automatically resolving conflict in $file\n";
my $contents = &FileContents ($file);
- # Resolve conflicts in the obvious way...
if ($contents =~
- s/^<{7} \S+\n((?:.*\n)*?)={7}\n((?:.*\n)*?)>{7} \S+\n/$1$2/mg)
+ s/^<<<<<<<
\S+\n((?:.|\n)*?\n)=======\n((?:.|\n)*?\n)>>>>>>> \S+\n/$1$2/mg)
{
open (FILE, "> $file") or die "$file: $!\n";
# the following was `sleep 1', but i still occasionally saw
@@ -229,6 +233,12 @@ print "\n";
if (@locally_modified) {
print "\nThe following files have been locally modified:\n\n ";
print (join "\n ", @locally_modified);
+ print "\n\n";
+}
+
+if (@locally_removed) {
+ print "\nThe following files have been locally removed:\n\n ";
+ print (join "\n ", @locally_removed);
print "\n\n";
}
1.3 +1 -3 XEmacs/xemacs-builds/ben/filter-scratch-wscompile
Index: filter-scratch-wscompile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/filter-scratch-wscompile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- filter-scratch-wscompile 2004/11/13 23:01:09 1.2
+++ filter-scratch-wscompile 2005/10/14 00:53:43 1.3
@@ -2,8 +2,6 @@
# Reconfigure and build $1/ from scratch
-. config-inc
-
dir=`generate-build-values $@`
-outfile=$conf_outtop/$dir/makeout.txt
+outfile=$dir/makeout.txt
runcc --filter --output=$outfile scratch-wscompile "$@"
1.3 +162 -111 XEmacs/xemacs-builds/ben/generate-build-values
Index: generate-build-values
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/generate-build-values,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- generate-build-values 2004/11/13 23:01:10 1.2
+++ generate-build-values 2005/10/14 00:53:43 1.3
@@ -1,115 +1,166 @@
-#!/bin/bash
+#!/usr/bin/perl -w
-# Generate various values used for building (the name of the output
-# directory, the options to be passed to configure, the flags to the C
-# compiler) given the workspace name and the specified configuration
-# characteristics.
-
-. config-inc
-
-if [ "$1" = "--opts" ]; then
- doopts=t
- shift
-elif [ "$1" = "--cflags" ]; then
- docflags=t
- shift
-elif [ "$1" = "--mflags" ]; then
- domflags=t
- shift
-fi
-
-dir=$1
-opts=
-cflags="-g"
-cpp=
-optimized=
-mflags=
-
-shift
-
-badoption=
-
-if [ "$1" = "--keep-going" ] || [ "$1" = "-k" ]
; then
- mflags="-k"
- shift
-fi
-
-while [ "$1" != "" ] && [ "$badoption" =
"" ] ; do
- if [ "$1" = "mule" ] ; then
- opts="$opts --with-mule=yes"
- elif [ "$1" = "cpp" ] ; then
+# Author: Ben Wing <ben(a)xemacs.org>
+
+use strict;
+
+use Getopt::Long;
+
+(my $myName = $0) =~ s@.*/@@; my $usage="
+Usage: $myName [--help|--opts|--cflags|--mflags|--keep-going|-k] WORKSPACE [CONFIG
...]
+
+Generate various values used for building (the name of the output
+directory, the options to be passed to configure, the flags to the C
+compiler) given the workspace name and the specified configuration
+characteristics.
+
+--srcdir means generate the top-level source directory for WORKSPACE.
+--configure means generate the options for `configure'.
+--make means generate the options for `make'.
+--packages means we are building the a package workspace. This just controls
+ the output of the build directory, which (currently) is just the
+ source directory.
+
+If none of the above, return the build directory given the workspace and
+configuration options.
+
+--keep-going or -k sticks -k in mflags.
+
+Options to be passed to configure are appropriate for the version of
+configure in the workspace given.
+
+Retrieves options from `config-inc', which must be in the path.
+";
+
+my ($srcdir, $configure, $make, $keep_going, $packages, $help);
+
+&GetOptions ("srcdir", \$srcdir, "configure", \$configure,
"make", \$make,
+ "keep-going|k", \$keep_going, "packages", \$packages,
+ "help", \$help) ||
+ die "$usage";
+die "$usage" if $help;
+
+my $conf_outtop = `bash -c '. config-inc; echo \$conf_outtop'`;
+chomp $conf_outtop;
+my $conf_wstop = `bash -c '. config-inc; echo \$conf_wstop'`;
+chomp $conf_wstop;
+my $conf_site_includes = `bash -c '. config-inc; echo \$conf_site_includes'`;
+chomp $conf_site_includes;
+my $conf_site_libraries = `bash -c '. config-inc; echo
\$conf_site_libraries'`;
+chomp $conf_site_libraries;
+my $conf_package_path = `bash -c '. config-inc; echo \$conf_package_path'`;
+chomp $conf_package_path;
+
+my %oldopts = ('mule' => '--with-mule=yes',
# Database code includes incomplete prototypes with no args; this
# screws to all hell with C++
- opts="$opts --compiler=gcc --xemacs-compiler=g++ --with-database=no"
- cpp=t
- elif [ "$1" = "union" ] ; then
- opts="$opts --use-union-type=yes"
- elif [ "$1" = "nodebug" ] ; then
- opts="$opts --debug=no"
- elif [ "$1" = "optimized" ] ; then
- optimized=t
- elif [ "$1" = "noerror" ] ; then
- opts="$opts --error-checking=none"
- elif [ "$1" = "pdump" ] ; then
- opts="$opts --pdump=yes"
- elif [ "$1" = "kkcc" ] ; then
- opts="$opts --use-kkcc"
- elif [ "$1" = "rel-alloc" ] ; then
- opts="$opts --rel-alloc=yes"
- elif [ "$1" = "nowin" ] ; then
- opts="$opts --with-msw=no"
- elif [ "$1" = "notty" ] ; then
- opts="$opts --with-tty=no"
- elif [ "$1" = "nox" ] ; then
- opts="$opts --with-x=no"
- elif [ "$1" = "noclash" ] ; then
- opts="$opts --with-clash-detection=no"
- elif [ "$1" = "sysmalloc" ] ; then
- opts="$opts --with-system-malloc"
- elif [ "$1" = "nomenubars" ] ; then
- opts="$opts --with-menubars=no"
- elif [ "$1" = "noscrollbars" ] ; then
- opts="$opts --with-scrollbars=no"
- elif [ "$1" = "notoolbars" ] ; then
- opts="$opts --with-toolbars=no"
- elif [ "$1" = "nodialogs" ] ; then
- opts="$opts --with-dialogs=no"
- elif [ "$1" = "nowidgets" ] ; then
- opts="$opts --with-widgets=no"
- elif [ "$1" = "nogif" ] ; then
- opts="$opts --with-gif=no"
- elif [ "$1" = "nojpeg" ] ; then
- opts="$opts --with-jpeg=no"
- elif [ "$1" = "nopng" ] ; then
- opts="$opts --with-png=no"
- elif [ "$1" = "notiff" ] ; then
- opts="$opts --with-tiff=no"
- elif [ "$1" = "noxface" ] ; then
- opts="$opts --with-xface=no"
- elif [ "$1" = "noxpm" ] ; then
- opts="$opts --with-xpm=no"
- else
- badoption=t
- echo "Unknown option: $1"
- fi
- if [ "$badoption" = "" ] ; then
- dir="${dir}-$1"
- shift
- fi
-done
-
-if [ "$optimized" != "" ] ; then
- cflags="$cflags -O3"
-fi
-
-if [ "$doopts" != "" ] ; then
- echo $opts
-elif [ "$docflags" != "" ] ; then
- echo $cflags
-elif [ "$domflags" != "" ] ; then
- echo $mflags
-else
- [ -d "$conf_outtop/$dir" ] || mkdir $conf_outtop/$dir
- echo $dir
-fi
+ 'cpp' => '--compiler=gcc --xemacs-compiler=g++',
+ 'union' => '--use-union-type=yes',
+ 'nodebug' => '--debug=no',
+ 'optimized' => '',
+ 'noerror' => '--error-checking=none',
+ 'bignum' => '--use-number-lib=gmp',
+ 'nomodules' => '--with-modules=no',
+ 'pdump' => '--pdump=yes',
+ 'kkcc' => '--use-kkcc',
+ 'rel-alloc' => '--rel-alloc=yes',
+ 'nowin' => '--with-msw=no',
+ 'notty' => '--with-tty=no',
+ 'nox' => '--with-x=no',
+ 'noclash' => '--with-clash-detection=no',
+ 'sysmalloc' => '--with-system-malloc',
+ 'nomenubars' => '--with-menubars=no',
+ 'noscrollbars' => '--with-scrollbars=no',
+ 'notoolbars' => '--with-toolbars=no',
+ 'nodialogs' => '--with-dialogs=no',
+ 'nowidgets' => '--with-widgets=no',
+ 'nogif' => '--with-gif=no',
+ 'nojpeg' => '--with-jpeg=no',
+ 'nopng' => '--with-png=no',
+ 'notiff' => '--with-tiff=no',
+ 'noxface' => '--with-xface=no',
+ 'noxpm' => '--with-xpm=no');
+my %newopts = ('mule' => '--enable-mule',
+ # Database code includes incomplete prototypes with no args; this
+ # screws to all hell with C++
+ 'cpp' => '--with-compiler=gcc --with-xemacs-compiler=g++',
+ 'union' => '--enable-union-type',
+ 'nodebug' => '--enable-debug=no',
+ 'optimized' => '--with-optimization',
+ 'noerror' => '--enable-error-checking=none',
+ 'bignum' => '--enable-bignum=gmp',
+ 'nomodules' => '--enable-modules=no',
+ 'pdump' => '--enable-pdump',
+ 'kkcc' => '--enable-kkcc',
+ 'rel-alloc' => '--with-rel-alloc',
+ 'nowin' => '--with-msw=no',
+ 'notty' => '--with-tty=no',
+ 'nox' => '--with-x=no',
+ 'noclash' => '--enable-clash-detection=no',
+ 'sysmalloc' => '--with-system-malloc',
+ 'nomenubars' => '--enable-menubars=no',
+ 'noscrollbars' => '--enable-scrollbars=no',
+ 'notoolbars' => '--enable-toolbars=no',
+ 'nodialogs' => '--enable-dialogs=no',
+ 'nowidgets' => '--enable-widgets=no',
+ 'nogif' => '--with-gif=no',
+ 'nojpeg' => '--with-jpeg=no',
+ 'nopng' => '--with-png=no',
+ 'notiff' => '--with-tiff=no',
+ 'noxface' => '--with-xface=no',
+ 'noxpm' => '--with-xpm=no');
+
+my $dir=$ARGV[0]; shift;
+my $ws=$dir;
+my $opts = "";
+
+if (!$packages) { # currently, no configuration options for building packages
+ # Retrieve the version file from the workspace.
+ my $version_sh = `cat '$conf_wstop/$ws/version.sh'`;
+ my ($majorv, $minorv, $betav) =
+ $version_sh =~ m{ emacs_major_version=([0-9]+)
+ .*
+ emacs_minor_version=([0-9]+)
+ .*
+ emacs_beta_version=([0-9]+)
+ }xs;
+ my $version = $majorv * 10000 + $minorv * 100 + $betav;
+
+ my $old_opts = $version < 210521;
+
+ my $opts = "--verbose --srcdir='$conf_wstop/$ws'";
+
+ if ($old_opts) {
+ $opts .= " --extra-verbose --debug --quick-build" .
+ " --site-includes='$conf_site_includes'" .
+ " --site-libraries='$conf_site_libraries'" .
+ " --package-path='$conf_package_path'";
+ } else {
+ $opts .= " --enable-debug --enable-quick-build" .
+ " --with-site-includes='$conf_site_includes'" .
+ " --with-site-libraries='$conf_site_libraries'" .
+ " --with-package-path='$conf_package_path'";
+ }
+
+ my $cflags = $old_opts ? "-g" : "";
+
+ for my $x (@ARGV) {
+ my $opt = $old_opts ? $oldopts{$x} : $newopts{$x};
+ die "Unknown option: $x" if !defined ($opt);
+ $cflags .= " -O3" if $x eq 'optimized' && $old_opts;
+ $opts .= " $opt";
+ $dir .= "-$x";
+ }
+
+ if ($old_opts) {
+ $opts .= " --cflags='$cflags'" if $cflags;
+ } else {
+ $opts .= " --with-cflags='$cflags'" if $cflags;
+ }
+}
+
+if ($configure) { print $opts; }
+elsif ($make) { print $keep_going ? "-k" : ""; }
+elsif ($srcdir || $packages) { print "$conf_wstop/$ws"; }
+else { print "$conf_outtop/$dir"; }
1.5 +13 -1 XEmacs/xemacs-builds/ben/global-replace
Index: global-replace
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/global-replace,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- global-replace 2002/03/12 05:28:57 1.4
+++ global-replace 2005/10/14 00:53:43 1.5
@@ -79,7 +79,19 @@ $Getopt::Long::ignorecase = 0;
die $usage if $options{"help"} or @ARGV <= 1;
my $code = shift;
-die $usage if grep (-d || ! -w, @ARGV);
+my @dirs = grep (-d, @ARGV);
+if (@dirs)
+{
+ print STDERR "Directories among list of files: ", join (' ',
@dirs), "\n";
+ die $usage;
+}
+
+my @nonwrit = grep (!-w, @ARGV);
+if (@nonwrit)
+{
+ print STDERR "Non-writable files among list of files: ", join (' ',
@nonwrit), "\n";
+ die $usage;
+}
sub SafeOpen {
open ((my $fh = new FileHandle), $_[0]);
1.2 +1 -1 XEmacs/xemacs-builds/ben/gr
Index: gr
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/gr,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- gr 2001/06/25 02:03:43 1.1
+++ gr 2005/10/14 00:53:43 1.2
@@ -9,4 +9,4 @@
from="$1"
to="$2"
shift 2
-echo ${1+"$@"} | xargs global-replace "s/$from/$to/g"
+echo ${1+"$@"} | xargs global-replace "s/$from/$to/mg"
1.4 +264 -143 XEmacs/xemacs-builds/ben/runcc
Index: runcc
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/runcc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- runcc 2004/11/13 23:01:11 1.3
+++ runcc 2005/10/14 00:53:44 1.4
@@ -2,7 +2,7 @@
### runcc --- filter out compiler warning messages and output at end
-## Copyright (C) 2001, 2002, 2003, 2004 Ben Wing.
+## Copyright (C) 2001, 2002, 2003, 2004, 2005 Ben Wing.
## Author: Ben Wing <ben(a)xemacs.org>
## Maintainer: Ben Wing <ben(a)xemacs.org>
@@ -64,151 +64,176 @@ filtering or warning extraction.
# hash table of regexps matching output to be converted into a nicer
# format: takes precedence over filtering regexps below
-my %filter_replace =
- ("^checking whether ln -s works\\.\\.\\." =>
"Configuring...\n",
- "^gcc .* -o [tx]emacs " => "Linking...\n",
- "^\\./[tx]emacs -nd -no-packages -batch -l .*/loadup.el dump" =>
"Dumping...\n",
- "^\\./[tx]emacs -nd -no-packages -batch -l .*/update-elc.el" =>
- "Updating elcs before dumping...\n",
- "^Updating autoloads for directory .*" => "Updating
autoloads...\n",
- "^Recompiling updated \\.els in directory tree `.*'..." =>
- "Updating elcs after dumping...\n",
- "^(XEmacs: (fatal error: )?)?Static heap size adjusted, don't panic! I
will restart the `make'"
- => "Adjusting static heap...\n",
- "^cd .*/man && make -k info\$" => "Building info
files...\n",
+my %filter_replace_core =
+ ("^checking whether ln -s works\\.\\.\\..*" => "BUILD:
Configuring...\n",
+ "^gcc .* -o [tx]emacs .*" => "BUILD: Linking...\n",
+ "^\\./[tx]emacs(\\.exe)? -nd -no-packages -batch -l .*/loadup.el dump.*"
=> "BUILD: Dumping...\n",
+ "^\\./[tx]emacs(\\.exe)? -nd -no-packages -batch -l .*/update-elc.el.*"
=>
+ "BUILD: Updating elcs before dumping...\n",
+ "^Updating autoloads for directory .*" => "BUILD: Updating
autoloads...\n",
+ "^Recompiling updated \\.els in directory tree `.*'....*" =>
+ "BUILD: Updating elcs after dumping...\n",
+ "^(XEmacs: (fatal error: )?)?Static heap size adjusted, don't panic\! I
will restart the `make'.*"
+ => "BUILD: Adjusting static heap...\n",
+ "^cd .*/man && make -k +info\$" => "BUILD: Building info
files...\n",
+ "^cd \\./(.*) && make .*" => 'BUILD: Building in
$1...\n',
);
# regexps matching "normal output" to be filtered with --filter
-my @filter =
- ("^ *\$", "^gcc ", "^g\\+\\+ ", "^ *Loading
", "^ *Requiring", "^checking ",
- "^ +Setting ", "^ +Compiling in", "^ +Using ",
"^Processing ",
- "^ +Defining ", "^ +Prepending ", "^ +Appending ",
- "^ +xemacs will be linked with ", "^rm -f ", "^Compiling
", "^[Dd]one\$",
- "^Making symbolic link to ", "^lwlib/config.h is unchanged\$",
- "^make[[](1|2)]: (Entering|Leaving) directory ",
- "^creating ", "^No autoloads found in ", "^Wrote ",
- "^cd ./(.*) && make -k all\$",
+my @filter_core =
+ ('^[ \t]*$',
+ '^[ \t]*gcc ', '^[ \t]*g\+\+ ',
+ '^[ \t]*Loading ', '^[ \t]*Requiring',
+ '^(configure: )?(checking|creating) ',
+ '^[ \t]*Setting ', '^[ \t]*Compiling ', '^[ \t]*Using ',
'^Processing ',
+ '^[ \t]*Defining ', '^[ \t]*Prepending ', '^[ \t]*Appending
',
+ '^[ \t]*xemacs will be linked with ',
+ '^[ \t]*rm -f ', '^[Dd]one$',
+ '^Making symbolic link to ', '^lwlib/config.h is unchanged$',
+ '^make\[(1|2|3)]: (Entering|Leaving) directory ',
+ '^(config.status: )?(creating|executing) ',
+ '^No autoloads found in ',
+ '^Wrote ',
+ '^cd ./(.*) && make -k all$',
# possibly dangerous? Filter out config assignment outputs
- "^[A-Za-z_]+ = '.*'\$",
+ '^[A-Za-z_]+ = \'.*\'$',
# misc lines to handle one by one
# IMPORTANT: Make sure every regexp is anchored at beginning of line!
# That makes it much less likely you will filter a legitimate problem.
# Also make your regexps as specific as possible.
- "^Running configure with options",
- "^You appear to be using GCC version 3 or above",
- "^Compilation Environment and Installation Defaults:",
- "^ *Compiler version:",
- "^ *- GCC specs file:",
- "^ *- Compiler command:",
- "^ *Compiler version for lib-src:",
- "^ *- Compiler command for lib-src:",
- "^ *libc version:",
- "^for d in lib-src ",
- "^for f in gnudoit gnuattach rcs-checkin ",
- 'if test ! -r \$f; then ln -s .*/lib-src/\$f \$f;',
- 'if test ! -f ../lib-src/DOC ; then',
- '^[ \t]+; fi$',
- "^ +core temacs.exe sheap-adjust.h",
- "^ *temacs puremacs quantmacs covmacs",
- "^ *sheap-adjust.h dump-id.c ./NEEDTODUMP SATISFIED",
- "^ *../lib-src/\\*.po ../lib-src/\\*.mo",
- "^ */[^ ]+/auto-autoloads.el\\* /[^ ]+/custom-load.el\\*",
- "^ *GNUmakefile Makefile Makefile.in TAGS xemacs",
- "^ *xemacs.def xemacs.def.in",
- "^Extracting information from the machine- and system-dependent
headers...",
- "^X11 compilation variables:",
- "^ +Using X11\\.", "^ +- Using raw Xlib to provide XIM
support",
- "^ +No module support\\.",
- "^XEmacs .* configured for .*",
- "^ +(Source code location|Installation prefix|Additional header
files|Additional libraries|Operating system description file|Machine description
file|Compiler|Relocating allocator for buffers|GNU version of malloc):",
- "^(Compilation / Installation|Window System):\$",
- "^ +- (X Windows (headers|libraries) location|Athena headers location|Athena
library to link):",
- "^ +- Drag'n'Drop prototype:",
- "^ +Inhibiting IPv6 canonicalization at startup",
- "^ +- Handling WM_COMMAND properly\\.\$",
- "^(TTY|Images|Sound|Databases|Internationalization|Mail|Other
Features):\$",
- "^ +- Using PostgreSQL",
- "^ +- User chose not to use GNU allocators",
+ '^Running configure with options',
+ '^You appear to be using GCC version 3 or above',
+ '^Compilation Environment and Installation Defaults:',
+ '^[ \t]*Compiler version:',
+ '^[ \t]*- GCC specs file:',
+ '^[ \t]*- Compiler command:',
+ '^[ \t]*Compiler version for lib-src:',
+ '^[ \t]*- Compiler command for lib-src:',
+ '^[ \t]*libc version:',
+ '^[ \t]*for d in lib-src ',
+ '^[ \t]*for f in gnudoit gnuattach rcs-checkin ',
+ '^[ \t]*if test ! -r \$f; then ln -s .*/lib-src/\$f \$f;',
+ '^[ \t]*if test ! -f ../lib-src/DOC ; then',
+ '^[ \t]*core temacs.exe sheap-adjust.h',
+ '^[ \t]*temacs puremacs quantmacs covmacs',
+ '^[ \t]*sheap-adjust.h dump-id.c ./NEEDTODUMP SATISFIED',
+ '^[ \t]*if (! )?test -f dump-size',
+ '^[ \t]*../lib-src/insert-data-in-exec temacs(\.exe)? xemacs.dmp',
+ '^[ \t]*ret=\$\? ;',
+ '^[ \t]*if test \${ret} -eq',
+ '^[ \t]*exit 1;',
+ '^[ \t]*chmod \+x xemacs ;',
+ '^[ \t]*(fi ;|else) \\\\$',
+ '^[ \t]*(; )?fi$',
+ '^[ \t]*dumped_data found at offset',
+ '^[ \t]*../lib-src/insert-data-in-exec -s xemacs.dmp > dump-size ;',
+ '^[ \t]*make -k +xemacs;',
+ '^[ \t]*../lib-src/\*.po ../lib-src/\*.mo',
+ '^[ \t]*/[^ ]+/auto-autoloads.el\* /[^ ]+/custom-load.el\*',
+ '^[ \t]*GNUmakefile Makefile Makefile.in TAGS xemacs',
+ '^[ \t]*xemacs.def xemacs.def.in',
+ '^Extracting information from the machine- and system-dependent
headers...',
+ '^X11 compilation variables:',
+ '^[ \t]*Using X11\.', '^[ \t]*- Using raw Xlib to provide XIM
support',
+ '^[ \t]*Xpm will be found in Motif',
+ '^[ \t]*No module support\.',
+ '^XEmacs .* configured for .*',
+ '^[ \t]*(Source code location|Installation prefix|Additional header
files|Additional libraries|Operating system description file|Machine description
file|Compiler|Relocating allocator for buffers|GNU version of malloc):',
+ '^(Compilation / Installation|Window System):$',
+ '^[ \t]*- (X Windows (headers|libraries) location|Athena headers location|Athena
library to link):',
+ '^[ \t]*- Drag\'n\'Drop prototype:',
+ '^[ \t]*Inhibiting IPv6 canonicalization at startup',
+ '^[ \t]*- Handling WM_COMMAND properly\.$',
+ '^(TTY|Images|Sound|Databases|Internationalization|Mail|Other Features):$',
+ '^[ \t]*- Using PostgreSQL',
+ '^[ \t]*- User chose not to use GNU allocators',
# be very careful suppressing lines that explicitly say "warning" or
"error"
- "^ +WARNING: -+\$",
- "^ +WARNING: Compiling in support for runtime error checking.\$",
- "^ +WARNING: XEmacs will run noticeably more slowly as a result.\$",
- "^ +WARNING: Error checking is on by default for XEmacs beta
releases.\$",
- "^ +WARNING: This tends to trigger compiler bugs, especially when\$",
- "^ +WARNING: combined with MULE and ERROR_CHECKING. Crashes have\$",
- "^ +WARNING: been seen with various versions of GCC.*\$",
- "^ +WARNING: .*with Visual C\\+\\+ as well.*\$",
- "^ +WARNING: More recent versions may be safer, or not.\$",
- "^ +WARNING: Use of the union type may cause crashes due to compiler
bugs.\$",
- "^ +WARNING: Compiling without XPM image support.\$",
- "^ +WARNING: You should strongly consider installing XPM.\$",
- "^ +WARNING: Otherwise toolbars and other graphics will look
suboptimal.\$",
- "^ +WARNING: Compiling without PNG image support.\$",
- "^ +WARNING: You should strongly consider installing the PNG
libraries.\$",
- "^ +WARNING: Otherwise certain images and glyphs may not display.\$",
- "^ +WARNING: \\(a copy may be found in
ftp://ftp.xemacs.org/pub/xemacs/aux\\)\$",
- "^configure: warning: Cannot currently build modules under Cygwin.\$",
- "^Producing `.*' from `.*'\\.\$",
- "^Resetting `.*'\\.\$",
- "^Using (module)?-load-path",
- "^found (bss|data)", "^writing .* header",
- "^(padding|dumping) (\\.data|\\.bss|following)",
- "^copying executable", "^writing rest of file",
- "^-DINHIBIT_STRING_HEADER .*?/src/regex\\.c\$",
- "^getopt.o getopt1.o regex.o",
- "^ar cq liblw.a lwlib.o lwlib-utils.o",
- "^mv EmacsShell-sub.o ",
- "^windres --include-dir ",
- "^Spawning make-docfile ...",
- "^[ \t]+abbrev.c alloc.c ",
- "^Using (module-)?load-path ",
- "^Finding pointers to doc strings",
- "^Dumping under the name xemacs",
- "^found (bss|data)", "^writing .* header",
- "^(padding|dumping) (\\.data|\\.bss|following)",
- "^copying executable", "^writing rest of file",
- "^\\.data and \\.bss reversed",
- "^new data size is [0-9a-f]+, >= [0-9a-f]+\$", # a normal message!
- "^warning: new data size is < approx", # #### should we fix the
problem?
- "^Testing for Lisp shadows ",
- "^Building finder database ",
- "^Removing old or spurious .elcs in directory tree `.*'",
- "^\\(No files need saving\\)",
- "^\\(No changes need to be written\\)",
- "^ *\\./[tx]emacs -nd -no-packages -batch -l .*/make-docfile.el",
- "^ *\\./[tx]emacs -no-packages -batch -no-autoloads -l update-elc-2.el",
- "^ *\\./[tx]emacs -no-packages -batch -eval '\\(setq
finder-compile-keywords-quiet t\\)'",
- "^[ \t]+-l finder -f finder-compile-keywords",
- "^[ \t]+-o ../lib-src/DOC",
- "^[ \t]+-l update-elc-2.el -f batch-update-elc-2 lisp",
- "^\\.\\./lib-src/make-dump-id\$",
-# "^\\.\\./\\.\\./lib-src/ellcc ",
- "^eldap.o eldap_i.o ../../src/xemacs-import.a ",
- "^ellcc driver version .* for EMODULES version .*",
- "^ELLMAKEDOC=.* \\.\\./\\.\\./lib-src/ellcc ",
- "^--mod-name=",
- "^--mod-title=",
- "^dlltool -D",
- "^.*/src/xemacs -no-packages -batch \\\\\$",
- "^Static heap usage:",
- "^make\\[1]: \\[xemacs\\] Error 1 \\(ignored\\)\$",
- "^Generating custom-load.el",
- "^Generating autoloads for",
- "^Computing custom-loads for",
- "^No custom-loads for",
- "^make\\[1]: Nothing to be done for `.*'",
- "^DOC file is up to date",
- "^touch NEEDTODUMP\$",
- "^Saving file .*/auto-autoloads.el...\$",
- "^Info: resolving .* by linking to .*",
+ '^[ \t]*WARNING: -+$',
+ '^[ \t]*WARNING: Compiling in support for runtime error checking.$',
+ '^[ \t]*WARNING: XEmacs will run noticeably more slowly as a result.$',
+ '^[ \t]*WARNING: Error checking is on by default for XEmacs beta
releases.$',
+ '^[ \t]*WARNING: This tends to trigger compiler bugs, especially when$',
+ '^[ \t]*WARNING: combined with MULE and ERROR_CHECKING. Crashes have$',
+ '^[ \t]*WARNING: been seen with various versions of GCC.*$',
+ '^[ \t]*WARNING: .*with Visual C\+\+ as well.*$',
+ '^[ \t]*WARNING: More recent versions may be safer, or not.$',
+ '^[ \t]*WARNING: Use of the union type may cause crashes due to compiler
bugs.$',
+ '^[ \t]*WARNING: Compiling without XPM image support.$',
+ '^[ \t]*WARNING: You should strongly consider installing XPM.$',
+ '^[ \t]*WARNING: Otherwise toolbars and other graphics will look
suboptimal.$',
+ '^[ \t]*WARNING: Compiling without PNG image support.$',
+ '^[ \t]*WARNING: You should strongly consider installing the PNG
libraries.$',
+ '^[ \t]*WARNING: Otherwise certain images and glyphs may not display.$',
+ '^[ \t]*WARNING: \(a copy may be found in
ftp://ftp.xemacs.org/pub/xemacs/aux\)$';,
+ '^[ \t]*WARNING: The new algorithms are experimental. They are enabled
by$',
+ '^[ \t]*WARNING: default for this release\. Use `--disable-kkcc\' to$',
+ '^[ \t]*WARNING: turn it off\.$',
+ '^[ \t]*WARNING: The new allocator is experimental. It is enabled by$',
+ '^[ \t]*WARNING: default for this release\. Use `--disable-mc-alloc\'
to$',
+ '^configure: warning: Cannot currently build modules under Cygwin.$',
+ '^Producing `.*\' from `.*\'\.$',
+ '^Resetting `.*\'\.$',
+ '^Using (module)?-load-path',
+ '^found (bss|data)', '^writing .* header',
+ '^(padding|dumping) (\.data|\.bss|following)',
+ '^copying executable', '^writing rest of file',
+ '^-DINHIBIT_STRING_HEADER .*?/src/regex\.c$',
+ '^getopt.o getopt1.o regex.o',
+ '^ar cq liblw.a lwlib.o lwlib-utils.o',
+ '^mv EmacsShell-sub.o ',
+ '^windres --include-dir ',
+ '^Spawning make-docfile ...',
+ '^[ \t]*abbrev.c alloc.c ',
+ '^[ \t]*emacs-widget-accessors.c ui-byhand.c *; fi',
+ '^Using (module-)?load-path ',
+ '^Finding pointers to doc strings',
+ '^Dumping under the name xemacs',
+ '^Dump file too big for available space',
+ '^found (bss|data)', '^writing .* header',
+ '^(padding|dumping) (\.data|\.bss|following)',
+ '^copying executable', '^writing rest of file',
+ '^\.data and \.bss reversed',
+ '^new data size is [0-9a-f]+, >= [0-9a-f]+$', # a normal message!
+ '^warning: new data size is < approx', # #### should we fix the problem?
+ '^Testing for Lisp shadows ',
+ '^Building finder database ',
+ '^Removing old or spurious .elcs in directory tree `.*\'',
+ '^\(No files need saving\)',
+ '^\(No changes need to be written\)',
+ '^[ \t]*\./[tx]emacs(\.exe)?( -nd)? -no-packages -batch[ \t]*(-l
.*/make-docfile.el|-no-autoloads -l update-elc-2.el|-eval "\(setq
finder-compile-keywords-quiet t\)")',
+ '^[ \t]*-l finder -f finder-compile-keywords',
+ '^[ \t]*-o ../lib-src/DOC',
+ '^[ \t]*-l update-elc-2.el -f batch-update-elc-2 lisp',
+ '^\.\./lib-src/make-dump-id$',
+ '^\.\./\.\./lib-src/ellcc ',
+ '^eldap.o eldap_i.o ../../src/xemacs-import.a ',
+ '^postgresql.o postgresql_i.o ../../src/xemacs-import.a ',
+ '^ellcc driver version .* for EMODULES version .*',
+ '^ELLMAKEDOC=.* \.\./\.\./lib-src/ellcc ',
+ '^--mod-name=',
+ '^--mod-title=',
+ '^dlltool -D',
+ '^.*/src/xemacs -no-packages -batch \\\\$',
+ '^Static heap usage:',
+ '^make\[1]: \[xemacs] Error 1 \(ignored\)$',
+ '^Generating custom-load.el',
+ '^Generating autoloads for',
+ '^Computing custom-loads for',
+ '^No custom-loads for',
+ '^make\[1]: Nothing to be done for `.*\'',
+ '^DOC file is up to date',
+ '^touch NEEDTODUMP$',
+ '^Saving file .*/auto-autoloads.el...$',
+ '^Info: resolving .* by linking to .*',
);
+
# regexps matching warnings to be ignored by --note-warnings:
# Normally, all lines with the string "warning" in them are considered
# to be warnings
-my @suppress_warnings =
+my @suppress_warnings_core =
("/usr/(local/)?include/.*: warning: declaration of `.*' shadows global
declaration",
"new data size is < approx",
"Compiling in support for runtime error checking",
@@ -218,12 +243,99 @@ my @suppress_warnings =
# Normally, all lines with the string "error" in them are considered
# to be errors
-my @suppress_errors =
+my @suppress_errors_core =
("checking for perror",
"checking for strerror",
"Compiling in support for runtime error checking",
);
+my %fcore;
+
+$fcore{"filter-replace"} = \%filter_replace_core;
+$fcore{"filter"} = \@filter_core;
+$fcore{"suppress-warnings"} = \@suppress_warnings_core;
+$fcore{"suppress-errors"} = \@suppress_errors_core;
+
+my %filter_replace_packages =
+ ('^\[ -d (xemacs-packages) \] && make( -k)? - --unix( -w?k?)? -C \1
autoloads$'
+ => 'BUILD: Updating autoloads... ',
+ '^\[ -d ([-0-9a-zA-Z_]+) \] && make( -k)? - --unix( -w?k?)? -C \1
autoloads'
+ => '$1 ',
+ '^\[ -d (xemacs-packages) \] && make( -k)? - --unix( -w?k?)? -C \1
bytecompile'
+ => '... Done.\n',
+ # We need the negative look-ahead assertion so that this rule doesn't
+ # match when the previous one should ... remember that hash tables are
+ # unordered.
+ '^\[ -d ((?!xemacs-packages)[-0-9a-zA-Z_]+) \] && make( -k)? - --unix(
-w?k?)? -C \1 bytecompile'
+ => 'BUILD: Compiling in $1...\n',
+ );
+
+my @filter_packages =
+ ('^[ \t]*$',
+ '^[ \t]*Loading ',
+ '^[ \t]*Requiring',
+ '^[ \t]*Compiling ',
+ '^[ \t]*Creating ',
+ # Often the "Done" appears directly before the next compile command,
+ # on the same line. Race condition in XEmacs, or just the result of
+ # stderr/stdout mixing?
+ '^(Done)?(.*?)/src/\.\./lib-src/i \2/src/xemacs\.exe -no-autoloads -vanilla
',
+ '^[ \t]*-l autoload -f batch-update-directory-custom-defines ',
+ '^[ \t]*-l autoload -f batch-update-directory-(autoloads|custom-defines) ',
+ '^[ \t]*-f Custom-make-dependencies \.$',
+ '^[ \t]*rm -f ',
+ '^[Dd]one[ \t]*$',
+# '^Processing ',
+ '^Generating custom-load.el',
+ '^Generating autoloads for',
+ '^Updating autoloads for directory',
+ '^Computing custom-loads for',
+ '^No custom-loads for',
+ '^Computing custom defines for',
+ '^No custom defines found in',
+ '^No autoloads found in ',
+ '^Saving file .*/auto-autoloads.el...$',
+ 'Ignoring `eval:\' in the local variables list',
+ '^Wrote ',
+ '^Formatting: ',
+ '^Tagifying ',
+ '^(Splitting|Formatting) Info file',
+ '^Removing trailing whitespace from Info buffer',
+ '^Reading included file: ',
+ '^Converting \*scratch\* to Info format',
+ '^cd (.*) && makeinfo ',
+ '^cd (.*) && make -k all$',
+ '^\(No files need saving\)',
+ '^\(No changes need to be written\)',
+# '^.*/src/xemacs -no-packages -batch \\\\$',
+ '^(Done)?make\[(1|2|3)]: (Entering|Leaving) directory ',
+ '^make\[(1|2|3)]: \[xemacs] Error 1 \(ignored\)$',
+ '^make\[(1|2|3)]: Nothing to be done for `.*\'',
+ '^make( -k)? - --unix( -w)? -C [-0-9a-zA-Z_]+ TARGET_BASE=\./ ',
+ '^[ \t]*pdepends.mk$',
+ '^\.\./iterate.rules:75: [-0-9a-zA-Z_]+/pdepends.mk: No such file or
directory$',
+ '^make\[(1|2|3)]: Circular [-0-9a-zA-Z_/.]+ <- [-0-9a-zA-Z_/.]+ dependency
dropped',
+ );
+
+my @suppress_warnings_packages =
+ ();
+
+# regexps matching errors to be ignored by --note-warnings:
+# Normally, all lines with the string "error" in them are considered
+# to be errors
+
+my @suppress_errors_packages =
+ ();
+
+my %fpackages;
+
+$fpackages{"filter-replace"} = \%filter_replace_packages;
+$fpackages{"filter"} = \@filter_packages;
+$fpackages{"suppress-warnings"} = \@suppress_warnings_packages;
+$fpackages{"suppress-errors"} = \@suppress_errors_packages;
+
+my $filter = undef;
+
######################################################################
# Main part of program #
######################################################################
@@ -235,7 +347,7 @@ my %options;
$Getopt::Long::ignorecase = 0;
&GetOptions (
\%options,
- 'filter',
+ 'filter:s',
'append',
'note-warnings',
'output=s',
@@ -244,6 +356,13 @@ $Getopt::Long::ignorecase = 0;
die $usage if $options{"help"};
+if (defined ($options{"filter"})) {
+ $options{"filter"} = "core" if !$options{"filter"};
+ if ($options{"filter"} eq "core") { $filter = \%fcore; }
+ elsif ($options{"filter"} eq "packages") { $filter = \%fpackages;
}
+ else { die "Unrecognized filter type
$options{\"filter\"}:\n$usage"; }
+}
+
# ------------------ open full output file ------------------
if ($options{"output"}) {
@@ -272,33 +391,35 @@ my @warnings = ();
my @errors = ();
while (<PROG>) {
+ s/\r\n/\n/;
+ chomp;
my $line = $_;
my @replace;
if ($options{"output"}) {
- print OUTPUT $line;
+ print OUTPUT "$line\n";
}
if ($options{"filter"}) {
- @replace = grep ($line =~m!$_!, keys %filter_replace);
+ @replace = grep ($line =~m@$_@, keys %{$filter->{"filter-replace"}});
if (@replace) {
- print $filter_replace{$replace[0]};
- } elsif (!grep ($line =~ m!$_!, @filter)) {
- print $line;
+ eval '$line =~ s!' . $replace[0] . '!' .
$filter->{"filter-replace"}->{$replace[0]} . '!';
+ print "$line";
+ $line = $_;
+ } elsif (!grep ($line =~ m@$_@, @{$filter->{"filter"}})) {
+ print "$line\n";
}
} else {
- print;
- chomp;
+ print "$line\n";
}
if ($options{"note-warnings"}) {
- $line = $_;
if (/warning/i) {
- if (!grep ($line =~ m!$_!, @suppress_warnings)) {
- push @warnings, $line;
+ if (!grep ($line =~ m!$_!, @{$filter->{"suppress-warnings"}})) {
+ push @warnings, "$line\n";
}
}
if (/error/i) {
- push @errors, $_;
+ push @errors, "$line\n";
}
}
}
1.3 +8 -8 XEmacs/xemacs-builds/ben/scratch-wscompile
Index: scratch-wscompile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/scratch-wscompile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- scratch-wscompile 2004/11/13 23:01:11 1.2
+++ scratch-wscompile 2005/10/14 00:53:44 1.3
@@ -2,20 +2,20 @@
# Reconfigure and build $1/ from scratch
-. config-inc
-
dir=`generate-build-values $@`
-makeopts=`generate-build-values --mflags $@`
-echo "Building in $conf_outtop/$dir"
-(cd $conf_outtop/$dir && test -f Makefile && make extraclean)
+makeopts=`generate-build-values --make $@`
+echo "BEGIN BUILD:"
+echo "BEGIN BUILD: Building in $dir"
+echo "BEGIN BUILD:"
+(cd $dir && test -f Makefile && make distclean)
wsconfig $@
-cd $conf_outtop/$dir
+cd $dir
if make $makeopts MAKE="make $makeopts"; then
echo "SUCCESS:"
-echo "SUCCESS: Done building in $conf_outtop/$dir"
+echo "SUCCESS: Done building in $dir"
echo "SUCCESS:"
else
echo "FAILURE:"
-echo "FAILURE: Done building in $conf_outtop/$dir"
+echo "FAILURE: Done building in $dir"
echo "FAILURE:"
fi
1.3 +5 -5 XEmacs/xemacs-builds/ben/wscompile
Index: wscompile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/wscompile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- wscompile 2004/11/13 23:01:11 1.2
+++ wscompile 2005/10/14 00:53:44 1.3
@@ -6,10 +6,10 @@
# identical, and the workspace should have had `doconfig' run first on
# it.
-. config-inc
-
dir=`generate-build-values $@`
-makeopts=`generate-build-values --mflags $@`
-echo "Building in $conf_outtop/$dir"
-cd "$conf_outtop/$dir"
+makeopts=`generate-build-values --make $@`
+echo "CONTINUE BUILD:"
+echo "CONTINUE BUILD: Building in $dir"
+echo "CONTINUE BUILD:"
+cd "$dir"
make $makeopts MAKE="make $makeopts"
1.3 +8 -24 XEmacs/xemacs-builds/ben/wsconfig
Index: wsconfig
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/wsconfig,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- wsconfig 2004/11/13 23:01:11 1.2
+++ wsconfig 2005/10/14 00:53:44 1.3
@@ -1,31 +1,15 @@
-#!/bin/bash
+#!/bin/sh
# Configure a workspace
-. config-inc
+srcdir="`generate-build-values --srcdir $@`"
+blddir="`generate-build-values $@`"
+opts="`generate-build-values --configure $@`"
-cd $conf_outtop
-srcdir=$conf_wstop/$1
-blddir=`generate-build-values $@`
-opts="`generate-build-values --opts $@`"
-cflags="`generate-build-values --cflags $@`"
+mkdir -p $blddir
-[ -d ./$blddir ] || mkdir $blddir
-
cd $blddir
-#### #### with-modules=no is temporary!
-echo Running configure with options --verbose --extra-verbose \
- --with-modules=no \
- --srcdir=$srcdir --quick-build \
- --site-includes="'$conf_site_includes'" \
- --site-libraries="'$conf_site_libraries'" \
- --cflags="'$cflags'" $opts \
- --package-path="$conf_package_path"
+echo "Running configure with options $opts"
-$srcdir/configure --verbose --extra-verbose \
- --with-modules=no \
- --srcdir=$srcdir --quick-build \
- --site-includes="$conf_site_includes" \
- --site-libraries="$conf_site_libraries" \
- --package-path="$conf_package_path" \
- --cflags="$cflags" $opts
+# --with-modules=no \
+eval $srcdir/configure $opts
1.3 +0 -2 XEmacs/xemacs-builds/ben/wsdir
Index: wsdir
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/ben/wsdir,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- wsdir 2004/11/13 23:01:12 1.2
+++ wsdir 2005/10/14 00:53:44 1.3
@@ -3,8 +3,6 @@
# Output the build directory corresponding to a particular workspace
# and build configuration
-. config-inc
-
#### #### Not right! Needs to use the configurations in allcrazy,
#### #### which should be renamed. build -> dobuild, allcrazy ->
#### #### build. move the specific info in allcrazy into another
1.1 XEmacs/xemacs-builds/ben/build-packages
Index: build-packages
===================================================================
#!/bin/sh
conf_outtop=/xemacs
workspace=package-src
cd "$conf_outtop/$workspace"
if [ "$ws_full_out" = "" ] ; then
ws_full_out="$conf_outtop/${workspace}-full.out"
fi
if [ "$ws_filtered_out" = "" ] ; then
ws_filtered_out="$conf_outtop/${workspace}-filtered.out"
fi
if [ -f "$ws_full_out" ] ; then
mv "$ws_full_out" "$ws_full_out"~
fi
if [ -f "$ws_filtered_out" ] ; then
mv "$ws_filtered_out" "$ws_filtered_out"~
fi
build_full_out="$ws_full_out"
build_filtered_out="$ws_filtered_out"
runcc --filter=packages --output="$build_full_out" -- make -k | tee
$build_filtered_out
#cat $build_full_out >> $ws_full_out
#cat $build_filtered_out >> $ws_filtered_out
1.1 XEmacs/xemacs-builds/ben/crw2
Index: crw2
===================================================================
#!/bin/sh
exec env CVS_RSH=ssh cvs -w -z3 -d :ext:xemacs@cvs.xemacs.org:/mnt/cvsroot/xemacscvs
${1+"$@"}
1.1 XEmacs/xemacs-builds/ben/scratch-wscompile-packages
Index: scratch-wscompile-packages
===================================================================
#!/bin/bash
# Reconfigure and build package dir $1/ from scratch
dir=`generate-build-values $@`
makeopts=`generate-build-values --make $@`
echo "BEGIN BUILD:"
echo "BEGIN BUILD: Building in $dir"
echo "BEGIN BUILD:"
(cd $dir && test -f Makefile && make distclean)
cd $dir
if make $makeopts MAKE="make $makeopts"; then
echo "SUCCESS:"
echo "SUCCESS: Done building in $dir"
echo "SUCCESS:"
else
echo "FAILURE:"
echo "FAILURE: Done building in $dir"
echo "FAILURE:"
fi