% cd usr.bin/tty/
% sudo make clean
rm -f tty tty.full tty.debug tty.o tty.1.gz tty.1.cat.gz
% sudo make
cc -O2 -pipe -g -MD -MP -MF.depend.tty.o -MTtty.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c /usr/home/sbz/src/usr.bin/tty/tty.c -o tty.o
cc -O2 -pipe -g -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -o tty.full tty.o
objcopy --only-keep-debug tty.full tty.debug
objcopy --strip-debug --add-gnu-debuglink=tty.debug tty.full tty
gzip -cn /usr/home/sbz/src/usr.bin/tty/tty.1 > tty.1.gz
% /usr/obj/usr/home/sbz/src/usr.bin/tty/tty --help
tty: illegal option -- -
usage: tty [-s]
% echo $?
64
% /usr/obj/usr/home/sbz/src/usr.bin/tty/tty
/dev/pts/7
% echo $?
0
% echo | /usr/obj/usr/home/sbz/src/usr.bin/tty/tty
not a tty
% echo $?
1