gpt4 book ai didi

java - makefile 多目标模式。停止

转载 作者:行者123 更新时间:2023-12-02 10:44:22 24 4
gpt4 key购买 nike

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

$(cygwin.target.dir)/config.h:
-rm.exe -f ../../../../resources/install/windows/config.h
echo #define PRODUCTNAME "$(PRODUCTNAME)" > $(cygwin.target.dir)/config.h
echo #define COMPANYNAME "$(COMPANYNAME)" >> $(cygwin.target.dir)/config.h
echo #define PRODUCTBUILDVERSION "$(PRODUCTBUILDVERSION)" >> $(cygwin.target.dir)/config.h
echo #define PRODUCTBUILDVERSION_COMMA $(PRODUCTBUILDVERSION_COMMA) >> $(cygwin.target.dir)/config.h
echo #define TARGET_BASENAME "$(TARGET_BASENAME)" >> $(cygwin.target.dir)/config.h
echo #define TARGET_BASENAME_EXE "$(TARGET_BASENAME).exe" >> $(cygwin.target.dir)/config.h

$(cygwin.target.dir)/run.res: $(cygwin.target.dir)/config.h run.rc
$(WINDRES) -I../../../../resources/install/windows -I$(target.dir) run.rc -O coff -o $(target.dir)/run.res

行号 54 如下所示。

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

可能的原因是什么?

最佳答案

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

关于java - makefile 多目标模式。停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52695775/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com