put /local/tests {array rand}
put /local/tester {../../libmawk/lmawk}

print [@
# Generated by scconfig from Makefile.in

all:@]

foreach /local/n in /local/tests
	print [@@/local/n@.diff@]
end

print {\n	@echo "QC passed."}

foreach /local/n in /local/tests
print [^
^/local/n^.out: ^/local/n^.awk ^/local/tester^
	@^/local/tester^ -f ^/local/n^.awk > ^/local/n^.out

^/local/n^.diff: ^/local/n^.OUT ^/local/n^.out
	@diff ^/local/n^.OUT ^/local/n^.out
^]
end

print [@
clean:
	rm @]

foreach /local/n in /local/tests
	print [@ @/local/n@.diff @/local/n@.out@]
end

print { 2>/dev/null; true\n\n}
