Merge branch 'master' into cvm

This commit is contained in:
graham
2009-07-28 10:40:50 +01:00
2023 changed files with 13229 additions and 15894 deletions

View File

@ -29,7 +29,9 @@
# Generic Makefile used by wmake
#
#------------------------------------------------------------------------------
# Set shell the Makefile uses to the Bourne shell
#------------------------------------------------------------------------------
# The Makefile use a POSIX shell
#------------------------------------------------------------------------------
SHELL = /bin/sh
@ -106,7 +108,7 @@ SEXE = a.out
GENERAL_RULES = $(WM_DIR)/rules/General
RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
UTILBIN = $(WM_DIR)/utilbin/$(WM_ARCH)$(WM_COMPILER)
BIN = $(WM_DIR)/bin/$(WM_ARCH)$(WM_COMPILER)
include $(GENERAL_RULES)/general
include $(RULES)/general

View File

@ -34,6 +34,6 @@
# run from this directory only
cd ${0%/*} || exit 1
( cd src && make )
( cd src && make $@ )
#------------------------------------------------------------------------------

View File

@ -1,10 +0,0 @@
.SUFFIXES: .java .class
javac = javac
include $(GENERAL_RULES)/java$(WM_JAVAC_OPTION)
javaFLAGS = -classpath $(CLASS_PATH):$(CLASSES_DIR):. $(EXE_INC) $(javaOPT) $(javaDBUG) -d $(CLASSES_DIR) -deprecation
javatoclass = mkdir -p $(CLASSES_DIR) ; \
( $(javac) $(javaFLAGS) $$SOURCE || ( rm -f $@ ) )

View File

@ -1,2 +0,0 @@
javaDBUG = -g
javaOPT =

View File

@ -1,2 +0,0 @@
javaDBUG =
javaOPT = -O

View File

@ -1,6 +1,6 @@
.SUFFIXES: .c .cc .cxx .cpp .C .java .F .f .dep
.SUFFIXES: .c .cc .cxx .cpp .C .F .f .dep
MKDEP = $(UTILBIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS)
MKDEP = $(BIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS)
.c.dep:
$(MAKE_DEP)
@ -17,9 +17,6 @@ MKDEP = $(UTILBIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS)
.C.dep:
$(MAKE_DEP)
.java.dep:
$(MAKE_DEP)
.F.dep:
$(MAKE_DEP)

View File

@ -2,10 +2,9 @@ include $(GENERAL_RULES)/version
include $(GENERAL_RULES)/sourceToDep
include $(GENERAL_RULES)/java
include $(GENERAL_RULES)/flex
include $(GENERAL_RULES)/flex++
#include $(GENERAL_RULES)/byacc
#include $(GENERAL_RULES)/btyacc++
## include $(GENERAL_RULES)/byacc
## include $(GENERAL_RULES)/btyacc++
include $(GENERAL_RULES)/bison
include $(GENERAL_RULES)/moc

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -7,7 +7,6 @@ include $(RULES)/X
include $(GENERAL_RULES)/sourceToDep
include $(GENERAL_RULES)/java
include $(GENERAL_RULES)/flex
include $(GENERAL_RULES)/flex++
include $(GENERAL_RULES)/byacc
@ -20,6 +19,6 @@ include $(RULES)/c++
SO = dll
EXE_EXT = .exe
# Ensure we know what OS we are compiling for
# Ensure we know what OS we are compiling for
# during MakefileFiles and MakefileOptions
GFLAGS += -DWIN32 -DLITTLE_ENDIAN

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam -lpthread -lutil

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi -llam

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(PVM_ROOT)/include
PLIBS = -L$(PVM_ROOT)/lib/$(PVM_ARCH) -lgpvm3 -lpvm3s

View File

@ -53,30 +53,13 @@ else
cat > $depName
fi
sed -e s%".*.o.*:"%'$(OBJECTS_DIR)/'"$objectName\:"% \
-e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% \
>> $depName
if [ "$sub" = java ]
then
sed -e s%"\(.*\).class.*:"%'$(CLASSES_DIR)/'"\1.class\:"% \
-e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% \
>> $depName
echo '$(CLASSES_DIR)/'$sourceDir/$className': $(EXE_DEP)' >> $depName
echo '$(CLASSES_DIR)/'$sourceDir/$className':' >> $depName
echo ' @SOURCE_DIR='$sourceDir '\' >> $depName
echo ' SOURCE='$1' ; $('$sub'toclass)' >> $depName
else
sed -e s%".*.o.*:"%'$(OBJECTS_DIR)/'"$objectName\:"% \
-e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% \
>> $depName
echo '$(OBJECTS_DIR)/'$objectName': $(EXE_DEP)' >> $depName
echo '$(OBJECTS_DIR)/'$objectName':' >> $depName
echo ' @SOURCE_DIR='$sourceDir >> $depName
echo ' SOURCE='$1' ; $('$sub'too)' >> $depName
fi
echo '$(OBJECTS_DIR)/'$objectName': $(EXE_DEP)' >> $depName
echo '$(OBJECTS_DIR)/'$objectName':' >> $depName
echo ' @SOURCE_DIR='$sourceDir >> $depName
echo ' SOURCE='$1' ; $('$sub'too)' >> $depName
#------------------------------------------------------------------------------

View File

@ -39,7 +39,7 @@ then
exit 1
fi
utilbin=$WM_DIR/utilbin/$WM_ARCH$WM_COMPILER
bin=$WM_DIR/bin/$WM_ARCH$WM_COMPILER
[ -d Make ] || mkdir Make
rm -f Make/files
@ -51,7 +51,7 @@ do
if [ $dir != . ]
then
baseDir=`echo $dir | sed 's%^\./%%'`
baseDirName=`echo $baseDir | $utilbin/dirToString`
baseDirName=`echo $baseDir | $bin/dirToString`
if [ $baseDirName != Make ]
then
@ -66,7 +66,7 @@ files=`find . -name "*.[cCylfF]" -type f -print`
for file in $files
do
pathName=`echo ${file%/*} | sed 's%^\.%%' | sed 's%^/%%' | $utilbin/dirToString`
pathName=`echo ${file%/*} | sed 's%^\.%%' | sed 's%^/%%' | $bin/dirToString`
fileName=`echo ${file##*/}`
if [ "$pathName" != "" ]

View File

@ -43,23 +43,6 @@ SHELL = /bin/sh
.SUFFIXES:
.SUFFIXES: .o
UTILBIN = $(WM_DIR)/utilbin/$(WM_ARCH)$(WM_COMPILER)
all: $(UTILBIN)/dirToString $(UTILBIN)/wmkdep
clean:
rm -f $(UTILBIN)/dirToString $(UTILBIN)/wmkdep 2>/dev/null
$(UTILBIN)/dirToString: dirToString.c
@mkdir -p $(UTILBIN)
$(cc) $(cFLAGS) dirToString.c -o $(UTILBIN)/dirToString
$(UTILBIN)/wmkdep: wmkdep.l
@mkdir -p $(UTILBIN)
flex wmkdep.l
$(cc) $(cFLAGS) lex.yy.c -o $(UTILBIN)/wmkdep
#------------------------------------------------------------------------------
# set compilation and dependency building rules
@ -67,8 +50,31 @@ $(UTILBIN)/wmkdep: wmkdep.l
GENERAL_RULES = $(WM_DIR)/rules/General
RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
BIN = $(WM_DIR)/bin/$(WM_ARCH)$(WM_COMPILER)
include $(RULES)/general
include $(RULES)/$(WM_LINK_LANGUAGE)
#------------------------------------------------------------------------------
# targets
#------------------------------------------------------------------------------
all: $(BIN)/dirToString $(BIN)/wmkdep
clean:
rm -f $(BIN)/dirToString $(BIN)/wmkdep 2>/dev/null
$(BIN)/dirToString: dirToString.c
@mkdir -p $(BIN)
$(cc) $(cFLAGS) dirToString.c -o $(BIN)/dirToString
$(BIN)/wmkdep: wmkdep.l
@mkdir -p $(BIN)
flex wmkdep.l
$(cc) $(cFLAGS) lex.yy.c -o $(BIN)/wmkdep
@rm -f lex.yy.c 2>/dev/null
#------------------------------------------------------------------------------

View File

@ -34,10 +34,10 @@ Usage
e.g.
using sh
baseDirName=`echo $dir | sed 's%^\./%%' | $utilbin/dirToString`
baseDirName=`echo $dir | sed 's%^\./%%' | $bin/dirToString`
using csh
set baseDirName=`echo $dir | sed 's%^\./%%' | $utilbin/dirToString`
set baseDirName=`echo $dir | sed 's%^\./%%' | $bin/dirToString`
\*----------------------------------------------------------------------------*/

View File

@ -53,9 +53,6 @@ grep -v "=" files > filesPlusBlank
# Add a newline to files to make sure the last line is followed by a newline
echo "" >> filesPlusBlank
# Search for java files in filesPlusBlank
nJava=`grep "\.java" filesPlusBlank | wc -l`
# Remove commented lines blank lines, and trailing blanks from files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -81,17 +78,10 @@ rm tmpSourceFile
# make objectFiles
# ~~~~~~~~~~~~~~~~
if [ $nJava -ne 0 ]
then
sed -e 's%^%$(CLASSES_DIR)/%' \
-e 's%\.[a-zA-Z]*$%\.class%' \
files.$$ > tmpObjectFiles
else
sed -e 's%.*/%%' \
-e 's%^%$(OBJECTS_DIR)/%' \
-e 's%\.[a-zA-Z]*$%\.o%' \
files.$$ > tmpObjectFiles
fi
sed -e 's%.*/%%' \
-e 's%^%$(OBJECTS_DIR)/%' \
-e 's%\.[a-zA-Z]*$%\.o%' \
files.$$ > tmpObjectFiles
echo "OBJECTS = " > tmpObjectFiles2
cat tmpObjectFiles >> tmpObjectFiles2

View File

@ -27,41 +27,71 @@
# wmakeLnIncludeAll
#
# Description
# Find directories containing a Make/ directory and execute
# 'wmakeLnInclude -f' for each one
# Find directories with a 'Make/files' that contains a 'LIB =' directive
# and execute 'wmakeLnInclude -f' for each one
#
#------------------------------------------------------------------------------
# default is pwd
if [ "$#" -eq 0 ]
then
set -- .
elif [ "$1" = "-h" -o "$1" = "-help" ]
then
echo "Usage: ${0##*/} [dir1] .. [dirN]"
echo
echo " Find directories containing a Make/ directory and"
echo " execute 'wmakeLnInclude -f' for each one"
echo
exit 1
fi
usage() {
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: ${0##*/} [dir1 .. dirN]
Find directories with a 'Make/files' that contains a 'LIB =' directive
and execute 'wmakeLnInclude -f' for each one
USAGE
exit 1
}
#------------------------------------------------------------------------------
findName=lnInclude
# simple parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help) # provide immediate help
usage
;;
-*)
usage "unknown option: '$*'"
;;
*)
break
;;
esac
done
# default to searching from pwd
[ "$#" -gt 0 ] || set -- .
for checkDir
do
if [ -d $checkDir ]
then
echo "searching: $checkDir for 'Make' directories"
echo "---------"
else
echo "skipping non-dir: $checkDir"
echo "----------------"
continue
fi
find $checkDir -depth -type d -name Make -print | while read dir
find $checkDir -depth -type d -name Make -print | while read makeDir
do
dir=${dir%/Make} # trim /Make directory from the end
if [ -d "$dir" ]
topDir=${makeDir%/Make} # trim /Make from the end
if [ -d "$topDir" ]
then
wmakeLnInclude -f $dir
if grep -e '^ *LIB *=' "$makeDir/files" >/dev/null 2>&1
then
wmakeLnInclude -f $topDir
elif [ -d "$topDir/lnInclude" ]
then
echo "removing spurious $topDir/lnInclude"
rm -rf "$topDir/lnInclude"
fi
fi
done
done