Makefile: missing separator (did you mean TAB instead of 8 spaces?)
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.
Make error: missing separator
As indicated in the online manual, the most common cause for that error is that lines are indented with spaces when make
expects tab characters.
Correct
target:
\tcmd
where \t
is TAB (U+0009
)
Wrong
target:
....cmd
where each .
represents a SPACE (U+0020
).
curl make error: missing separator (did you mean TAB instead of 8 spaces?)
I've encountered this error a few times before. The error message can be misleading a bit. What I found was that the timestamps of the files in the source directory were messed up for me, so I used touch
to update them.
touch ./*
If that doesn't work, try updating all of the files except the Makefile
.
for i in ./*; do [[ $i != ./Makefile ]] && touch $i; done
Then run make
, and the config.status should recheck and proceed with compilation.
makefile:4: *** missing separator. Stop
make defines a tab is required to start each recipe. All actions of every rule are identified by tabs. If you prefer to prefix your recipes with a character other than tab, you can set the .RECIPEPREFIX variable to an alternate character.
To check, I use the command cat -e -t -v makefile_name
.
It shows the presence of tabs with ^I
and line endings with $
. Both are vital to ensure that dependencies end properly and tabs mark the action for the rules so that they are easily identifiable to the make utility.
Example:
Kaizen ~/so_test $ cat -e -t -v mk.t
all:ll$ ## here the $ is end of line ...
$
ll:ll.c $
^Igcc -c -Wall -Werror -02 c.c ll.c -o ll $@ $<$
## the ^I above means a tab was there before the action part, so this line is ok .
$
clean :$
\rm -fr ll$
## see here there is no ^I which means , tab is not present ....
## in this case you need to open the file again and edit/ensure a tab
## starts the action part
Makefile:1: *** missing separator. Stop
It's a tabs problem. Some text editors may replace tabs with white spaces, make sure you use a proper text editor that doesn't mess it up. Open your makefile in vi or any other rudimentary editor, and rewrite that makefile.
Note that after each target rule, one single tab must be placed in the beginning of the line. Everything that comes after that tab is passed on to the shell (there can be more tabs, spaces, and whatever you want, but keep in mind that there must be a tab in the beginning of the line).
Error in make command makefile:18: *** missing separator. Stop
Line 18 is gcc -fPIC -g -c -Wall mymemory.cpp
. Make is expecting a separator, typically :
. It's not detecting this line as a command. You mistyped the intendation: you have spaces where you should have a tab.
Good editors highlight makefile lines that begin with spaces but look like they should begin with a tab instead.
Related Topics
Rename Multiple Directories Matching Pattern
Run Docker in Ubuntu Live Disk
How to Tail -F the Latest Log File with a Given Pattern
How to Check a File Exists and Execute a Command If Not
Is There a Clang Mingw Cross Compiler for Linux
Cannot --Enable-Pcregrep-Libbz2 Because Bzlib.H Was Not Found
Errors in Make File:*** Missing Separator. Stop
Prepend Data from One File to Another
How to Interpret Segment Register Accesses on X86-64
How to Pass an Environment Variable to a Netbeans Makefile on Ubuntu
Arm Linux Atags VS Device Tree
Poorly-Balanced Socket Accepts with Linux 3.2 Kernel VS 2.6 Kernel
What Is the Best Tool to Convert Common Video Formats to Flv on a Linux Cli
When Should the Option Remainafterexit Needs to Be Set True When Creating New Systemd Services
Shared Library Bottleneck on Numa MAChine
Command for Finding Process Using Too Much Cpu