makefile.tmpl: fix error handling and cleanups
This changes the indentation of all non-recipe lines from tabs to 2 spaces. While this doesn't fix anything, it avoids either make or someone interpreting those lines as a make recipe. This also fixes the error handling by using make's $(error) function instead. Previously make gave this syntax error whenever it hit the error handling code: ``` *** recipe commences before first target. Stop. ```
This commit is contained in:
parent
d3f0f87e81
commit
675b271aa6
1 changed files with 56 additions and 59 deletions
|
|
@ -65,8 +65,7 @@ ifeq ($(uos),haiku)
|
||||||
myos = haiku
|
myos = haiku
|
||||||
endif
|
endif
|
||||||
ifndef uos
|
ifndef uos
|
||||||
@echo "Error: unknown operating system: $(uos)"
|
$(error unknown operating system: $(uos))
|
||||||
@exit 1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ucpu),i386)
|
ifeq ($(ucpu),i386)
|
||||||
|
|
@ -131,8 +130,7 @@ ifeq ($(ucpu),armv6l)
|
||||||
mycpu = arm
|
mycpu = arm
|
||||||
endif
|
endif
|
||||||
ifndef ucpu
|
ifndef ucpu
|
||||||
@echo "Error: unknown processor : $(ucpu)"
|
$(error unknown processor : $(ucpu))
|
||||||
@exit 1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# for osA in 1..c.oses.len:
|
# for osA in 1..c.oses.len:
|
||||||
|
|
@ -150,8 +148,7 @@ endif
|
||||||
# end for
|
# end for
|
||||||
|
|
||||||
ifeq ($(strip $(oFiles)),)
|
ifeq ($(strip $(oFiles)),)
|
||||||
@echo "Error: no C code generated for: [$(myos): $(mycpu)]"
|
$(error no C code generated for: [$(myos): $(mycpu)])
|
||||||
@exit 1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue