mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
minor tweak to wmake
- place wmkdep and dirToString executables under utilbin/$(WM_ARCH)$(WM_COMPILER). This helps somewhat when copying rules about, and might help when creating general rules.
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
@ -65,7 +65,10 @@ SYS_LIBS =
|
|||||||
|
|
||||||
PROJECT_INC = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude -I$(LIB_SRC)/OSspecific/$(WM_OS)/lnInclude
|
PROJECT_INC = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude -I$(LIB_SRC)/OSspecific/$(WM_OS)/lnInclude
|
||||||
PROJECT_LIBS = -l$(WM_PROJECT)
|
PROJECT_LIBS = -l$(WM_PROJECT)
|
||||||
PROJECT_VERSION = $(shell printf -- "-DPROJECT_VERSION=%d%03d%03d" $$(echo $(WM_PROJECT_VERSION) | sed -e 's/\./ /g'))
|
##
|
||||||
|
## unused:
|
||||||
|
## PROJECT_VERSION = $(shell printf -- "-DPROJECT_VERSION=%d%03d%03d" $$(echo $(WM_PROJECT_VERSION) | sed -e 's/\./ /g'))
|
||||||
|
##
|
||||||
|
|
||||||
EXE_INC =
|
EXE_INC =
|
||||||
EXE_LIBS =
|
EXE_LIBS =
|
||||||
@ -103,6 +106,7 @@ SEXE = a.out
|
|||||||
|
|
||||||
GENERAL_RULES = $(WM_DIR)/rules/General
|
GENERAL_RULES = $(WM_DIR)/rules/General
|
||||||
RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
|
RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
|
||||||
|
UTILBIN = $(WM_DIR)/utilbin/$(WM_ARCH)$(WM_COMPILER)
|
||||||
|
|
||||||
include $(GENERAL_RULES)/general
|
include $(GENERAL_RULES)/general
|
||||||
include $(RULES)/general
|
include $(RULES)/general
|
||||||
@ -197,7 +201,7 @@ $(LIB).jar: $(OBJECTS)
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
lnInclude/uptodate: $(MAKE_DIR)/files $(MAKE_DIR)/options
|
lnInclude/uptodate: $(MAKE_DIR)/files $(MAKE_DIR)/options
|
||||||
@rm -rf lnInclude ; wmakeLnInclude `pwd` ; touch lnInclude/uptodate
|
@rm -rf lnInclude ; wmakeLnInclude . ; touch lnInclude/uptodate
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
@ -43,7 +43,7 @@ include $(RULES)/general
|
|||||||
OPTIONS = $(WM_OPTIONS)/options
|
OPTIONS = $(WM_OPTIONS)/options
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Declare dependecy of all make system files on FILE
|
# Declare dependency of all make system files on FILE
|
||||||
# Causes all derived files to be remade if any are changed or missing
|
# Causes all derived files to be remade if any are changed or missing
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
|
|||||||
3
wmake/rules/General/mplibOPENMPI
Normal file
3
wmake/rules/General/mplibOPENMPI
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PFLAGS = -DOMPI_SKIP_MPICXX
|
||||||
|
PINC = -I$(MPI_ARCH_PATH)/include
|
||||||
|
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi
|
||||||
@ -1,6 +1,6 @@
|
|||||||
.SUFFIXES: .c .cc .cxx .cpp .C .java .F .f .dep
|
.SUFFIXES: .c .cc .cxx .cpp .C .java .F .f .dep
|
||||||
|
|
||||||
MKDEP = $(RULES)/wmkdep -I$(*D) $(LIB_HEADER_DIRS)
|
MKDEP = $(UTILBIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS)
|
||||||
|
|
||||||
.c.dep:
|
.c.dep:
|
||||||
$(MAKE_DEP)
|
$(MAKE_DEP)
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
XFLAGS =
|
XFLAGS =
|
||||||
XINC = $(XFLAGS) -I/usr/X11R6/include
|
XINC = $(XFLAGS) -I/usr/include/X11
|
||||||
XLIBS = -L/usr/X11R6/lib64 -lXext -lX11
|
XLIBS = -L/usr/lib64 -lXext -lX11
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
@ -35,11 +35,11 @@
|
|||||||
|
|
||||||
if [ -r Make/files ]
|
if [ -r Make/files ]
|
||||||
then
|
then
|
||||||
echo "makeFiles: Make/files already exists, exiting"
|
echo "makeFiles: Make/files already exists, exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rulesPath=$WM_DIR/rules/$WM_ARCH$WM_COMPILER
|
utilbin=$WM_DIR/utilbin/$WM_ARCH$WM_COMPILER
|
||||||
|
|
||||||
[ -d Make ] || mkdir Make
|
[ -d Make ] || mkdir Make
|
||||||
rm -f Make/files
|
rm -f Make/files
|
||||||
@ -48,16 +48,16 @@ dirs=`find . -name "*" -type d -print`
|
|||||||
|
|
||||||
for dir in $dirs
|
for dir in $dirs
|
||||||
do
|
do
|
||||||
if [ $dir != . ]
|
if [ $dir != . ]
|
||||||
then
|
then
|
||||||
baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
|
baseDir=`echo $dir | sed 's%^\./%%'`
|
||||||
baseDir=`echo $dir | sed 's%^\./%%'`
|
baseDirName=`echo $baseDir | $utilbin/dirToString`
|
||||||
|
|
||||||
if [ $baseDirName != Make ]
|
if [ $baseDirName != Make ]
|
||||||
then
|
then
|
||||||
echo $baseDirName " = " $baseDir >> Make/files
|
echo $baseDirName " = " $baseDir >> Make/files
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo >> Make/files
|
echo >> Make/files
|
||||||
@ -66,12 +66,12 @@ files=`find . -name "*.[cCylfF]" -type f -print`
|
|||||||
|
|
||||||
for file in $files
|
for file in $files
|
||||||
do
|
do
|
||||||
pathName=`echo ${file%/*} | sed 's%^\.%%' | sed 's%^/%%' | $rulesPath/dirToString`
|
pathName=`echo ${file%/*} | sed 's%^\.%%' | sed 's%^/%%' | $utilbin/dirToString`
|
||||||
fileName=`echo ${file##*/}`
|
fileName=`echo ${file##*/}`
|
||||||
|
|
||||||
if [ "$pathName" != "" ]
|
if [ "$pathName" != "" ]
|
||||||
then
|
then
|
||||||
echo '$('$pathName")/"$fileName >> Make/files
|
echo '$('$pathName')/'$fileName >> Make/files
|
||||||
else
|
else
|
||||||
echo $fileName >> Make/files
|
echo $fileName >> Make/files
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
#
|
#
|
||||||
@ -43,26 +43,30 @@ SHELL = /bin/sh
|
|||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .o
|
.SUFFIXES: .o
|
||||||
|
|
||||||
RULES_DIR = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
|
UTILBIN = $(WM_DIR)/utilbin/$(WM_ARCH)$(WM_COMPILER)
|
||||||
|
|
||||||
all: $(RULES_DIR)/dirToString $(RULES_DIR)/wmkdep
|
all: $(UTILBIN)/dirToString $(UTILBIN)/wmkdep
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(RULES_DIR)/dirToString $(RULES_DIR)/wmkdep 2>/dev/null
|
rm -f $(UTILBIN)/dirToString $(UTILBIN)/wmkdep 2>/dev/null
|
||||||
|
|
||||||
|
|
||||||
$(RULES_DIR)/dirToString: dirToString.c
|
$(UTILBIN)/dirToString: dirToString.c
|
||||||
$(cc) $(cFLAGS) dirToString.c -o $(RULES_DIR)/dirToString
|
@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
|
||||||
|
|
||||||
$(RULES_DIR)/wmkdep: wmkdep.l
|
|
||||||
flex wmkdep.l ; $(cc) $(cFLAGS) lex.yy.c -o $(RULES_DIR)/wmkdep
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# set compilation and dependency building rules
|
# set compilation and dependency building rules
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
GENERAL_RULES = $(WM_DIR)/rules/General
|
GENERAL_RULES = $(WM_DIR)/rules/General
|
||||||
RULES = $(RULES_DIR)
|
RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
|
||||||
|
|
||||||
include $(RULES)/general
|
include $(RULES)/general
|
||||||
include $(RULES)/$(WM_LINK_LANGUAGE)
|
include $(RULES)/$(WM_LINK_LANGUAGE)
|
||||||
|
|||||||
@ -33,11 +33,11 @@ Usage
|
|||||||
echo dirName | dirToString
|
echo dirName | dirToString
|
||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
using csh
|
using sh
|
||||||
set baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
|
baseDirName=`echo $dir | sed 's%^\./%%' | $utilbin/dirToString`
|
||||||
|
|
||||||
using ksh
|
using csh
|
||||||
baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
|
set baseDirName=`echo $dir | sed 's%^\./%%' | $utilbin/dirToString`
|
||||||
|
|
||||||
\*----------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ int main()
|
|||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int nextupper = 0;
|
int nextupper = 0;
|
||||||
|
|
||||||
while ((c=getchar()) != EOF)
|
while ((c=getchar()) != EOF)
|
||||||
{
|
{
|
||||||
if (c == '/')
|
if (c == '/')
|
||||||
@ -66,7 +66,7 @@ int main()
|
|||||||
{
|
{
|
||||||
putchar(c);
|
putchar(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
nextupper = 0;
|
nextupper = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ Description
|
|||||||
only once. This is why this program is faster than cpp.
|
only once. This is why this program is faster than cpp.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
wmkdep [ -Idirectory ... -Idirectory] filename
|
wmkdep [ -Idirectory ... -Idirectory ] filename
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
sourceFile = (char*)malloc(strlen(argv[argc-1]) + 1);
|
sourceFile = (char*)malloc(strlen(argv[argc-1]) + 1);
|
||||||
strcpy(sourceFile, argv[argc-1]);
|
strcpy(sourceFile, argv[argc-1]);
|
||||||
fprintf(stderr,"Making dependency list for source file %s\n", sourceFile);
|
fprintf(stderr, "Making dependency list for source file %s\n", sourceFile);
|
||||||
|
|
||||||
|
|
||||||
/* Get list of -I directories. */
|
/* Get list of -I directories. */
|
||||||
|
|||||||
15
wmake/wmkdir
15
wmake/wmkdir
@ -27,21 +27,24 @@
|
|||||||
# wmkdir
|
# wmkdir
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Script to make a directory that does not already exist
|
# Script to make directories that do not already exist
|
||||||
# Usage : wmkdir <dir>
|
# Usage : wmkdir <dir> [.. <dirN>]
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
if [ $# -ge 1 ]
|
||||||
then
|
then
|
||||||
# provide help
|
# provide help
|
||||||
if [ "$1" = "-h" -o "$1" = "-help" ]
|
if [ "$1" = "-h" -o "$1" = "-help" ]
|
||||||
then
|
then
|
||||||
echo "usage: ${0##*/} <dir>"
|
echo "usage: ${0##*/} <dir> [.. <dirN>]"
|
||||||
echo " mkdir if directory does not already exist"
|
echo " mkdir if directories do not already exist"
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
[ -d "$1" ] || mkdir -p "$1"
|
for dir
|
||||||
|
do
|
||||||
|
[ -d "$dir" ] || mkdir -p "$dir"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user