xref: /third_party/musl/libc-test/src/math/gen/gentests.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/libc-test/src/math/gen/
1570af302Sopenharmony_ci#!/bin/sh
2570af302Sopenharmony_ci
3570af302Sopenharmony_ciD=..
4570af302Sopenharmony_cised 's/^T(//;s/,//;s/)//' functions.h | while read N T
5570af302Sopenharmony_cido
6570af302Sopenharmony_ci	[ "$T" ] || continue
7570af302Sopenharmony_ci
8570af302Sopenharmony_ci	[ -e $D/$N.c ] || {
9570af302Sopenharmony_ci		cp template/$T.c $D/$N.c || continue
10570af302Sopenharmony_ci		ND=`echo $N |sed 's/l$//'`
11570af302Sopenharmony_ci
12570af302Sopenharmony_ci		H=''
13570af302Sopenharmony_ci		for i in crlibm/$N.h ucb/$N.h sanity/$N.h
14570af302Sopenharmony_ci		do
15570af302Sopenharmony_ci			[ -e $D/$i ] && H="$H#include \"$i\"\\n"
16570af302Sopenharmony_ci		done
17570af302Sopenharmony_ci		DH=''
18570af302Sopenharmony_ci		for i in crlibm/$ND.h ucb/$ND.h sanity/$ND.h
19570af302Sopenharmony_ci		do
20570af302Sopenharmony_ci			[ -e $D/$i ] && DH="$DH#include \"$i\"\\n"
21570af302Sopenharmony_ci		done
22570af302Sopenharmony_ci
23570af302Sopenharmony_ci		sed -i "s/___/$N/g;s,DHEADERS,$DH,;s,HEADERS,$H," $D/$N.c
24570af302Sopenharmony_ci	}
25570af302Sopenharmony_cidone
26

Indexes created Thu Nov 07 10:32:03 CST 2024