expected 'command =' line Error

607 views
Skip to first unread message

Yann

unread,
Dec 8, 2015, 10:14:24 AM12/8/15
to ninja-build
Hi,

I'm starting to use Ninja 1.6 On Windows , and I don't understand why I'm getting this error:
ninja: error: build.ninja:30: expected 'command =' line

Here's the ninja file :

# build.ninja


ninja_required_version
= 1.6


builddir
= build
rm      
= rm -fr
cc      
= armcc
ar      
= armar


includes
= -I D:\Dev\Keil_5\ARM\RV31\INC $
 
-ID:\Dev\Keil_5\ARM\CMSIS\Include $
 
-ID:\Dev\Keil_5\ARM\Inc\ST\STM32F4xx $
 
-I..\Sources\Components\CL_LIB-MIDI_3\inc_ECU_STM32 $
 
-I..\Sources\Components\CL_LIB-MIDI_3\inc_CMX_STM32 $
 
-I..\Sources\Components\CL_LIB-MIDI_3\inc_STM32F4 $
 
-I..\Sources\Components\CL_LIB-MIDI_3\inc_LIB-MIDI_3 $
 
-I..\Sources\Components\CL_LIB-MIDI_3\inc_SPI_COMM $
 
-I..\Sources\Components\CL_LIB-MIDI_3\inc_KLM_STM32 $
 
-I..\Sources\Components\CL_LIB-MIDI_3\CL_Public $
 
-I..\Sources\UserApp\include $

defines  
= -D__UVISION_VERSION="516" -DBUILD_ECU_1
cflags  
= -c --cpu Cortex-M4 -g -O0 -Otime --apcs=interwork --split_sections $includes $defines

rule compile
command
= $cc $cflags --depend $out.d $in -o $out  <-------  ! Error line !
description
= Building C file $in
depfile
= $out.d
deps
= gcc


rule clean
command
= $rm $builddir
description
= Cleaning directory $builddir


build clean
: clean
build $builddir
\ui_display.o:                      compile ui_display.c




Nico Weber

unread,
Dec 8, 2015, 10:15:53 AM12/8/15
to Yann, ninja-build
Hi Yann,

ninja uses leading whitespace to associate bindings with blocks (similar to python). Try indenting the command, description, depfile, deps lines on lines 30-34 by two spaces. Also do the same for the command and description lines below "rule clean".

Nico

--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages