1
votes

I am trying to build pjsip project.. This is my pjsip projects make file..

 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 $@

this is the error i get..

.depend:1: *** missing separator. Stop.

I used this command to verify if there are only tabs in my makefile using this command

cat -e -t -v makefile

But still i get the above error when i am trying to build this project.

1
The error is in a file named .depend which you haven't shown us. You haven't even shown the makefile that includes .depend; it must be in one of the recursive make invocations.MadScientist

1 Answers

4
votes

Found the solution.This happens because of corrupt dependency file, probably because make dep stopped or was stopped abruptly.It was given actually in website itself.All i need to do was issue this command.

make distclean

this too resulted in errors.As mentioned on site, it instructed me to delete all corrupted dependency files.Following another pjsip mail link

$ find . -name "*.depend" -print | xargs rm -f

After issuing this command,it deleted all corrupted dependancy i was then able to compile and build my project successfully.