0
我写了一个配方来检查一个目录是否存在。但我认为正常的BASH语法不能应用,因为我一直在遇到错误。 我写的食谱是:Makefile配方不能正常工作
dircheck:
if [ ! -d "$/data/DIV5/SASC/project-064-ronald-svdz/analysis/runs/peak_calls_ctrls" ]; then
echo Directory does not excists peak_calls_ctrll will be created.
mkdir /data/DIV5/SASC/project-064-ronald-svdz/analysis/runs/peak_calls_ctrls
else
echo Directory already excists continuing the analysis!
fi
我遇到的错误:run_MACS.mk:12: *** missing separator. Stop.
我知道它的语法,但我不知道是什么改变。
请参阅[本答案] [1]讨论包含多行的编写规则。 [1]:http://stackoverflow.com/questions/22544784/variable-assignment-issue-in-multiline-macro-in-gnu-makefile/22545855#22545855 – MadScientist
MadScientist当然100%的正确[来自手册](http://www.gnu.org/software/make/manual/make.html#Splitting-Recipe-Lines)我正在投票将其标记为重复。 –