makefile 多个目标模式。停止

面对makefile中的以下错误


Makefile:54: *** multiple target patterns.  Stop.

makefile 的完整源代码如下


MINGW_HOME ?= C:/mingw

PRODUCTNAME ?= Jitsi

COMPANYNAME ?= jitsi.org

PRODUCTBUILDVERSION ?= 1.0.0.0

PRODUCTBUILDVERSION_COMMA ?= 1,0,0,0

TARGET_BASENAME ?= run

TARGET_DIR ?= ../../../../release/windows/tmp


ifeq ($(wildcard /bin/cygpath.*),/bin/cygpath.exe)

    target.dir := $(shell cygpath --mixed "$(TARGET_DIR)")

    cygwin.target.dir := $(shell cygpath --unix "$(TARGET_DIR)")

else

    target.dir := $(TARGET_DIR)

    cygwin.target.dir := $(TARGET_DIR)

endif


CC = $(MINGW_HOME)/bin/gcc.exe

CPPFLAGS := $(CPPFLAGS) \

    -Wall -Wreturn-type \

    -DPSAPI_VERSION=1 \

    -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 \

    -I$(target.dir) \

    -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32"

LDFLAGS = -mwindows

LIBS = -ladvapi32 -lpsapi


MACHINE = $(shell $(CC) -dumpmachine)

WINDRES = $(MINGW_HOME)/bin/windres.exe

ifneq ("x$(MACHINE)","x")

ifeq ($(wildcard $(MINGW_HOME)/bin/$(MACHINE)-windres.*),$(MINGW_HOME)/bin/$(MACHINE)-windres.exe)

    WINDRES = $(MINGW_HOME)/bin/$(MACHINE)-windres.exe

endif

endif


$(cygwin.target.dir)/$(TARGET_BASENAME).exe: $(cygwin.target.dir)/config.h registry.c run.c $(cygwin.target.dir)/run.res ../setup/nls.c

    **$(CC) $(CPPFLAGS) registry.c run.c $(target.dir)/run.res ../setup/nls.c $(LDFLAGS) -o $(target.dir)/$(TARGET_BASENAME).exe $(LIBS)**

    -$(MINGW_HOME)/$(MACHINE)/bin/strip.exe $(target.dir)/$(TARGET_BASENAME).exe


.PHONY: $(cygwin.target.dir)/config.h



下面给出了第 54 行。


$(CC) $(CPPFLAGS) registry.c run.c $(target.dir)/run.res ../setup/nls.c $(LDFLAGS) -o $(target.dir)/$(TARGET_BASENAME).exe $(LIBS)

这可能是什么原因。


杨魅力
浏览 766回答 2
2回答

繁星淼淼

实际上有一个愚蠢的错误而不是 Tab 空间,有空格导致了问题。

至尊宝的传说

我发生这种情况是因为我:在文件名中有一个。具体来说,我有这个废话./lib/libwww-perl-5.837/share/man/man3/HTTP::Daemon.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Date.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Headers.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Headers::Util.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Message.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Negotiate.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Request.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Request::Common.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Response.3pm./lib/libwww-perl-5.837/share/man/man3/HTTP::Status.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::Authen::Ntlm.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::ConnCache.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::Debug.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::MediaTypes.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::MemberMixin.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::Protocol.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::RobotUA.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::Simple.3pm./lib/libwww-perl-5.837/share/man/man3/LWP::UserAgent.3pm./lib/libwww-perl-5.837/share/man/man3/Net::HTTP.3pm
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java