tests/make: Add 0107-inference - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit d66da367d6d4052bdcea205b600c84fa30de2bd2
(DIR) parent 61c6638246049b2085f1ef70e5b478c088d1f7da
(HTM) Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 17 Mar 2025 17:26:12 +0100
tests/make: Add 0107-inference
Diffstat:
A tests/make/execute/0107-inference.… | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/tests/make/execute/0107-inference.sh b/tests/make/execute/0107-inference.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+trap 'rm -f $tmp1 $tmp2 f f.?' EXIT INT TERM QUIT HUP
+
+tmp1=tmp1.$$
+tmp2=tmp2.$$
+
+cat >$tmp1 <<EOF
+c99 -O -o f f.c
+EOF
+
+cat >f.c <<'EOF'
+int
+main(void)
+{
+ return 0;
+}
+EOF
+
+touch -d '1970-01-01 00:00:01' f.h
+touch -d '1970-01-01 00:00:03' f
+touch -d '1970-01-01 00:00:04' f.c
+
+scc make -f- <<'EOF' > $tmp2 2>&1
+f: f.h
+
+f.h:
+ touch $@
+EOF
+
+diff $tmp1 $tmp2