# the following make options are automatically configured but can be explicitly set
# options can be used to turn on (-) or off (+) certain features
# possible options and defaults are:
# j monitor(job control) on
# m multibyte mode(on only) automatically configured
# f vfork mode on for BSD, off for Sys V
# s allow suid scripts on and requires /etc/suid_exec
# 4.2 BSD 4.2 on for BSD 4.2, off for Sys V
$(SH): shlib/$(ARK) sh/$(SH)
cpio: $(SHFILES) $(LIBFILES) $(JSHFILES) $(DOCFILES) makefile
ls $(SHFILES) $(LIBFILES) $(JSHFILES) $(DOCFILES) makefile \
| cpio -ocBv > $(RJE)/$(SH).$@
ucpio: $(SHFILES) $(LIBFILES) $(JSHFILES) $(DOCFILES) makefile
find $(SHFILES) $(LIBFILES) $(JSHFILES) $(DOCFILES) makefile \
-newer $(RJE)/$(UTIME) -print | cpio -ocBv > $(RJE)/$(SH).$@
tar: $(SHFILES) $(LIBFILES) $(JSHFILES) $(DOCFILES) makefile
tar -cvpf $(RJE)/$(SH).$@ $(SHFILES) $(LIBFILES) $(JSHFILES) $(DOCFILES)\
utar: $(SHFILES) $(LIBFILES) $(JSHFILES) $(DOCFILES) makefile
tar -cvfp $(RJE)/$(SH).$@ `find \
$(SHFILES) $(LIBFILES) $(JSHFILES) $(DOCFILES) makefile \
-newer $(RJE)/$(UTIME) -print`
shlib/$(ARK): $(LIBFILES)
-cd shlib; if test -f /vmunix \
-o '(' -f /usr/include/sys/stream.h \
-a -f /usr/include/sys/vmparam.h ')'\
-o "$$SYSTYPE" = bsd4.1 \
-o "$$SYSTYPE" = bsd4.2 \
-o "$$SYSTYPE" = bsd4.3 ;then \
BSD="BSD=-DBSD ucb";else BSD=;fi \
;if test -f /usr/lib/dic/euc.dic \
;then MULTIBYTE="MULTIBYTE=-DMULTIBYTE" \
;else case $$OPTIONS in \
*-m*) MULTIBYTE="MULTIBYTE=-DMULTIBYTE";; \
;$(CMD) CC=$(CC) ARK=$(ARK) $$BSD $$MULTIBYTE \
sh/$(SH): $(SHFILES) $(LIBFILES)
cd sh;CMD=$(CMD) ARK=$(ARK) CC=$(CC) ./makesh $(OPTIONS) $(SH); touch $(SH)
cd jsh; if test -d /dev/sxt;then $(CMD) CC=$(CC) ; fi
cd sh;CMD=$(CMD) CC=$(CC) ./makelib; touch $(ELIB)
cd sh; $(CMD) install INSDIR=$(INSDIR)
xcl: $(SHFILES) $(LIBFILES) $(JSHFILES) makefile
xcl $(SHFILES) $(LIBFILES) $(JSHFILES) makefile
$(TROFF) -man sh.1 | $(LPR)