"Fossies" - the Fresh Open Source Software Archive

Member "tcsh-6.22.03/Makefile.std" (18 Nov 2020, 20244 Bytes) of package /linux/misc/tcsh-6.22.03.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile.std": 6.22.02_vs_6.22.03.

    1 #
    2 # C Shell with process control; VM/UNIX VAX Makefile
    3 # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
    4 #
    5 # With an input editor, command completion, etc. and ported to all sorts of
    6 # things; Paul Placeway, CIS Dept., Ohio State University
    7 #
    8 SHELL=/bin/sh
    9 VERSION=6.12
   10 BUILD=tcsh
   11 srcdir=.
   12 
   13 ################################################################
   14 ## CFLAGS.  For various -D things, see config.h
   15 ################################################################
   16 #
   17 # These are the default suffixes from .c to .o and -c to get there
   18 # but to use the global optimizer on the mips boxes, see below
   19 #
   20 SUF=o
   21 CF=-c
   22 
   23 INCLUDES=-I. -I$(srcdir)
   24 
   25 LFLAGS=$(INCLUDES)
   26 #LFLAGS=$(INCLUDES) -Zn10000		# hpux lint
   27 
   28 
   29 #CFLAGS= $(INCLUDES) -g			# debug
   30 #CFLAGS= $(INCLUDES) -O			# production
   31 #CFLAGS= $(INCLUDES) 			# Broken optimizers....
   32 
   33 #CFLAGS= -g -pg $(INCLUDES) -DPROF
   34 #CFLAGS= -O -pg $(INCLUDES) -DPROF
   35 
   36 # gcc 1.00-1.37
   37 #CFLAGS=-O $(INCLUDES) -finline-functions -fstrength-reduce 
   38 
   39 # gcc 1.37-1.40
   40 #CFLAGS=-O $(INCLUDES) -fcombine-regs -finline-functions -fstrength-reduce 
   41 # add -msoft-float for 68881 machines.
   42 
   43 # gcc 2.0
   44 # On the sparc, don't use -O2; it breaks setjmp() and vfork()
   45 #CFLAGS=-O $(INCLUDES)
   46 
   47 # gcc-2.1+
   48 CFLAGS=-O2 $(INCLUDES)
   49 
   50 # lucid c on suns
   51 #CFLAGS=-O5 $(INCLUDES)
   52 
   53 # gcc 2.1 on linux
   54 #CFLAGS=-O6 -fomit-frame-pointer $(INCLUDES)
   55 
   56 # HP/UX 8.0, 9.0
   57 #CFLAGS= $(INCLUDES) +O3 -Aa
   58 
   59 # Ultrix 4.2a
   60 #CFLAGS= $(INCLUDES) -O -Olimit 2000
   61 
   62 # Intel Paragon OSF/1 with PGI compilers
   63 #CFLAGS=-O -Mnodebug -Mnoperfmon $(INCLUDES)
   64 
   65 # DEC Alpha OSF/1
   66 #CFLAGS= -O2 $(INCLUDES) -Olimit 2000	## Normal Optimization
   67 #CFLAGS= -O3 $(INCLUDES) -Olimit 2000	## Full Optimization - may not work
   68 #CF=-j
   69 #SUF=u
   70 #.SUFFIXES: .u
   71 
   72 # for silicon graphics (and other mips compilers) -- use the
   73 # global optimizer! (-O3).
   74 # On SGI 4.0+ you need to add -D__STDC__ too.
   75 #CFLAGS= -O3 $(INCLUDES) 
   76 #CFLAGS= -O3 $(INCLUDES) -Olimit 2000	## Ultrix 4.2a
   77 #CF=-j
   78 #SUF=u
   79 #.SUFFIXES: .u 				## Ultrix and gnu-make need that
   80 
   81 # mips systems
   82 # CFLAGS= $(INCLUDES) -O -systype bsd43 -Wf,-XNd5000 -Wf,-XNp6000 -Olimit 2000
   83 
   84 # for at&t machines
   85 #CFLAGS= -O -Ksd $(INCLUDES)
   86 
   87 # Stardent Titan
   88 #CFLAGS = $(INCLUDES) -O -43
   89 
   90 # Stardent Stellar or sunos4 /bin/cc or Solaris2.1 /opt/SUNWspro/bin/cc
   91 #CFLAGS = $(INCLUDES) -O4
   92 
   93 # Intergraph clipper CLIX 3.1
   94 #CFLAGS= -w -O2 $(INCLUDES)
   95 
   96 # Dnix 5.3
   97 #CFLAGS = -O -X7
   98 
   99 # Pyramid OS/x
  100 #CFLAGS = -OG
  101 
  102 # Multiflow (5M binary... if you choose -O5!)
  103 #CFLAGS = -O5 -sb_trace 0
  104 
  105 # DDE Supermax Unix SYSV Rel III.
  106 # CFLAGS= -O3
  107 
  108 # SINIX RMx00
  109 #CFLAGS= -O # -D_POSIX_SOURCE # -kansi
  110 
  111 # Minix-VMD
  112 # CFLAGS= -O -D_ANSI_H -I /usr/include/bsdcompat $(INCLUDES)
  113 
  114 # Apollo's with cc [apollo builtins don't work with gcc]
  115 # and apollo should not define __STDC__ if it does not have
  116 # the standard header files. RT's (aos4.3) need that too;
  117 # you might want to skip the -O on the rt's... Not very wise.
  118 # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA)
  119 #DFLAGS=-U__STDC__ 
  120 #DFLAGS=-D_IBMESA
  121 # On aix2.2.1 we need more compiler space.
  122 #DFLAGS=-Nd4000 -Nn3000
  123 # AU/X 2.0 needs a flag for POSIX (read the config file)
  124 #DFLAGS=-Zp
  125 # Tektronix 4300 running UTek 4.0 (BSD 4.2) needs:
  126 #DFLAGS = -DUTek -DBSD
  127 # VMS_POSIX needs:
  128 #DFLAGS=-D_VMS_POSIX
  129 # Multiflow and PCC compilers don't like void typedefs.
  130 # You may also need -U__STDC__ if you use pcc (i.e. ibmrt aos4.3).
  131 #DFLAGS=-DMULTIFLOW
  132 #DFLAGS=-DPCC
  133 # DELL SVR4
  134 #DFLAGS=-DDELL
  135 # SCO_SV
  136 #DFLAGS=-D_SPEED_T -DSCO
  137 DFLAGS=
  138 #DFLAGS=-D_PATH_TCSHELL='"${DESTBIN}/tcsh"'
  139 
  140 
  141 ################################################################
  142 ## LDFLAGS.  Define something here if you need to
  143 ################################################################
  144 LDFLAGS= 			## The simplest, suitable for all.
  145 #LDFLAGS= -s			## Stripped. Takes less space on disk.
  146 #LDFLAGS= -s -n			## Pure executable. Spares paging over
  147 # 				## the network for machines with local
  148 #				## swap but external /usr/local/bin .
  149 #LDFLAGS= -s -n -Bstatic	## Without dynamic linking. (SunOS/cc)
  150 #LDFLAGS= -s -n -static		## Without dynamic linking. (SunOS/gcc)
  151 #LDFLAGS= -Wl,-s,-n		## Stripped, shared text (Unicos)
  152 #LDFLAGS= -s -static		## Link statically. (linux)
  153 #LDFLAGS= -s -N			## Impure executable (linux)
  154 #LDFLAGS= -Bdynamic -dy		## SCO_SV
  155 
  156 ################################################################
  157 ## LIBES.  Pick one, or roll your own.
  158 ################################################################
  159 LIBES= -ltermcap 			 ## BSD style things
  160 #LIBES= -ltermcap			 ## SunOS, HP-UX, pyramid
  161 #LIBES= -ltermcap			 ## Linux
  162 #LIBES= -ltermcap -lshadow		 ## Linux with PW_SHADOW
  163 #LIBES= -ltermcap -lsec			 ## Tek XD88/10 (UTekV) with PW_SHADOW
  164 #LIBES= -ltermcap -lsec			 ## Motorola MPC (sysV88) with PW_SHADOW
  165 #LIBES= -ltermcap -lcs			 ## Mach
  166 #LIBES= -ltermcap -lbsd			 ## DEC osf1 on the alpha
  167 #LIBES= -ltermcap -lbsd			 ## Intel paragon
  168 #LIBES= -ltermcap -lbsd			 ## Clipper intergraph
  169 #LIBES= -ltermcap -lseq			 ## Sequent's Dynix
  170 #LIBES= -ltermcap -lauth		 ## Ultrix with Enhanced Security
  171 #LIBES= -ltermcap -ldir -lx		 ## Xenix 386 style things
  172 #LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0
  173 #LIBES= -lcurses			 ## AIX on the rt
  174 #LIBES= -lcurses			 ## TitanOS on the stellar
  175 #LIBES= -ltermlib -lsocket -lnsl	 ## SysV4 w/o BSDTIMES or Solaris 2
  176 #LIBES= -lcurses			 ## SysV3 w/o networking
  177 #LIBES= -lcurses -lnet			 ## SysV3 with networking
  178 #LIBES= -lcurses -ldir			 ## SysV2 w/o networking & dirlib
  179 #LIBES= -lcurses -ldir -lnet		 ## SysV2 with networking & dirlib
  180 #LIBES= -lcurses -lbsd			 ## AIX on the IBM 370 or rs6000 or ps2
  181 #LIBES= -lcurses -lbsd			 ## ETA10
  182 #LIBES= -lcurses -lbsd			 ## Irix3.1 on the SGI-IRIS4D
  183 #LIBES= -lcurses -lbsd -lc_s		 ## Irix3.3 on the SGI-IRIS4D w/o yp
  184 #LIBES= -lcurses -lsun -lbsd -lc_s	 ## Irix3.3 on the SGI-IRIS4D with yp
  185 #LIBES= -lcurses -lsocket -lbsd		 ## Amdahl UTS 2.1
  186 #LIBES= -lcurses -lsocket		 ## Intel's hypercube.
  187 #LIBES= -lcurses -lsocket		 ## ns32000 based Opus.
  188 #LIBES= -lcurses -lcposix		 ## ISC 2.2 without networking
  189 #LIBES= -lcposix -lc_s -lcurses -linet	 ## ISC 2.2 with networking
  190 #LIBES= -lcurses -lsec -lc_s		 ## ISC 2.0.2 without networking
  191 #LIBES= -lcurses -linet -lsec -lc_s	 ## ISC 2.0.2 with networking
  192 #LIBES= -lcurses -lintl -lcrypt		 ## SCO SysVR3.2v2.0
  193 #LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1
  194 #LIBES= -lcurses -lsocket -lcrypt	 ## SCO_SV
  195 #LIBES= -lposix -ltermcap		 ## A/UX 2.0
  196 #LIBES= -lposix -ltermcap -lc_s		 ## A/UX 3.0
  197 #LIBES= -ldirent -lcurses		 ## att3b1 cc w/o shared lib & dirlib
  198 #LIBES= -shlib -ldirent -lcurses	 ## att3b1 gcc with shared lib & dirlib
  199 #LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES
  200 #LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra
  201 #LIBES= -ltermc				 ## emx under OS/2
  202 #LIBES=					 ## Minix, VMS_POSIX
  203 #LIBES= -ltermcap -lcrypt		 ## Multiflow
  204 #LIBES= -ltermcap -lcrypt		 ## NetBSD
  205 #LIBES= -lcurses 			 ## DDE Supermax
  206 
  207 ################################################################
  208 ## EXTRAFLAGS and EXTRALIBS
  209 ################################################################
  210 # Compiling for HESIOD
  211 #HESDEF = -DHESIOD -I/usr/athena/include
  212 #HESLIB = -L/usr/athena/lib -lhesiod
  213 #
  214 # Compiling for AFS with kerberos authentication
  215 #AFSLIBDIR = /usr/afsws/lib
  216 #AFSDEF = -DAFS -I/usr/afsws/include
  217 #AFS33LIB = -laudit
  218 #
  219 #Solaris and HPUX require the BSD libraries with AFS.
  220 #We use -lc to use only what we require.
  221 #AFSAUXLIB = -lsocket -lnsl -lc -lucb                    # Solaris
  222 #AFSAUXLIB = -lc -lBSD                                   # HPUX   
  223 #
  224 #AFSLIB = -L$(AFSLIBDIR) -L$(AFSLIBDIR)/afs -lkauth -lprot -lubik\
  225 #         -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\
  226 #         $(AFSLIBDIR)/afs/util.a $(AFS33LIB) $(AFSAUXLIB)
  227 #
  228 
  229 EXTRAFLAGS = $(HESDEF) $(AFSDEF)
  230 EXTRALIBS = $(HESLIB) $(AFSLIB)
  231 
  232 
  233 # The difficult choice of a c-compiler...
  234 # First, you should try your own c-compiler. 
  235 # Gcc -traditional is also a safe choice. 
  236 # If you think that you have good include files try gcc -Wall...
  237 # If you want to take out -traditional, make sure that your sys/ioctl.h
  238 # is fixed correctly, otherwise you'll be stopped for tty input, or you
  239 # will lose the editor and job control.
  240 
  241 # This is for setting your C preprocessor value.
  242 CPP = ${CC} -E
  243 # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which
  244 # on the suns does not know how to make dynamically linked binaries.
  245 CC=	gcc -Wall -pipe -B/bin/	# -ansi -pedantic
  246 #CC=	gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux)
  247 #CC=	shlicc 	# BSDI2.1 w/ shared libraries
  248 #CC=	cc
  249 #CC=	occ
  250 #CC=	acc
  251 #CC=	pcc
  252 #CC=	hc -w
  253 #CC=	c89	# For VMS/POSIX
  254 #CC=	/bin/cc	# For suns, w/o gcc and SVR4
  255 #CC=	/usr/lib/sun.compile/cc  # FPS 500 (+FPX) with Sun C compiler
  256 #CC=	/opt/SUNWspro/bin/cc	# Solaris 2.1
  257 #CC=	scc 	# Alliant fx2800
  258 #CC=	lcc	-wa 
  259 #CC=	cc -b elf -Kpic # SCO_SV
  260 ED=	ed
  261 AS=	as
  262 RM=	rm
  263 CXREF=	/usr/ucb/cxref
  264 #CXREF=	/bin/cxref			# SCO_SV
  265 VGRIND=	csh /usr/ucb/vgrind
  266 CTAGS=	/usr/ucb/ctags
  267 #CTAGS=	/usr/bin/ctags			# SCO_SV
  268 #XSTR= /usr/ucb/xstr
  269 #XSTR= /usr/bin/xstr			# SCO_SV
  270 SCCS=	/usr/local/sccs
  271 PARALLEL=12				# Make the multi-max run fast.
  272 #P=&					# Use Sequent's parallel make
  273 P=
  274 DESTDIR=/usr/local
  275 #DESTDIR=/usr/contrib
  276 MANSECT=1
  277 DESTBIN=${DESTDIR}/bin
  278 DESTMAN=${DESTDIR}/man/man${MANSECT}
  279 # DESTMAN=${DESTDIR}/catman/man${MANSECT}	 # A/UX
  280 # DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4)
  281 # DESTMAN=/usr/catman/1l			 # Amiga unix (SysVR4)
  282 FTPAREA=/usr/spool/ftp
  283 
  284 ASSRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
  285 	sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
  286 	sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
  287 	sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h 
  288 PSSRCS= sh.decls.h glob.c glob.h dotlock.c dotlock.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \
  289 	vms.termcap.c
  290 SHSRCS= ${ASSRCS} ${PSSRCS}
  291 SHOBJS=	sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
  292 	sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \
  293 	sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \
  294 	sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \
  295 	sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} dotlock.${SUF} \
  296 	mi.termios.${SUF} ma.setp.${SUF} vms.termcap.${SUF}
  297 
  298 TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \
  299 	tw.comp.c tw.color.c
  300 TWOBJS=	tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} \
  301 	tw.comp.${SUF} tw.color.${SUF}
  302 
  303 EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
  304 	ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
  305 EDOBJS=	ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
  306 	ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
  307 
  308 TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
  309 	tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
  310 	tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
  311 	tc.who.c tc.h
  312 TCOBJS=	tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
  313 	tc.disc.${SUF} tc.func.${SUF} tc.nls.${SUF} tc.os.${SUF} tc.printf.${SUF} \
  314 	tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
  315 	tc.vers.${SUF} tc.who.${SUF} 
  316 
  317 PVSRCS= Makefile.std Makefile.vms Makefile.in Makefile.win32
  318 AVSRCS= BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md FAQ \
  319 	WishList config_f.h eight-bit.me glob.3 patchlevel.h \
  320 	pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
  321 	complete.tcsh vmsreadme.txt termcap.vms snames.h host.defs \
  322 	gethost.c tcsh.man2html configure.ac configure config.h.in \
  323 	aclocal.m4 dot.login dot.tcshrc
  324 
  325 VHSRCS=${PVSRCS} ${AVSRCS}
  326 
  327 CONFSRCS=config/* 
  328 
  329 ALLSRCS=  ${SHSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${VHSRCS}
  330 DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${AVSRCS}
  331 
  332 
  333 OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
  334 
  335 
  336 all: ${BUILD}
  337 
  338 tcsh:$(P) ${OBJS} 
  339 	rm -f tcsh core
  340 	${CC} -o tcsh ${LDFLAGS} ${CFLAGS} ${OBJS} ${LIBES} ${EXTRALIBS}
  341 
  342 # Purify
  343 pure:$(P) ${OBJS} 
  344 	rm -f tcsh core
  345 	purify `echo ${CC} | sed -e s,-B/bin/,,` -o tcsh ${LDFLAGS} ${CFLAGS} ${OBJS} ${LIBES} ${EXTRALIBS}
  346 # OS/2
  347 tcsh.exe: tcsh
  348 	emxbind tcsh
  349 
  350 gethost:  gethost.c sh.err.h tc.const.h sh.h
  351 	rm -f gethost
  352 	${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS}
  353 
  354 tc.defs.c:	gethost host.defs
  355 	@rm -f $@
  356 	@echo "/* Do not edit this file, make creates it */" > $@
  357 	./gethost $(srcdir)/host.defs >> $@
  358 
  359 tcsh.ps: tcsh.man
  360 	rm -f tcsh.ps
  361 	-ptroff -t -man $(srcdir)/tcsh.man > tcsh.ps
  362 
  363 
  364 .c.${SUF}:
  365 	${CC} ${CF} ${CFLAGS} ${DFLAGS} ${EXTRAFLAGS} $<
  366 
  367 # _VMS_POSIX #module addition
  368 #.c.${SUF}:
  369 #	@(echo '#module '`echo $< | sed -e 's/\./_/g'`; cat $<) > $*..c
  370 #	@echo ${CC} ${CF} ${CFLAGS} ${DFLAGS} ${EXTRAFLAGS} $*.c
  371 #	@${CC} ${CF} ${CFLAGS} ${DFLAGS} ${EXTRAFLAGS} $*..c
  372 #	@mv $*..o $*.o
  373 #	@rm -f $*..c
  374 
  375 
  376 # Don't do any special massaging of C files for sharing of strings!!
  377 # it causes weird segmentation faults on some systems.
  378 #.c.o:
  379 #	${CPP} ${CFLAGS} $*.c | ${XSTR} -c -
  380 #	${CC} ${CF} ${CFLAGS} x.c 
  381 #	mv -f x.o $*.o
  382 #	rm -f x.c
  383 
  384 #ed.init.o: ed.init.c
  385 #	${CPP} ${CFLAGS} $*.c | ${XSTR} -c -
  386 #	${CC} -R ${CF} ${CF} x.c 
  387 #	mv -f x.o $*.o
  388 #	rm -f x.c
  389 
  390 #strings.o: strings
  391 #	${XSTR}
  392 #	${CC} -c -R xs.c
  393 #	mv -f xs.o strings.o
  394 #	rm -f xs.c
  395 
  396 ##.DEFAULT:
  397 ##	${SCCS} get $<
  398 
  399 ##.DEFAULT:
  400 ##	co $<
  401 
  402 ed.defns.h: ed.defns.c
  403 	@rm -f $@
  404 	@echo '/* Do not edit this file, make creates it. */' > $@
  405 	@echo '#ifndef _h_ed_defns' >> $@
  406 	@echo '#define _h_ed_defns' >> $@
  407 	grep '[FV]_' $(srcdir)/ed.defns.c | grep '^#define' >> $@
  408 	@echo '#endif /* _h_ed_defns */' >> $@
  409 
  410 sh.err.h: sh.err.c
  411 	@rm -f $@
  412 	@echo '/* Do not edit this file, make creates it. */' > $@
  413 	@echo '#ifndef _h_sh_err' >> $@
  414 	@echo '#define _h_sh_err' >> $@
  415 	grep 'ERR_' $(srcdir)/sh.err.c | grep '^#define' >> $@
  416 	@echo '#endif /* _h_sh_err */' >> $@
  417 
  418 tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h
  419 	@rm -f $@
  420 	@echo '/* Do not edit this file, make creates it. */' > $@
  421 	@echo '#ifndef _h_tc_const' >> $@
  422 	@echo '#define _h_tc_const' >> $@
  423 	${CPP} $(INCLUDES) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\
  424 	    $(srcdir)/tc.const.c | grep 'Char STR' | \
  425 	    sed -e 's/Char \([a-zA-Z0-9_]*\) *\[ *\].*/extern Char \1[];/' | \
  426 	    LC_COLLATE=C sort >> $@
  427 	@echo '#endif /* _h_tc_const */' >> $@
  428 
  429 csh.prof: ${OBJS} sh.prof.${SUF} mcrt0.${SUF}
  430 	rm -f csh.prof
  431 	ld -X mcrt0.${SUF} ${OBJS} -o csh.prof ${LIBES} -lc
  432 
  433 sh.prof.${SUF}:
  434 	cp sh.c sh.prof.c
  435 	${CC} ${CF} ${CFLAGS} -DPROF sh.prof.c
  436 
  437 lint: tc.const.h ed.defns.h
  438 	lint ${DFLAGS} ${LFLAGS} sh*.c tw*.c ed*.c tc.*.c ${LIBES}
  439 
  440 alint: tc.const.h ed.defns.h
  441 	alint ${DFLAGS} ${LFLAGS} sh*.c tw*.c ed*.c tc.*.c ${LIBES}
  442 
  443 print:
  444 	@pr READ_ME
  445 	@pr makefile makefile.*
  446 	@(size -l a.out; size *.${SUF}) | pr -h SIZES
  447 	@${CXREF} sh*.c | pr -h XREF
  448 	@ls -l | pr 
  449 	@pr sh*.h [a-rt-z]*.h sh*.c alloc.c
  450 
  451 vprint:
  452 	@pr -l84 READ_ME TODO
  453 	@pr -l84 makefile makefile.*
  454 	@(size -l a.out; size *.${SUF}) | pr -l84 -h SIZES
  455 	@${CXREF} sh*.c | pr -l84 -h XREF
  456 	@ls -l | pr -l84
  457 	@${CXREF} sh*.c | pr -l84 -h XREF
  458 	@pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c
  459 
  460 vgrind:
  461 	@cp /dev/null index
  462 	@for i in *.h; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
  463 	@for i in *.c; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
  464 	@vgrind -t -x -h Index index >/crp/bill/csh/index.t
  465 
  466 install: tcsh 
  467 	-mv -f ${DESTBIN}/tcsh  ${DESTBIN}/tcsh.old
  468 	cp tcsh ${DESTBIN}/tcsh
  469 	-strip ${DESTBIN}/tcsh
  470 	chmod 555 ${DESTBIN}/tcsh
  471 
  472 install.man: tcsh.man
  473 	-rm -f ${DESTMAN}/tcsh.${MANSECT}
  474 	cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT}
  475 	chmod 444 ${DESTMAN}/tcsh.${MANSECT}
  476 
  477 # Amiga Unix
  478 #install.man: tcsh.man
  479 #        compress tcsh.man
  480 #	cp tcsh.man.Z ${DESTMAN}/tcsh.Z
  481 #	chmod 444 ${DESTMAN}/tcsh.Z
  482 
  483 # Apple A/UX
  484 #install.man: tcsh.man
  485 #	-rm -f ${DESTMAN}/tcsh.${MANSECT}.Z
  486 #	nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z
  487 #	chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z
  488 
  489 clean:
  490 	${RM} -f a.out strings x.c xs.c tcsh tcsh.a _MAKE_LOG core gethost
  491 	${RM} -f *.${SUF} sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c
  492 	${RM} -f tcsh.*.m tcsh.*.cat
  493 
  494 veryclean: clean
  495 	${RM} -f config.h config.status config.cache config.log Makefile tcsh.ps
  496 	${RM} -f *~ #*
  497 
  498 distclean: veryclean
  499 
  500 tags:	/tmp
  501 	${CTAGS} sh*.c
  502 
  503 tar.Z:
  504 	rm -f tcsh-${VERSION}.tar.Z
  505 	rm -rf tcsh-${VERSION} 
  506 	mkdir tcsh-${VERSION} tcsh-${VERSION}/config
  507 	cp ${ALLSRCS} tcsh-${VERSION}
  508 	cp ${CONFSRCS} tcsh-${VERSION}/config
  509 	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
  510 	tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
  511 	rm -rf tcsh-${VERSION}
  512 
  513 tar.gz:
  514 	rm -f tcsh-${VERSION}.tar.gz
  515 	rm -rf tcsh-${VERSION} 
  516 	mkdir tcsh-${VERSION} tcsh-${VERSION}/config
  517 	cp ${ALLSRCS} tcsh-${VERSION}
  518 	cp ${CONFSRCS} tcsh-${VERSION}/config
  519 	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
  520 	tar cvf - tcsh-${VERSION} | gzip > tcsh-${VERSION}.tar.gz
  521 	rm -rf tcsh-${VERSION}
  522 
  523 shar:
  524 	rm -f tcsh-*.shar
  525 	rm -rf tcsh-${VERSION} 
  526 	mkdir tcsh-${VERSION} tcsh-${VERSION}/config
  527 	cp ${ALLSRCS} tcsh-${VERSION}
  528 	cp ${CONFSRCS} tcsh-${VERSION}/config
  529 	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
  530 	MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
  531 		 tcsh-${VERSION}/?* tcsh-${VERSION}/config/?* \
  532 		 tcsh-${VERSION}/?*/set?*
  533 	rm -rf tcsh-${VERSION}
  534 
  535 catalogs:
  536 	@(cd nls; make catalogs)
  537 
  538 tcsh-${VERSION}.tar.Z:
  539 	rm -rf tcsh-${VERSION} 
  540 	rm -f tcsh-${VERSION}.tar tcsh-${VERSION}.tar.Z DIFFS.[123]
  541 	mkdir tcsh-${VERSION}
  542 	./MAKEDIFFS bsd
  543 	mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh-${VERSION}
  544 	cp ${DISTSRCS} tcsh-${VERSION}
  545 	mkdir tcsh-${VERSION}/config
  546 	cp ${CONFSRCS} tcsh-${VERSION}/config
  547 	cp Makefile tcsh-${VERSION}/Makefile.new
  548 	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
  549 	tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
  550 	rm -rf tcsh-${VERSION}
  551 
  552 tcsh.tahoe-${VERSION}.tar.Z:
  553 	rm -rf tcsh.tahoe-${VERSION} 
  554 	rm -f tcsh.tahoe-${VERSION}.tar tcsh.tahoe-${VERSION}.tar.Z DIFFS.[123]
  555 	mkdir tcsh.tahoe-${VERSION}
  556 	./MAKEDIFFS tahoe
  557 	mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.tahoe-${VERSION}
  558 	cp ${DISTSRCS} tcsh.tahoe-${VERSION}
  559 	mkdir tcsh.tahoe-${VERSION}/config
  560 	cp ${CONFSRCS} tcsh.tahoe-${VERSION}/config
  561 	cp Makefile tcsh.tahoe-${VERSION}/Makefile.new
  562 	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
  563 	tar cvf - tcsh.tahoe-${VERSION} | compress > tcsh.tahoe-${VERSION}.tar.Z
  564 	rm -rf tcsh.tahoe-${VERSION}
  565 
  566 tcsh.reno-${VERSION}.tar.Z:
  567 	rm -rf tcsh.reno-${VERSION} 
  568 	rm -f tcsh.reno-${VERSION}.tar tcsh.reno-${VERSION}.tar.Z DIFFS.[123]
  569 	mkdir tcsh.reno-${VERSION}
  570 	./MAKEDIFFS reno
  571 	mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.reno-${VERSION}
  572 	cp ${DISTSRCS} tcsh.reno-${VERSION}
  573 	mkdir tcsh.reno-${VERSION}/config
  574 	cp ${CONFSRCS} tcsh.reno-${VERSION}/config
  575 	cp Makefile tcsh.reno-${VERSION}/Makefile.new
  576 	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
  577 	tar cvf - tcsh.reno-${VERSION} | compress > tcsh.reno-${VERSION}.tar.Z
  578 	rm -rf tcsh.reno-${VERSION}
  579 
  580 ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z
  581 	cp tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z ${FTPAREA}
  582 	cp tcsh.man ${FTPAREA}
  583 
  584 autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in
  585 
  586 $(srcdir)/configure: $(srcdir)/configure.ac
  587 	cd $(srcdir) && autoconf
  588 
  589 $(srcdir)/config.h.in: $(srcdir)/stamp-h.in
  590 $(srcdir)/stamp-h.in: $(srcdir)/configure.ac
  591 	cd $(srcdir) && autoheader
  592 	@echo timestamp > $(srcdir)/stamp-h.in
  593 
  594 #
  595 # Dependencies
  596 #
  597 config.h: config_f.h
  598 
  599 TCH=tc.h tc.const.h tc.decls.h tc.nls.h tc.os.h tc.sig.h
  600 SHH=sh.h sh.types.h sh.char.h sh.err.h sh.dir.h sh.proc.h pathnames.h \
  601     sh.decls.h ${TCH}
  602 TWH=tw.h tw.decls.h
  603 EDH=ed.h ed.decls.h
  604 
  605 # EDH
  606 EDINC=sh.${SUF} sh.func.${SUF} sh.lex.${SUF} sh.print.${SUF} sh.proc.${SUF} \
  607       sh.set.${SUF} tc.bind.${SUF} tc.os.${SUF} tc.prompt.${SUF} \
  608       tc.sched.${SUF} tw.parse.${SUF} tw.color.${SUF}
  609 ${EDOBJS} ${EDINC} : ${EDH}
  610 
  611 # SHH
  612 ${OBJS}: config.h ${SHH}
  613 
  614 # TWH
  615 TWINC=ed.chared.${SUF} ed.inputl.${SUF} sh.exec.${SUF} sh.func.${SUF} \
  616       sh.set.${SUF} tc.func.${SUF} tc.nls.${SUF} tw.color.${SUF}
  617 ${TWOBJS} ${TWINC}: ${TWH}
  618 
  619 # glob.h
  620 glob.${SUF} sh.glob.${SUF}: glob.h
  621 
  622 # dotlock.h
  623 dotlock.${SUF}: dotlock.h
  624 
  625 # ed.defns.h
  626 EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF}
  627 ${EDOBJS} ${EDDINC}: ed.defns.h
  628 
  629 # tc.defs.o
  630 tc.defs.${SUF}:	tc.defs.c sh.h