尽管没有空格,Makefile:33:***缺少分隔符

时间:2017-03-03 20:43:43

标签: bash unix

我在makefile中遇到以下错误,尽管该行没有空格,我通过添加标签编辑了部分文件。但在目前的线路上#34; case" $ UNAME" in" ,我无法解决它,并在该行上添加一个标签是在第一个目标之前开始'配方开始。停止。'错误

Makefile:33:***缺少分隔符。停止

  #! /bin/sh Makefile
# On GNU/Linux you must: alias make "/bin/sh Makefile $1" for this to work!!
#
# PURPOSE:      Chooses specific Makefile      
#
# NORMAL USAGE: make [version-selector]
#
# SAMPLE USAGE: make 
#               make [mp][f][d] e.g. 
#               on Linux
#                  make mp (to create spider_linux_mp)
#                  make all (to create all current executables)
#                  make new (to update all current executables version)

TARGET="$1"
echo TARGET: $TARGET

DEST="DEST=_tmp"

DEBUG=

if expr "$TARGET" : '.*d' > /dev/null
    then
    DEBUG="QFFLAGS=-g QLFLAGS=-g SUFFIX=d"
    # echo DEBUG: $DEBUG
    TARGET=`echo $TARGET | tr -d 'd'`
    fi

UNAME=`uname`
#echo UNAME: $UNAME
UNAMEm=`uname -m`
#echo UNAMEm: $UNAMEm
case "$UNAME" in
#  Find current operating system
    Linux)  
    PLATFORM=_linux 
    #VERSIONS=" _linux _linux_mp_opt64  _linux_mp_intel _linux_mpi_opt64 _linux_mp_intel64 " 
    VERSIONS=" _linux _linux_mp_opt64  _linux_mp_intel  _linux_mp_intel64 " 

    if expr "$TARGET" : '.*mp' > /dev/null
    then #  Want mp with  version
    WHICH="mp"
    else
    if expr "$TARGET" : '.*f' > /dev/null
    then #  Want  version
    WHICH=""
    fi
    fi;;
esac

0 个答案:

没有答案