test: Support for non-Guix[SD]: cater for missing CC/CC32 compilers.

* make/check.make: Skip if CC is not set.
* make/check-mlibc.make: New file.
* scaffold/scaffold.make: Use it for mlibc targets.
* tinycc/tinycc.make: Skip mlibc targets if CC32 not set.
This commit is contained in:
Jan Nieuwenhuizen 2017-06-20 19:07:31 +02:00
parent c1d91c722d
commit d148f78a5c
4 changed files with 13 additions and 5 deletions

3
make/check-mlibc.make Normal file
View file

@ -0,0 +1,3 @@
ifneq ($(CC32),)
include make/check.make
endif

View file

@ -1,3 +1,4 @@
ifneq ($(CC),)
ifeq ($(TEST),)
TEST:=$(TARGET)-check
$(TEST): EXPECT:=$(EXPECT)
@ -13,4 +14,6 @@ endif
CHECK+=$(TEST)
$(TEST): TEST:=$(TEST)
$(DIR)-check: $(TEST)
endif
include make/reset.make

View file

@ -42,7 +42,7 @@ include make/bin-mlibc.make
TARGET:=m.mlibc
EXPECT:=255
include make/check.make
include make/check-mlibc.make
TARGET:=hello.mlibc
C_FILES:=$(DIR)/hello.c
@ -50,7 +50,7 @@ include make/bin-mlibc.make
TARGET:=hello.mlibc
EXPECT:=42
include make/check.make
include make/check-mlibc.make
TARGET:=micro-mes.mlibc
C_FILES:=$(DIR)/micro-mes.c
@ -59,21 +59,21 @@ include make/bin-mlibc.make
TEST:=micro-mes.mlibc-check
$(TEST): $(OUT)/micro-mes.mlibc
$< 2 3; r=$$?; [ $$r = 3 ]
include make/check.make
include make/check-mlibc.make
TARGET:=t.mlibc
C_FILES:=$(DIR)/t.c
include make/bin-mlibc.make
TARGET:=t.mlibc
include make/check.make
include make/check-mlibc.make
TARGET:=t-tcc.mlibc
C_FILES:=$(DIR)/t-tcc.c
include make/bin-mlibc.make
TARGET:=t-tcc.mlibc
include make/check.make
include make/check-mlibc.make
CROSS:=$(CC32:%gcc=%)
#$(OUT)/$(DIR)/mini-mes.$(CROSS)o: $(SNARF.MES)

View file

@ -73,6 +73,7 @@ TINYCC_REST:=\
#
define tinycc-test
ifneq ($(CC32),)
EXT:=mlibc
TARGET:=$(1).mlibc
C_FILES:=$$(TINYCC_TEST2)/$(1).c
@ -82,6 +83,7 @@ include make/bin-mlibc.make
EXT:=mlibc
TARGET:=$(1).mlibc
include make/check-tinycc.make
endif
EXT:=guile
TARGET:=$(1).guile