Make 文件给出 *** 缺少分隔符
Make file gives *** missing separator
我正在尝试构建 pjsip 项目..
这是我的 pjsip 项目 make 文件..
include ../../../build.mak
include ../../../build/common.mak
export LIBDIR := ../../lib
RULES_MAK := $(PJDIR)/build/rules.mak
#export MYCOMPRESS_LIB := ../../lib/lmycompresslib-$(TARGET_NAME)$(LIBEXT)
export MYCOMPRESS_LIB := lmycompresslib-$(TARGET_NAME)$(LIBEXT)
ifeq ($(PJ_SHARED_LIBRARIES),)
else
export MYCOMPRESS_SONAME := lmycompresslib.$(SHLIB_SUFFIX)
export MYCOMPRESS_SHLIB := $(MYCOMPRESS_SONAME).$(PJ_VERSION_MAJOR)
endif
###############################################################################
# Gather all flags.
#
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CFLAGS) $(CC_INC). $(CC_INC)../../mycompresslib/include \
$(CC_INC)../../../pjlib/include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
$(LDFLAGS)
export MYCOMPRESS_SRCDIR = ../../mycompresslib/src
export MYCOMPRESS_OBJS = mycompress.o
export MYCOMPRESS_CFLAGS = $(_CFLAGS)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
###############################################################################
# Main entry
#
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
#
#TARGETS := lmycompresslib
TARGETS := $(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME)
all: $(TARGETS)
doc:
cd .. && doxygen docs/doxygen.cfg
dep: depend
distclean: realclean
#.PHONY: dep depend lmycompresslib clean realclean distclean
.PHONY: all dep depend clean realclean distclean
.PHONY: $(TARGETS)
.PHONY: $(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME)
#lmycompresslib:
# $(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $(MYCOMPRESS_LIB)
lmycompresslib: $(MYCOMPRESS_LIB)
$(MYCOMPRESS_SONAME): $(MYCOMPRESS_LIB)
$(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME):
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
clean print_lib:
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
realclean:
$(subst @@,$(subst /,$(HOST_PSEP),.lmycompresslib-$(TARGET_NAME).depend),$(HOST_RMR))
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
depend:
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
这是我得到的错误..
.depend:1: *** missing separator. Stop.
我使用这个命令来验证我的 makefile 中是否只有选项卡
cat -e -t -v makefile
但是当我尝试构建这个项目时仍然出现上述错误。
发现 solution.This 由于依赖文件损坏而发生,可能是因为 make dep 停止或被停止 abruptly.It 实际上在网站上给出 itself.All 我需要做的是发出这个命令.
make distclean
这也导致在网站上提到 errors.As,它指示我删除所有损坏的依赖项 files.Following 另一个 pjsip 邮件 link
$ find . -name "*.depend" -print | xargs rm -f
发出此命令后,它删除了所有损坏的依赖关系,然后我就能够成功编译和构建我的项目。
我正在尝试构建 pjsip 项目.. 这是我的 pjsip 项目 make 文件..
include ../../../build.mak
include ../../../build/common.mak
export LIBDIR := ../../lib
RULES_MAK := $(PJDIR)/build/rules.mak
#export MYCOMPRESS_LIB := ../../lib/lmycompresslib-$(TARGET_NAME)$(LIBEXT)
export MYCOMPRESS_LIB := lmycompresslib-$(TARGET_NAME)$(LIBEXT)
ifeq ($(PJ_SHARED_LIBRARIES),)
else
export MYCOMPRESS_SONAME := lmycompresslib.$(SHLIB_SUFFIX)
export MYCOMPRESS_SHLIB := $(MYCOMPRESS_SONAME).$(PJ_VERSION_MAJOR)
endif
###############################################################################
# Gather all flags.
#
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CFLAGS) $(CC_INC). $(CC_INC)../../mycompresslib/include \
$(CC_INC)../../../pjlib/include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
$(LDFLAGS)
export MYCOMPRESS_SRCDIR = ../../mycompresslib/src
export MYCOMPRESS_OBJS = mycompress.o
export MYCOMPRESS_CFLAGS = $(_CFLAGS)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
###############################################################################
# Main entry
#
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
#
#TARGETS := lmycompresslib
TARGETS := $(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME)
all: $(TARGETS)
doc:
cd .. && doxygen docs/doxygen.cfg
dep: depend
distclean: realclean
#.PHONY: dep depend lmycompresslib clean realclean distclean
.PHONY: all dep depend clean realclean distclean
.PHONY: $(TARGETS)
.PHONY: $(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME)
#lmycompresslib:
# $(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $(MYCOMPRESS_LIB)
lmycompresslib: $(MYCOMPRESS_LIB)
$(MYCOMPRESS_SONAME): $(MYCOMPRESS_LIB)
$(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME):
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
clean print_lib:
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
realclean:
$(subst @@,$(subst /,$(HOST_PSEP),.lmycompresslib-$(TARGET_NAME).depend),$(HOST_RMR))
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
depend:
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
这是我得到的错误..
.depend:1: *** missing separator. Stop.
我使用这个命令来验证我的 makefile 中是否只有选项卡
cat -e -t -v makefile
但是当我尝试构建这个项目时仍然出现上述错误。
发现 solution.This 由于依赖文件损坏而发生,可能是因为 make dep 停止或被停止 abruptly.It 实际上在网站上给出 itself.All 我需要做的是发出这个命令.
make distclean
这也导致在网站上提到 errors.As,它指示我删除所有损坏的依赖项 files.Following 另一个 pjsip 邮件 link
$ find . -name "*.depend" -print | xargs rm -f
发出此命令后,它删除了所有损坏的依赖关系,然后我就能够成功编译和构建我的项目。