简体   繁体   English

make:***没有规则来制作'clean.Stop所需的目标'rm'

[英]make: *** No rule to make target 'rm', needed by 'clean.Stop

I am working with cygwin on windows 8.1. 我在Windows 8.1上使用cygwin。 I have used the following make file 我使用了以下make文件

  .SUFFIXES : .o .C

  CFLAGS = -g2 
  CC =g++ ${CFLAGS}

  LIBRARIES =   -lm 

  .C.o :
   ${CC} -c  $<

  SOURCE-FILES =   sparsegraph.C myvarious.C pairlist.C graphlist.C peo.graph.C choldc.C copy.C metropolis_fns.C likelihood.C metropolis.C

  OBJECT-FILES =  sparsegraph.o myvarious.o pairlist.o graphlist.o peo.graph.o choldc.o copy.o metropolis_fns.o likelihood.o metropolis.o

  HEADER-FILES = sparsegraph.h pairlist.h graphlist.h myvarious.h chol.h peo.graph.h copy.h likelihood.h metropolis.h

  EXECUTABLES = metropolis

  PROGRAMS = metropolis sparsegraph myvarious pairlist graphlist peo.graph choldc copy likelihood metropolis_fns 

  metropolis: ${OBJECT-FILES}
${CC} -o $@ metropolis.o metropolis_fns.o sparsegraph.o myvarious.o pairlist.o graphlist.o peo.graph.o choldc.o copy.o  likelihood.o  ${LIBRARIES}

 metropolis.o: metropolis.C ${HEADER-FILES}

 metropolis_fns.o: metropolis_fns.C ${HEADER-FILES}

 sparsegraph.o: sparsegraph.C ${HEADER-FILES}

 myvarious.o: myvarious.C ${HEADER-FILES}

 pairlist.o: pairlist.C  ${HEADER-FILES}

 graphlist.o: graphlist.C ${HEADER-FILES}

 peo.graph.o: peo.graph.C ${HEADER-FILES}

 choldc.o: choldc.C chol.h

 copy.o: copy.C  ${HEADER-FILES}

  clean:rm *.o metropolis sparsegraph myvarious pairlist graphlist peo.graph choldc copy likelihood metropolis_fns 

then when i use 然后我用的时候

   make -f Makefile clean

it throws the following output error 它会抛出以下输出错误

make: *** No rule to make target 'rm', needed by 'clean'.Stop.

can anybody figure out the error? 任何人都可以找出错误吗? and how to solve it? 以及如何解决? thanks all! 谢谢大家!

Tokens following the : on the same line as the target are dependencies of that target. 跟在:与目标在同一行上的标记是该目标的依赖关系。 The command must be on the next line, preceded by a tab: 该命令必须位于下一行,前面有一个选项卡:

clean:
    rm *.o metropolis sparsegraph myvarious pairlist graphlist peo.graph choldc copy likelihood metropolis_fns

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 make正在给出错误make:***没有规则使目标“干净”。停止 - make is giving error make: *** No rule to make target `clean'. Stop make:***没有规则来创建目标“ gcc”,这是“ Employee.o”所需要的。 停止 - make: *** No rule to make target `gcc', needed by `Employee.o'. Stop 'distdir-am' 所需的目标'bootstrap' 没有规则。 停止 - No rule to make target 'bootstrap', needed by 'distdir-am'. Stop 没有规则可以制作“Main”所需的目标“Main.o”。 停止 - no rule to make target 'Main.o', needed by 'Main' . Stop Qt。 &#39;Makefile&#39; 需要在 &#39;.pro&#39; 中创建目标的规则。 停止 - Qt. No rule to make target in the '.pro', needed by 'Makefile'. Stop 无需制定目标.moc的规则 - No rule needed to make target .moc .elf不需要制定目标 - No rule to make target, needed by .elf Eclipse IDE生成:***没有规则可用于创建目标……“ core / abi.cpp.o”需要。 停止 - Eclipse IDE make: *** No rule to make target… needed by 'core/abi.cpp.o'. Stop CMake make [2]:***没有规则来创建目标`/path/to/uthash/utarray.h&#39;,这是`HelloTest&#39;所需要的。 停止 - CMake make[2]: *** No rule to make target `/path/to/uthash/utarray.h', needed by `HelloTest'. Stop make:***没有规则将目标“ agenda.cpp”设置为“ agenda”所需。 停止。 #制作Makefile - make: *** No rule to make target 'agenda.cpp', needed by 'agenda'. Stop. #Making Makefile
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM