cleanup wmake scripts

- match comments to names of scripts
  - remove comments about using C-shell (not true anymore)
  - use 'assert' style syntax in places instead of if/then/fi
  - wcleanMachine supports multiple arguments
This commit is contained in:
Mark Olesen
2008-07-18 15:32:10 +02:00
parent fbf250af65
commit 7f9631634d
12 changed files with 90 additions and 132 deletions

View File

@ -28,8 +28,6 @@
#
# Description
# Cleans up the dependency list and add the compilation statement.
# It has to be written in the C-shell rather than the Bourne shell
# because it uses file name manipulators.
#
# Usage: wmkdep <fileName> | addCompile <fileName>
#
@ -52,11 +50,11 @@ if [ "$WM_PROJECT_DIR" ]
then
sed -e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% > $depName
else
cat > $depName
cat > $depName
fi
if [ "$sub" = "java" ]
if [ "$sub" = java ]
then
sed -e s%"\(.*\).class.*:"%'$(CLASSES_DIR)/'"\1.class\:"% \

View File

@ -28,43 +28,36 @@
#
# Description
# Scan the current directory for source files and construct Make/files
# It has to be written in the C-shell rather than the Bourne shell
# because it uses file name manipulators.
#
# Usage : makeFiles
#
#------------------------------------------------------------------------------
if [ -r "Make/files" ]
if [ -r Make/files ]
then
echo "makeFiles: Make/files already exists, exiting"
exit 1
fi
if [ ! -d "Make" ]
then
mkdir Make
echo "makeFiles: Make/files already exists, exiting"
exit 1
fi
rulesPath=$WM_DIR/rules/$WM_ARCH$WM_COMPILER
[ -d Make ] || mkdir Make
rm -f Make/files
dirs=`find . -name "*" -type d -print`
for dir in $dirs
do
if [ $dir != "." ]
then
baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
baseDir=`echo $dir | sed 's%^\./%%'`
if [ $dir != . ]
then
baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
baseDir=`echo $dir | sed 's%^\./%%'`
if [ $baseDirName != "Make" ]
then
echo $baseDirName " = " $baseDir >> Make/files
fi
fi
if [ $baseDirName != Make ]
then
echo $baseDirName " = " $baseDir >> Make/files
fi
fi
done
echo >> Make/files
@ -86,7 +79,6 @@ done
echo >> Make/files
pwd=`pwd`
echo 'EXE = $(FOAM_APPBIN)/'${pwd##*/} >> Make/files
echo 'EXE = $(FOAM_APPBIN)/'${PWD##*/} >> Make/files
#------------------------------------------------------------------------------

View File

@ -28,26 +28,18 @@
#
# Description
# Scan the current directory for options and construct Make/options
# It has to be written in the C-shell rather than the Bourne shell
# because it uses file name manipulators.
#
# Usage : makeOptions
#
#------------------------------------------------------------------------------
if [ -r "Make/options" ]
if [ -r Make/options ]
then
echo "makeOptions: Make/options already exists, exiting"
exit 1
echo "makeOptions: Make/options already exists, exiting"
exit 1
fi
if [ ! -d "Make" ]
then
mkdir Make
fi
rulesPath=$WM_DIR/rules/$WM_ARCH
[ -d Make ] || mkdir Make
rm -f Make/options

View File

@ -27,15 +27,13 @@
# mkObjectDir
#
# Description
# Makes a directory hierachy for the given object file
# It has to be written in the C-shell rather than the Bourne shell
# because it uses file name manipulators.
# Makes a directory hierarchy for the given object file
#
# Usage: mkObjectDir <directory>
#
#------------------------------------------------------------------------------
if [ $# = 1 ]
if [ $# -eq 1 ]
then
if [ ! -d ${1%/*} -a $1 != ${1%/*} ]
then