1#!/bin/bash
2
3# build each command as a standalone executable
4
5NOBUILD=1 scripts/make.sh > /dev/null &&
6${HOSTCC:-cc} -I . scripts/install.c -o generated/instlist &&
7export PREFIX=${PREFIX:-change/} &&
8mkdir -p "$PREFIX" || exit 1
9
10# Build all the commands standalone except:
11
12# sh - shell builtins like "cd" and "exit" need the multiplexer
13# help - needs to know what other commands are enabled (use command --help)
14
15for i in $(generated/instlist | egrep -vw "sh|help")
16do
17  echo -n " $i" &&
18  scripts/single.sh $i > /dev/null 2>$PREFIX/${i}.bad &&
19    rm $PREFIX/${i}.bad || echo -n '*'
20done
21echo
22