scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 0dc121edaac1b54277f2eac7c3fac45746326ff2
parent 5eedaa9f030481f63ab828c89c0623068fd2b7a7
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Wed, 11 Feb 2026 14:44:44 +0100

tests/make: Fix mistakes after trap changes

Diffstat:
Mtests/make/execute/0039-rules.sh | 3++-
Mtests/make/execute/0094-expansion.sh | 29++++++++++++++++-------------
2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/tests/make/execute/0039-rules.sh b/tests/make/execute/0039-rules.sh @@ -1,9 +1,10 @@ #!/bin/sh -trap 'rm -f $tmp1 file?' EXIT +trap 'rm -f $tmp1 $tmp2 file?' EXIT trap 'exit $?' HUP INT TERM tmp1=tmp1.$$ +tmp2=tmp2.$$ touch $tmp2 diff --git a/tests/make/execute/0094-expansion.sh b/tests/make/execute/0094-expansion.sh @@ -1,11 +1,24 @@ #!/bin/sh -trap 'rm -f $tmp1' EXIT +trap 'rm -f $tmp1 $tmp2' EXIT trap 'exit $?' HUP INT TERM tmp1=tmp1.$$ +tmp2=tmp2.$$ -$EXEC scc make -f- <<'EOF' > $tmp1 2>&1 +cat > $tmp1 <<EOF +file1.o file2.o +all +alp +all.o +file1.c file2.c +file1 file2 +file1.e file2.e +file1.c file2.c +all +EOF + +$EXEC scc make -f- <<'EOF' > $tmp2 2>&1 O = o SRC = file1.c file2.c OBJ = $(SRC:.c=.$O) @@ -44,14 +57,4 @@ all: @echo ${@:=} EOF -diff $tmp1 - <<EOF -file1.o file2.o -all -alp -all.o -file1.c file2.c -file1 file2 -file1.e file2.e -file1.c file2.c -all -EOF +diff $tmp1 $tmp2