#!/bin/sh FPUFILES=" Versions bits/fenv.h bits/mathdef.h bits/mathinline.h e_sqrt.c e_sqrtf.c fclrexcpt.c fe_nomask.c fegetenv.c fegetround.c feholdexcpt.c fenv_const.c fenv_libc.h fesetenv.c fesetround.c feupdateenv.c fgetexcptflg.c fpu_control.h fraiseexcpt.c fsetexcptflg.c ftestexcept.c s_copysign.S s_copysignf.S s_fabs.S s_fabsf.S s_fmax.S s_fmaxf.S s_fmin.S s_fminf.S s_isnan.c s_isnanf.S s_lrint.c s_lrintf.S s_rint.c s_rintf.c t_sqrt.c w_sqrt.c w_sqrtf.c " FPUDISTFILES="fenv_const.c fenv_libc.h fe_nomask.c t_sqrt.c " MAKEFILE='-ifeq ($(subdir),math) -libm-support += fenv_const fe_nomask t_sqrt -endif' patch -p1 cd sysdeps/powerpc #|| exit 1 mkdir -p fpu/bits || exit 2 for a in $FPUFILES; do mv "$a" "fpu/$a" && echo "Moved $a -> fpu/$a" done fail= for a in $FPUDISTFILES; do echo "$a" >> fpu/Dist || fail=1 done test "$fail" || echo "Created fpu/Dist" echo "$MAKEFILE" >fpu/Makefile && echo "Created fpu/Makefile"