floube
floube

Reputation: 15

Makefile: missing separator (did you mean TAB instead of 8 spaces?)

My generated makefile doesn't execute, instead it throws the following error: vbsp_linux32.mak:34: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.

I've read like 30 pages, which all come to the same conclusion (spaces in front of commands) which I am not able to find/solve in this makefile:

http://pastebin.com/2cYd8Jhj

OS: Debian Jessie

Make version: 4.0

Upvotes: 0

Views: 25404

Answers (1)

CristiFati
CristiFati

Reputation: 41137

Line 34 is a command.

call ..\..\vpc_scripts\valve_p4_edit.cmd ..\..\..\game\bin\$(TargetFileName) ..\..

According to GNU make manual (you can go over the whole page):

Makefiles contain five kinds of things: explicit rules, implicit rules, variable definitions, directives, and comments. Rules, variables, and directives are described at length in later chapters.

In other words you can have commands in a Makefile but (most common case) in rules.

However this is only one of many errors the Makefile contains. Looking at it i see that it was translated from Windows:

  • backslashes as path separators
  • copy

    copy "$(TargetDir)"$(TargetFileName) ..\..\..\game\bin\$(TargetFileName)
    
  • call

    call ..\..\vpc_scripts\valve_p4_edit.cmd ..\..\..\game\bin\$(TargetFileName) ..\..
    
  • ERRORLEVEL

    if ERRORLEVEL 1 goto BuildEventFailed
    
  • and others

So there is some work to do til it will work on Linux.

Upvotes: 3

Related Questions