test: Support for non-Guix[SD]: cater for missing CC/CC32 compilers.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 20 Jun 2017 17:07:31 +0000 (19:07 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 20 Jun 2017 17:47:15 +0000 (19:47 +0200)
* 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 [new file with mode: 0644]
make/check.make
scaffold/scaffold.make
tinycc/tinycc.make

diff --git a/make/check-mlibc.make b/make/check-mlibc.make
new file mode 100644 (file)
index 0000000..15a132b
--- /dev/null
@@ -0,0 +1,3 @@
+ifneq ($(CC32),)
+include make/check.make
+endif
index acfaab26ef305e9447ff5ec017946d6b0fd8324d..a7929b50d2f7db6c0592b24bddaff4167113001f 100644 (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
+
index 803f424b19f8f33b23a13efb8255c0b906cc45a2..be1c89ee6f7ef35998a3cd241858a7dac2a809fb 100644 (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)
index c9f1e7056aa10be1ac3ed9f681a2f939e25b1cc9..ead9884584b3936d3ec0e8f41a8ea4f58304d542 100644 (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