Errors in make file : *** missing separator. Stop

前端 未结 3 508
不思量自难忘°
不思量自难忘° 2020-12-30 19:19

I am facing errors in make file in CentOS 6.02 64 bit. I need to know what should be done to make the makefile workable. Any suggestion will be greatly helpful. My make file

相关标签:
3条回答
  • 2020-12-30 19:58

    Open your make file in vim rather than in editors like gedit. Every line in a recipe must begin with a tab character.

    0 讨论(0)
  • 2020-12-30 20:08

    This answer is for other Make newbies such as myself who find this question from Googling and get stuck because they are modifying a large pre-existing Makefile, with no lines beginning with a space character. My problem occurred because a makefile in a subdirectory with spaces instead of tabs was getting called by a parent makefile, where I erroneously thought the problem existed.

    Once I fixed the makefile in the subdirectory, everything worked like a charm.

    0 讨论(0)
  • 2020-12-30 20:16

    You can find an explanation of this error in Appendix B Errors Generated by Make.

    Every line in a recipe must begin with a tab character. The recipes starting with $(C++) and $(CC) near the top of your file do not seem to start with a tab character.

    Additionally, the section

    INCLUDE = \
        -I./usr/include/sys
        -I./Headers \
    

    seems to be missing a backslash after sys and that same section (and many more) have superfluous empty lines.

    0 讨论(0)
提交回复
热议问题