Files
ioccc/var.mk
T
Landon Curt Noll 606020a0c1 fix tty annoyance of 1989/jar.1
Instead of writing the literal output of the binary to /dev/tty,
we simulate the output by silencing stderr and by piping the binary
thru strings.

The raw binary executable output to /dev/tty was capable "ill effects".
Such "ill effects" could be as mild as printing strange characters, to
beeping (sometimes for extended periods), and even the termination
of the terminal app window in some cases.

The "ill effects" from the printing of the raw binary executable
is highly dependent on the compiler, compiler version, libc, crt0.o,
operating system, terminal app and/or terminal driver.  As such,
the "ill effects" that one user might see may be hard to reproduce
in order environments.  While some of the more extreme "ill effects"
might be unlikely, what was more common was for the binary output
to be interpreted strangely by the terminal app and/or driver to
the extent that the was lost or not well seen by the user.

This change introduces the ${STRINGS} Makefile variable to the
`/var/mk` file and uses to to "clean out" any output that might
produce such "ill effects".  Prior to the command, the echo does
clearly state:

```
NOTE: We will now simulate: cc -c -o /dev/tty jar.1.c
```

We also modify the `1989/jar.1/jar.1.sh` and `1989/jar.1/jar.1.alt.sh'
shell scripts to pipe raw binary through strings as well.

Thus the user can, if they wish, try the raw command themselves.
If that command does produce the more extreme examples of "ill
effects", the fault rests with the user.  We mention that the
Makefile will echo the command to stdout in the `README.md`.  But
that is as far as we go.  We do **NOT RECOMMEND** having a shell
script or Makefile rule that would write the raw binary to `/dev/tty`
but rather let the immigration of the user try or not try it.

In general, the use piping raw binary thru stings makes the original
output more apparent, as was the case when using dumb CRT terminals
that couldn't even process ANSI escape sequences were more common.
2023-07-09 13:55:14 -07:00

305 lines
4.3 KiB
Makefile

#######################
# common tool locations
#######################
#
A2P= a2p
AR= ar
ASA= asa
AT= at
ATQ= atq
ATRM= atrm
AWK= awk
BANNER= banner
BASE64= base64
BASENAME= basename
BASH= bash
BATCH= batch
BC= bc
BINHEX= binhex
BISON= bison
BUNZIP2= bunzip2
BZCAT= bzcat
BZCMP= bzcmp
BZDIFF= bzdiff
BZEGREP= bzegrep
BZFGREP= bzfgrep
BZGREP= bzgrep
BZIP2= bzip2
BZLESS= bzless
BZMORE= bzmore
C2PH= c2ph
C89= c89
C99= c99
CAL= cal
CALC= calc
CAT= cat
CD= cd
CHFLAGS= chflags
CHGRP= chgrp
CHMOD= chmod
CKSUM= cksum
CLANG= clang
CLANG_PLUSPLUS= clang++
CLEAR= clear
CMP= cmp
COL= col
COLLDEF= colldef
COLRM= colrm
COLUMN= column
COMPRESS= compress
CP= cp
CPIO= cpio
CPP= cpp
CRC32= crc32
CSH= csh
CSPLIT= csplit
CURL= curl
CUT= cut
C_PLUSPLUS= c++
C_PLUSPLUS_FILT= c++filt
DATE= date
DC= dc
DD= dd
DF= df
DIFF3= diff3
DIFF= diff
DIG= dig
DIRNAME= dirname
ED= ed
EGREP= grep -E
ENV= env
EQN= eqn
ETAGS= etags
EXPECT= expect
EXPR= expr
FALSE= false
FGREP= fgrep
FILE= file
FIND2PERL= find2perl
FIND= find
FLEX= flex
FLEX_PLUSPLUS= flex++
FMT= fmt
FOLD= fold
FS_USAGE= fs_usage
FUNZIP= funzip
FUSER= fuser
GCC= gcc
GDIFFMK= gdiffmk
GENCAT= gencat
GENSTRINGS= genstrings
GETOPT= getopt
GETOPTS= getopts
GINDENT= gindent
GNUMAKE= gnumake
GREP= grep
GROFF= groff
GROFFER= groffer
GROG= grog
GROPS= grops
GROTTY= grotty
GUNZIP= gunzip
GVIM= gvim
GZCAT= gzcat
GZEXE= gzexe
GZIP_PROG= gzip
G_PLUSPLUS= g++
H2PH= h2ph
H2XS= h2xs
HASH= hash
HEAD= head
HOSTNAME_PROG= hostname
ICONV= iconv
ID= id
INDENT= indent
INFO= info
JOT= jot
KILL= kill
KSH= ksh
LAST= last
LD= ld
LEX= len
LINK= link
LN= ln
LS= ls
M4= m4
MAKE= make
MAN= man
MKDIR= mkdir
MKFIFO= mkfifo
MKTEMP= mktemp
MV= mv
NANO= nano
NASM= nasm
NEQN= neqn
NICE= nice
NL= nl
NM= nm
NOHUP= nohup
NROFF= nroff
NSLOOKUP= nslookup
OD= od
OPENSSL= openssl
PASTE= paste
PATCH= patch
PATHCHK= pathchk
PAX= pax
PERL= perl
PICO= pico
PR= pr
PRINTENV= printenv
PS= ps
PTAR= ptar
PTARDIFF= ptardiff
PTARGREP= ptargrep
PWD= pwd
PYDOC= pydoc
PYTHON= python
PYTHONW= pythonw
READLINK= readlink
RENICE= renice
RESET= reset
REV= rev
RI= ri
RM= rm
RMDIR= rmdir
RSYNC= rsync
RUBY= ruby
RVIM= rvim
SAY= say
SCP= scp
SCREEN= screen
SCRIPT= script
SDIFF= sdiff
SDL1_CONFIG= sdl-config
SDL2_CONFIG= sdl2-config
SED= sed
SEQ= seq
SFTP= sftp
SH= sh
SHA1= sha1
SHA= sha
SHAR= shar
SHASUM5_18= shasum5.18
SHASUM= shasum
SIZE= size
SLEEP= sleep
SORT= sort
SSH= ssh
STAT= stat
STRINGS= strings
STRIP= strip
STTY= stty
SUM= sum
SYNC= sync
TABS= tabs
TAIL= tail
TAR= tar
TEE= tee
TEST= test
TFTP= tftp
TIDY= tidy
TIME= time
TOP= top
TOUCH= touch
TPUT= tout
TPUT= tput
TR= tr
TROFF= troff
TRUE= true
TSET= tset
TSORT= tsort
UL= ul
UNAME= uname
UNCOMPRESS= uncompress
UNEXPAND= unexpand
UNIFDEF= unifdef
UNIFDEFALL= unifdefall
UNIQ= uniq
UNITS= units
UNLINK= unlink
UNZIP= unzip
UNZIPSFX= unzipsfx
UPTIME= uptime
UUDECODE= uudecode
UUENCODE= uuencode
UUIDGEN= uuidgen
VI= vi
VIEW= view
VIM= vim
VIMDIFF= vimdiff
W= w
WAIT4PATH= wait4path
WAIT= wait
WC= wc
WGET= wget
WHAT= what
WHATIS= whatis
WHICH= which
WHO= who
WHOAMI= whoami
WHOIS= whois
WRTIE= write
XAR= xar
XARGS= xargs
XATTR= xattr
XXD= xxd
YACC= yacc
YES= yes
ZCAT= zcat
ZCMP= zcmp
ZDIFF= zdiff
ZEGREP= zegrep
ZFGREP= zfgrep
ZFORCE= zforce
ZGREP= zgrep
ZIP= zip
ZIPCLOAK= zipcloak
ZIPGREP= zipgrep
ZIPINFO= zipinfo
ZIPNOTE= zipnote
ZIPSPLIT= zipsplit
ZLESS= zless
ZMORE= zmore
ZNEW= znew
ZPRINT= zprint
ZSH= zsh
#####
# X11
#####
# Set X11_LIBDIR to the directory where the X11 library resides
#
#X11_LIBDIR= /usr/X11R6/lib
#X11_LIBDIR= /usr/X11/lib
X11_LIBDIR= /opt/X11/lib
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
#
#X11_INCDIR= /usr/X11R6/include
#X11_INCDIR= /usr/X11/include
X11_INCDIR= /opt/X11/include
##########################
# SD1 and SDL2 libraries #
##########################
#
# For details on how to install SDL/SDL2 see faq.md.
#
# SDL2_INCLUDE_ROOT is the directory under which include/SDL/ and/or
# include/SDL2/ may be found.
#
# Even if you do not use Homebrew (one of the methods for macOS), you might set
# the environment variable $HOMEBREW_PREFIX to the SDL2_INCLUDE_ROOT directory
# path as the default SDL2_INCLUDE_ROOT value is $HOMEBREW_PREFIX. Of you may
# run make and set SDL2_INCLUDE_ROOT directly:
#
# make all SDL2_INCLUDE_ROOT=/some/path
#
#SDL2_INCLUDE_ROOT= /usr
#SDL2_INCLUDE_ROOT= /opt/homebrew
SDL2_INCLUDE_ROOT= ${HOMEBREW_PREFIX}