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 |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# 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_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_LIBS =
|
||||
@ -103,6 +106,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)
|
||||
|
||||
include $(GENERAL_RULES)/general
|
||||
include $(RULES)/general
|
||||
@ -197,7 +201,7 @@ $(LIB).jar: $(OBJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
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 |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
@ -43,7 +43,7 @@ include $(RULES)/general
|
||||
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
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# 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
|
||||
|
||||
MKDEP = $(RULES)/wmkdep -I$(*D) $(LIB_HEADER_DIRS)
|
||||
MKDEP = $(UTILBIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS)
|
||||
|
||||
.c.dep:
|
||||
$(MAKE_DEP)
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
XFLAGS =
|
||||
XINC = $(XFLAGS) -I/usr/X11R6/include
|
||||
XLIBS = -L/usr/X11R6/lib64 -lXext -lX11
|
||||
XINC = $(XFLAGS) -I/usr/include/X11
|
||||
XLIBS = -L/usr/lib64 -lXext -lX11
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
@ -39,7 +39,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rulesPath=$WM_DIR/rules/$WM_ARCH$WM_COMPILER
|
||||
utilbin=$WM_DIR/utilbin/$WM_ARCH$WM_COMPILER
|
||||
|
||||
[ -d Make ] || mkdir Make
|
||||
rm -f Make/files
|
||||
@ -50,8 +50,8 @@ for dir in $dirs
|
||||
do
|
||||
if [ $dir != . ]
|
||||
then
|
||||
baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
|
||||
baseDir=`echo $dir | sed 's%^\./%%'`
|
||||
baseDirName=`echo $baseDir | $utilbin/dirToString`
|
||||
|
||||
if [ $baseDirName != Make ]
|
||||
then
|
||||
@ -66,12 +66,12 @@ files=`find . -name "*.[cCylfF]" -type f -print`
|
||||
|
||||
for file in $files
|
||||
do
|
||||
pathName=`echo ${file%/*} | sed 's%^\.%%' | sed 's%^/%%' | $rulesPath/dirToString`
|
||||
pathName=`echo ${file%/*} | sed 's%^\.%%' | sed 's%^/%%' | $utilbin/dirToString`
|
||||
fileName=`echo ${file##*/}`
|
||||
|
||||
if [ "$pathName" != "" ]
|
||||
then
|
||||
echo '$('$pathName")/"$fileName >> Make/files
|
||||
echo '$('$pathName')/'$fileName >> Make/files
|
||||
else
|
||||
echo $fileName >> Make/files
|
||||
fi
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
#
|
||||
@ -43,26 +43,30 @@ SHELL = /bin/sh
|
||||
.SUFFIXES:
|
||||
.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:
|
||||
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
|
||||
$(cc) $(cFLAGS) dirToString.c -o $(RULES_DIR)/dirToString
|
||||
$(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
|
||||
|
||||
$(RULES_DIR)/wmkdep: wmkdep.l
|
||||
flex wmkdep.l ; $(cc) $(cFLAGS) lex.yy.c -o $(RULES_DIR)/wmkdep
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# set compilation and dependency building rules
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
GENERAL_RULES = $(WM_DIR)/rules/General
|
||||
RULES = $(RULES_DIR)
|
||||
RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
|
||||
|
||||
include $(RULES)/general
|
||||
include $(RULES)/$(WM_LINK_LANGUAGE)
|
||||
|
||||
@ -33,11 +33,11 @@ Usage
|
||||
echo dirName | dirToString
|
||||
|
||||
e.g.
|
||||
using csh
|
||||
set baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
|
||||
using sh
|
||||
baseDirName=`echo $dir | sed 's%^\./%%' | $utilbin/dirToString`
|
||||
|
||||
using ksh
|
||||
baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
|
||||
using csh
|
||||
set baseDirName=`echo $dir | sed 's%^\./%%' | $utilbin/dirToString`
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
15
wmake/wmkdir
15
wmake/wmkdir
@ -27,21 +27,24 @@
|
||||
# wmkdir
|
||||
#
|
||||
# Description
|
||||
# Script to make a directory that does not already exist
|
||||
# Usage : wmkdir <dir>
|
||||
# Script to make directories that do not already exist
|
||||
# Usage : wmkdir <dir> [.. <dirN>]
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if [ $# -eq 1 ]
|
||||
if [ $# -ge 1 ]
|
||||
then
|
||||
# provide help
|
||||
if [ "$1" = "-h" -o "$1" = "-help" ]
|
||||
then
|
||||
echo "usage: ${0##*/} <dir>"
|
||||
echo " mkdir if directory does not already exist"
|
||||
echo "usage: ${0##*/} <dir> [.. <dirN>]"
|
||||
echo " mkdir if directories do not already exist"
|
||||
echo
|
||||
else
|
||||
[ -d "$1" ] || mkdir -p "$1"
|
||||
for dir
|
||||
do
|
||||
[ -d "$dir" ] || mkdir -p "$dir"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user