summaryrefslogtreecommitdiffstats
path: root/bin/sh/Makefile
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2010-11-19 12:56:13 +0000
committerjilles <jilles@FreeBSD.org>2010-11-19 12:56:13 +0000
commit129853101d5707b7d18f28f39e748fa65a36add2 (patch)
treebf15bc2b264e5ca2469d76c04865a14c1e99127c /bin/sh/Makefile
parent7be275d6a786ef414ab769fb1b61fa9a4b041f4d (diff)
downloadFreeBSD-src-129853101d5707b7d18f28f39e748fa65a36add2.zip
FreeBSD-src-129853101d5707b7d18f28f39e748fa65a36add2.tar.gz
sh: Add printf builtin.
This was removed in 2001 but I think it is appropriate to add it back: * I do not want to encourage people to write fragile and non-portable echo commands by making printf much slower than echo. * Recent versions of Autoconf use it a lot. * Almost no software still wants to support systems that do not have printf(1) at all. * In many other shells printf is already a builtin. Side effect: printf is now always the builtin version (which behaves identically to /usr/bin/printf) and cannot be overridden via PATH (except via the undocumented %builtin mechanism). Code size increases about 5K on i386. Embedded folks might want to replace /usr/bin/printf with a hard link to /usr/bin/alias.
Diffstat (limited to 'bin/sh/Makefile')
-rw-r--r--bin/sh/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index 1b0738b..a606c9b 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -5,7 +5,7 @@ PROG= sh
INSTALLFLAGS= -S
SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \
histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
- mystring.c options.c output.c parser.c redir.c show.c \
+ mystring.c options.c output.c parser.c printf.c redir.c show.c \
test.c trap.c var.c
GENSRCS= builtins.c init.c nodes.c syntax.c
GENHDRS= builtins.h nodes.h syntax.h token.h
@@ -26,7 +26,8 @@ WARNS?= 2
WFORMAT=0
.PATH: ${.CURDIR}/bltin \
- ${.CURDIR}/../test
+ ${.CURDIR}/../test \
+ ${.CURDIR}/../../usr.bin/printf
CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
mksyntax mksyntax.o
OpenPOWER on IntegriCloud