diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2012-05-24 19:48:15 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2012-05-24 19:48:15 +0000 |
| commit | 937b0a997b4cec020a5c508b3f8a70aa4da8ef44 (patch) | |
| tree | 25f4112c4c46486072cad10f2ffd6add1d6d9fb2 /bin | |
| parent | 648466fc8dd846320a0b3ff5247e3b22d5ef425b (diff) | |
Notes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/sh/Makefile | 2 | ||||
| -rwxr-xr-x | bin/sh/mkbuiltins | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/bin/sh/Makefile b/bin/sh/Makefile index afca8a332af4..cc04aa42db59 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -38,7 +38,7 @@ build-tools: mkinit mknodes mksyntax .ORDER: builtins.c builtins.h builtins.c builtins.h: mkbuiltins builtins.def - cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR} + sh ${.CURDIR}/mkbuiltins ${.CURDIR} init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \ redir.c trap.c var.c diff --git a/bin/sh/mkbuiltins b/bin/sh/mkbuiltins index 49af058461c1..1be7ff149089 100755 --- a/bin/sh/mkbuiltins +++ b/bin/sh/mkbuiltins @@ -35,17 +35,17 @@ # $FreeBSD$ temp=`/usr/bin/mktemp -t ka` -havejobs=0 -if grep '^#define[ ]*JOBS[ ]*1' shell.h > /dev/null -then havejobs=1 -fi havehist=1 if [ "X$1" = "X-h" ]; then havehist=0 shift fi -objdir=$1 -exec > ${objdir}/builtins.c +srcdir=$1 +havejobs=0 +if grep '^#define[ ]*JOBS[ ]*1' $srcdir/shell.h > /dev/null +then havejobs=1 +fi +exec > builtins.c cat <<\! /* * This file was generated by the mkbuiltins program. @@ -57,7 +57,7 @@ cat <<\! ! awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \ - print $0}' builtins.def | sed 's/-[hj]//' > $temp + print $0}' $srcdir/builtins.def | sed 's/-[hj]//' > $temp echo 'int (*const builtinfunc[])(int, char **) = {' awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp echo '}; @@ -74,7 +74,7 @@ awk '{ for (i = 2 ; i <= NF ; i++) { echo ' { NULL, 0, 0 } };' -exec > ${objdir}/builtins.h +exec > builtins.h cat <<\! /* * This file was generated by the mkbuiltins program. |
