Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28603 Discussions

Trouble with an If test in a makefile for Mac

Brian_Allison
Beginner
447 Views
I am trying to check if a file exist and I am getting a make error: *** Seperator Missing. Stop. message
Here is the coding
if [ -f relap/adechk.ff ]; then
cpl =
else
cpl = cpl
fi
0 Kudos
1 Reply
Brian_Allison
Beginner
447 Views
Here is a better description of the coding. The part in question is bolded and underlined. The error is about line 29

# To prepare a Compile Library Transmittal from an installed version:
# make -f makerlnx preparecpl
# One of the two statements below is to be commented out, the other is
# to be active,
# The following statement is to be active when the full source is
# available.
# The following statement is to be active when the Compile Library
# Transmittal is available.
Line 29: if [ -f relap/adechk.ff]; then
cpl =
else
cpl = cpl
fi
ifeq ($(debug),yes)
NM = d
FFLAGS = "-O0 -g"
O = obj
else
NM = o
FFLAGS = -O2
O = o
endif
ifeq ($(fpstop),yes)
FPSTOP = -fpe0
else
FPSTOP =
endif
f90 = ifort
.IGNORE :
all: auxx/select.x auxx/cnv32.x auxx/selectd.x auxx/builderm.x
ifort -logo
if [ ! -d "$(NM)" ]; then mkdir "$(NM)"; fi
cd envrl ; ls *.hh >filedoth
cd envrl ; ls *.ff >filedotf
cd matpro ; ls *.hh >filedoth
cd matpro ; ls *.ff >filedotf
cd relap ; ls *.hh >filedoth
cd relap ; ls *.ff >filedotf
cd scdap ; ls *.hh >filedoth
cd scdap ; ls *.ff >filedotf
cd contmn ; ls *.ff >filedotf
auxx/builderm.x makermacp
cd steam ; make -f steamlnx.mak
# To prepare a Compile Library Transmittal from an installed version:# make -f makerlnx preparecpl# One of the two statements below is to be commented out, the other is# to be active,# The following statement is to be active when the full source is# available.# The following statement is to be active when the Compile Library# Transmittal is available.if [ -f relap/adechk.ff]; thencpl =elsecpl = cplfiifeq ($(debug),yes)NM = dFFLAGS = "-O0 -g"O = objelseNM = oFFLAGS = -O2O = oendif
ifeq ($(fpstop),yes)FPSTOP = -fpe0elseFPSTOP =endif
f90 = ifort
.IGNORE :
all: auxx/select.x auxx/cnv32.x auxx/selectd.x auxx/builderm.x ifort -logo if [ ! -d "$(NM)" ]; then mkdir "$(NM)"; fi cd envrl ; ls *.hh >filedoth cd envrl ; ls *.ff >filedotf cd matpro ; ls *.hh >filedoth cd matpro ; ls *.ff >filedotf cd relap ; ls *.hh >filedoth cd relap ; ls *.ff >filedotf cd scdap ; ls *.hh >filedoth cd scdap ; ls *.ff >filedotf cd contmn ; ls *.ff >filedotf
auxx/builderm.x makermacp
cd steam ; make -f steamlnx.mak
0 Kudos
Reply