"Fossies" - the Fresh Open Source Software Archive

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