没有规则来创建目标`/Makefile',这是`Makefile'所需要的 [英] No rule to make target `/Makefile', needed by `Makefile'

查看:897
本文介绍了没有规则来创建目标`/Makefile',这是`Makefile'所需要的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用非常简单的makefile进行"make"制作.我的makefile名为"Makefile",因此我仅使用命令"make".

I'm trying to 'make' using a pretty simple makefile. My makefile is named 'Makefile' so I'm simply using the command 'make'.

我收到这个奇怪的错误:
make: *** No rule to make target `/Makefile', needed by `Makefile'. Stop.

I get this strange error:
make: *** No rule to make target `/Makefile', needed by `Makefile'. Stop.

但是,如果我使用 make -f "full-path-to-makefile"它实际上可以运行(具有奇怪的结果...).我应该说我是从Makefile所在的目录运行所有这些程序.

If, however, I use make -f "full-path-to-makefile" it actually does run (with odd consequences...). I should say that I'm running all this from the directory where the Makefile lies, of course.

我正在使用tcsh在Mac OSX上工作.

I'm working on Mac OSX, using tcsh.

我在LLVM框架中工作,试图编译一个传递函数,这是相关的makefile:

I'm working in the LLVM framework, trying to compile a pass function and this is the associated makefile:


LEVEL = ../../../
LIBRARYNAME = FunctionName
LOADABLE_MODULE = 1
include $(LEVEL)/Makefile.common

任何想法都将不胜感激:)

Any ideas will be appreciated :)

推荐答案

我找到了答案,类似于:

I found the answer, sort of:

问题出在LLVM的安装过程中.看来,如果您以一种顺序而不是另一种顺序进行安装,则可能导致此错误.这对我来说没有任何意义,但是在我正确安装它之后,所有东西都可以很好地编译(相同的代码,相同的Makefile,相同的make程序).

The problem was with the installation process of LLVM. It seems that if you do the installation in one order instead of another it can lead to this error. It doesn't make any sense to me, but after I installed it properly everything compiles great (same code, same Makefile, same make program).

我真的不知道为什么会这样,但是我知道如何解决它:)

I don't really know why this happened, but I know how to fix it :)

您要做的是再次./configure,然后从基本目录中进行配置(与网站上的说明相反).那对我有用.

What you want to do is ./configure again then make from the base directory (contrary to what is stated in the instructions on the web-site). That worked for me.

顺便说一句-我在Ubuntu上运行时得到了相同的结果(具有相同的修复程序).

BTW - I got the same results running on Ubuntu (with the same fix).

这篇关于没有规则来创建目标`/Makefile',这是`Makefile'所需要的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆