diff options
Diffstat (limited to '')
-rw-r--r-- | src/mkbuiltins | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/mkbuiltins b/src/mkbuiltins index d0325c1..5e2cc86 100644 --- a/src/mkbuiltins +++ b/src/mkbuiltins @@ -39,22 +39,9 @@ trap 'rm -f $temp $temp2' EXIT temp=$(tempfile) temp2=$(tempfile) -shell=$1 -builtins=$2 -objdir=$3 -cflags=$4 +builtins=$1 -havehist=1 -if [ -z "${cflags##*-DSMALL*}" ]; then - havehist=0 -fi - -havejobs=1 -if [ -z "${cflags##*-DJOBS=0*}" ]; then - havejobs=0 -fi - -exec > ${objdir}/builtins.c +exec > builtins.c cat <<\! /* * This file was generated by the mkbuiltins program. @@ -64,8 +51,7 @@ cat <<\! #include "builtins.h" ! -awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \ - print $0}' ${builtins} | sed 's/-[hj]//; s/#.*//' > $temp +< $builtins sed '/^#/d; /^$/d' > $temp awk '{ printf "int %s(int, char **);\n", $1}' $temp echo ' const struct builtincmd builtincmd[] = {' @@ -85,7 +71,7 @@ awk '{ for (i = 2 ; i <= NF ; i++) { }' echo '};' -exec > ${objdir}/builtins.h +exec > builtins.h cat <<\! /* * This file was generated by the mkbuiltins program. |