From d148f78a5c8a71d86da4ab503bb6b3e2e36f4bf0 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 20 Jun 2017 19:07:31 +0200 Subject: [PATCH] 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. --- make/check-mlibc.make | 3 +++ make/check.make | 3 +++ scaffold/scaffold.make | 10 +++++----- tinycc/tinycc.make | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 make/check-mlibc.make diff --git a/make/check-mlibc.make b/make/check-mlibc.make new file mode 100644 index 00000000..15a132b4 --- /dev/null +++ b/make/check-mlibc.make @@ -0,0 +1,3 @@ +ifneq ($(CC32),) +include make/check.make +endif diff --git a/make/check.make b/make/check.make index acfaab26..a7929b50 100644 --- a/make/check.make +++ b/make/check.make @@ -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 + diff --git a/scaffold/scaffold.make b/scaffold/scaffold.make index 803f424b..be1c89ee 100644 --- a/scaffold/scaffold.make +++ b/scaffold/scaffold.make @@ -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) diff --git a/tinycc/tinycc.make b/tinycc/tinycc.make index c9f1e705..ead98845 100644 --- a/tinycc/tinycc.make +++ b/tinycc/tinycc.make @@ -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