Imakefile revision 167465
1235783SkibXCOMM
2235783SkibXCOMM $tcsh: Imakefile,v 1.85 2006/03/02 18:46:44 christos Exp $
3235783SkibXCOMM
4235783SkibXCOMM Imakefile for tcsh 6.12
5235783SkibXCOMM Marc Horowitz, MIT SIPB
6235783SkibXCOMM
7235783Skib
8235783Skib#ifdef DestDir
9235783Skib#undef DestDir
10235783Skib#endif
11235783Skib#ifdef ManSuffix
12235783Skib#undef ManSuffix
13235783Skib#endif
14235783Skib
15235783Skib/* All config options go in a separate file. */
16235783Skib
17235783Skib#include "imake.config"
18235783Skib
19235783Skib#ifndef HasGcc
20235783Skib# define HasGcc 0
21235783Skib#endif
22235783Skib
23235783Skib#ifndef HasGcc2
24235783Skib# define HasGcc2 0
25235783Skib#endif
26235783Skib
27235783Skib/* This is a giant conditional block.  It should be set up right for
28235783Skibplatforms which are in here, but it may need to be changed for new
29235783Skibones.  Please send in your fixes and additions! */
30235783Skib
31235783Skib/**** tcsh configuration defines ****/
32235783Skib
33235783Skib/* specific platforms */
34235783Skib
35235783Skib#ifndef ConfigH
36235783Skib# ifdef UltrixArchitecture
37235783Skib#  define ConfigH ultrix
38235783Skib# endif
39235783Skib
40235783Skib# ifdef UxpArchitecture
41235783Skib#  define ConfigH sysv4
42282199Sdumbbell# endif
43235783Skib
44282199Sdumbbell# if defined(LinuxArchitecture) || defined(GNUArchitecture)
45282199Sdumbbell#  define ConfigH linux
46282199Sdumbbell# endif
47235783Skib
48282199Sdumbbell# ifdef AlphaArchitecture
49282199Sdumbbell#  if !defined(LinuxArchitecture) && !defined(GNUArchitecture)
50235783Skib#    define ConfigH decosf1
51282199Sdumbbell#  endif
52282199Sdumbbell#  if !HasGcc
53282199Sdumbbell#   define MyCflags -std1 -Olimit 2000
54282199Sdumbbell#  else
55282199Sdumbbell#   define NoCombineRegs
56282199Sdumbbell#  endif
57282199Sdumbbell# endif
58282199Sdumbbell
59282199Sdumbbell# if defined(VaxArchitecture) && !defined(UltrixArchitecture)
60282199Sdumbbell#  define ConfigH bsd
61235783Skib# endif
62282199Sdumbbell
63235783Skib# ifdef NeXTArchitecture
64235783Skib#  define ConfigH mach
65235783Skib# endif
66235783Skib
67235783Skib# if defined(SunArchitecture)
68235783Skib#  if (OSMajorVersion == 3)
69235783Skib#   define ConfigH sunos35
70235783Skib#  else
71235783Skib#   if (OSMajorVersion == 4)
72235783Skib#    if (OSMinorVersion == 0)
73235783Skib#     define ConfigH sunos40
74235783Skib#    else /* OSMinorVersion == 1 */
75235783Skib#     if (OSTeenyVersion == 3)
76282199Sdumbbell#      define ConfigH sunos413
77235783Skib#     else /* OsTeenyVersion in [0,1,2] */
78282199Sdumbbell#      define ConfigH sunos41
79235783Skib#     endif
80235783Skib#    endif
81235783Skib#    define NoCombineRegs
82235783Skib#   else /* OSMajorVersion == 5 */
83282199Sdumbbell#    if (OSMinorVersion < 3)
84235783Skib#     if (OSMinorVersion < 2)
85235783Skib#      define ConfigH sol2
86235783Skib#     else
87235783Skib#      define ConfigH sol22
88235783Skib#     endif
89235783Skib#    else
90235783Skib#     if (OSMinorVersion < 4)
91235783Skib#      define ConfigH sol23
92235783Skib#     else
93235783Skib#      if (OSMinorVersion < 6)
94235783Skib#       define ConfigH sol24
95235783Skib#      else
96235783Skib#       define ConfigH sol26
97282199Sdumbbell#      endif
98282199Sdumbbell#     endif
99282199Sdumbbell#    endif
100282199Sdumbbell#    define NoCombineRegs
101282199Sdumbbell#   endif
102282199Sdumbbell#  endif
103282199Sdumbbell# endif
104282199Sdumbbell
105235783Skib# ifdef HPArchitecture
106235783Skib/* For some stupid reason makedepend on HP requires this */
107235783SkibDEPENDFLAGS = -o.o
108235783Skib#  if (OSMajorVersion >= 8)
109235783Skib#   define ConfigH hpux8
110235783Skib#  else
111235783Skib#   define ConfigH hpux7
112235783Skib#  endif
113235783Skib# endif
114235783Skib
115235783Skib# ifdef CrayArchitecture
116235783Skib#  define ConfigH cray
117235783Skib# endif
118235783Skib
119235783Skib# ifdef SGIArchitecture
120235783Skib#   define ConfigH irix
121235783Skib#   define UseLibBSD
122235783Skib#  if (OSMajorVersion < 5)
123235783Skib#   ifdef you_are_using_yp
124235783Skib#    define UseSunLib 
125235783Skib#   endif
126235783Skib#   if !HasGCC
127235783Skib#    define MyStdc -D__STDC__
128235783Skib#    if SGICompilerMajorVersion < 4
129235783SkibCCOPTIONS=-float	# We don't want -cckr and -prototypes
130235783Skib#    endif
131235783Skib#   endif
132235783Skib#  endif
133235783Skib#  if (OSMajorVersion == 6)
134235783Skib#   if (OSMinorVersion >= 2)
135235783Skib#    undef UseLibBSD
136282199Sdumbbell#    define ConfigH irix62
137282199Sdumbbell#   endif
138282199Sdumbbell#  endif
139282199Sdumbbell# endif
140282199Sdumbbell
141282199Sdumbbell# ifdef IBMArchitecture
142235783Skib#  undef UseLibBSD
143235783Skib#  if (SystemV == YES)
144235783Skib#   define ConfigH aix
145235783Skib#   if OSMajorVersion < 3 
146235783Skib#    if OSMinorVersion < 2
147235783Skib#     define UseLibBSD
148235783Skib#    endif
149235783Skib#   endif
150282199Sdumbbell#  else
151282199Sdumbbell#   define ConfigH bsd
152235783Skib#   define AOSArchitecture
153235783Skib#  endif
154235783Skib# endif
155235783Skib
156235783Skib
157235783Skib#ifdef AOSArchitecture
158235783Skib#define MyStdc -U__STDC__
159235783Skib#endif
160235783Skib
161235783Skib# if defined(MipsBsdArchitecture) || defined(MipsSysvArchitecture)
162235783Skib#  define ConfigH mips
163235783Skib# endif
164235783Skib
165235783Skib# ifdef DguxArchitecture
166235783Skib#  define ConfigH dgux
167235783Skib# endif
168235783Skib
169235783Skib# ifdef ConvexArchitecture
170235783Skib#  define ConfigH convex
171235783Skib# endif
172235783Skib
173235783Skib# if defined(SQNTArchitecture) || defined(SequentArchitecture)
174235783Skib#  define ConfigH sequent
175235783Skib# endif
176235783Skib
177235783Skib# ifdef MacIIArchitecture
178235783Skib#  define ConfigH mac2
179235783Skib# endif
180235783Skib
181235783Skib# ifdef MinixArchitecture
182235783Skib/* Maybe conditional on MACH? */
183235783SkibSYSSRCS=mi.termios.c mi.wait.h mi.varargs.h
184235783SkibSYSOBJS=mi.termios.${SUF}
185235783SkibEXTF=ma.setp.c vms.termcap.c
186235783Skib# else
187235783Skib/* Maybe conditional on MACH? */
188282199SdumbbellSYSSRCS=ma.setp.c
189235783SkibSYSOBJS=ma.setp.${SUF}
190235783SkibEXTF=mi.termios.c mi.wait.h mi.varargs.h vms.termcap.c
191235783Skib# endif
192235783Skib
193235783Skib# ifdef i386Isc
194235783Skib#  if IscVersion != 202
195235783Skib#   define ConfigH isc
196235783Skib#   define UseLibCposix
197235783Skib#  else
198235783Skib#   define ConfigH isc202
199235783Skib#  endif
200235783Skib# endif /* i386Isc */
201235783Skib
202235783Skib# ifdef OpenBSDArchitecture
203235783Skib#  define ConfigH bsd4.4
204235783Skib# endif /* OpenBsdArchitecture */
205235783Skib
206235783Skib# ifdef NetBSDArchitecture
207235783Skib#  define ConfigH bsd4.4
208235783Skib# endif /* NetBsdArchitecture */
209235783Skib
210235783Skib# ifdef FreeBSDArchitecture
211235783Skib#  define ConfigH bsd4.4
212235783Skib# endif /* FreeBsdArchitecture */
213235783Skib
214235783Skib# ifdef i386SVR4Architecture
215235783Skib#  define ConfigH sysv4
216235783Skib#  ifdef DELL
217235783Skib#   define NoCombineRegs
218235783Skib#  endif
219235783Skib# endif
220235783Skib
221235783Skib#endif /* !ConfigH */
222235783Skib
223235783Skib/* generic os's */
224235783Skib
225235783Skib#ifndef ConfigH
226235783Skib
227235783Skib#if (SystemV == YES)
228235783Skib#define ConfigH sysv3
229235783Skib#else
230235783Skib/* why this as a default?  Why not? */
231235783Skib#define ConfigH bsd
232235783Skib#endif
233235783Skib
234235783Skib#endif /* !ConfigH */
235235783Skib
236235783Skib/**** libraries ****/
237235783Skib
238235783Skib#if (SystemV == NO) || defined(HPArchitecture) || \
239235783Skib	defined(SQNTArchitecture) || defined(SequentArchitecture) || \
240235783Skib	defined(MacIIArchitecture) || defined(UseLibTermcap)
241235783SkibLIBTERMCAP = -ltermcap
242235783Skib#else
243235783SkibLIBTERMCAP =
244235783Skib#endif
245235783Skib
246235783Skib#if defined(SQNTArchitecture) || defined(SequentArchitecture)
247235783SkibLIBSQNT=-lsocket -linet -lnsl -lseq
248235783Skib#endif
249235783Skib
250235783Skib/* This may not be good enough - I don't have access to enough systems
251235783Skibto really test it. */
252235783Skib#if (SystemV == YES) || defined(UseLibCurses) && !defined(HPArchitecture)
253235783SkibLIBCURSES = -lcurses
254235783Skib#else
255235783SkibLIBCURSES =
256235783Skib#endif
257235783Skib
258235783Skib#if defined(UseLibNet)
259235783SkibLIBNET = -lnet
260235783Skib#else
261235783SkibLIBNET =
262235783Skib#endif
263235783Skib
264235783Skib#if defined(UseLibSocket)
265235783SkibLIBSOCKET = -lsocket
266235783Skib#else
267235783SkibLIBSOCKET =
268235783Skib#endif
269235783Skib
270235783Skib#if defined(UseLibBSD)
271235783SkibLIBBSD = -lbsd
272235783Skib#else
273235783SkibLIBBSD = 
274235783Skib#endif
275235783Skib
276235783Skib#if (defined(SGIArchitecture) && \
277235783Skib     (OSMajorVersion == 3) && (OSMinorVersion == 3)) || \
278235783Skib	defined(UseLibC_S)
279235783SkibLIBC_S = -lc_s
280235783Skib#else
281235783SkibLIBC_S =
282235783Skib#endif
283235783Skib
284235783Skib#if defined(UseLibSun)
285235783SkibLIBSUN = -lsun
286235783Skib#else
287235783SkibLIBSUN =
288235783Skib#endif
289235783Skib
290235783Skib#if defined(UseLibCposix)
291235783SkibLIBCPOSIX = -lcposix
292235783Skib#else
293235783SkibLIBCPOSIX =
294235783Skib#endif
295235783Skib
296235783Skib#if defined(UseLibInet)
297235783SkibLIBINET = -linet
298235783Skib#else
299235783SkibLIBINET =
300235783Skib#endif
301235783Skib
302235783Skib#if defined(UseLibDir)
303235783SkibLIBDIRECT = -ldir
304235783Skib#else
305235783SkibLIBDIRECT = 
306235783Skib#endif
307235783Skib
308235783Skib#if defined(UseLibX)
309235783SkibLIBX = -lx
310235783Skib#else
311235783SkibLIBX =
312235783Skib#endif
313235783Skib
314235783Skib#if defined(UseLibIntl)
315235783SkibLIBINTL = -lintl
316235783Skib#else
317235783SkibLIBINTL =
318235783Skib#endif
319235783Skib
320235783Skib#if (HasLibCrypt == YES)
321235783SkibLIBCRYPT = -lcrypt
322235783Skib#else
323235783SkibLIBCRYPT =
324235783Skib#endif
325235783Skib
326235783Skib#if defined(MacIIArchitecture) || defined(UseLibPosix)
327235783SkibLIBPOSIX = -lposix
328235783Skib#else
329235783SkibLIBPOSIX =
330235783Skib#endif
331235783Skib
332235783Skib#if defined(ATTArchitecture) || defined(UseLibDirent)
333235783SkibLIBDIRECTENT = -ldirent
334235783Skib#else
335235783SkibLIBDIRECTENT =
336235783Skib#endif
337282199Sdumbbell
338282199Sdumbbell/* The order here is significant.  Although nothing uses all of these, 
339235783Skibsome platforms which use more than one do care about the order. */
340235783Skib
341235783SkibSYSLIBS = $(LIBPOSIX) $(LIBDIRECTENT) $(LIBTERMCAP) $(LIBCURSES) \
342235783Skib	$(LIBNET) $(LIBINTL) $(LIBSOCKET) $(LIBSUN) $(LIBBSD) $(LIBCPOSIX) \
343235783Skib	$(LIBINET) $(LIBDIRECT) $(LIBX) $(LIBC_S) $(LIBSQNT) $(LIBCRYPT)
344235783Skib
345235783Skib/* Past here, nothing should need to be changed to compile on a different
346235783Skibplatform, unless you have a really weird architecture. */
347235783Skib
348235783Skib#ifdef MyCC
349235783SkibCC = MyCC
350235783Skib#else
351282199Sdumbbell# if HasGcc
352282199Sdumbbell#  if HasGcc2
353235783SkibCC = gcc 
354235783Skib#  else
355235783Skib#   ifdef NoCombineRegs
356235783SkibCC = gcc -finline-functions -fstrength-reduce
357235783Skib#   else
358235783SkibCC = gcc -fcombine-regs -finline-functions -fstrength-reduce
359235783Skib#   endif
360235783Skib#  endif
361235783Skib# else
362235783SkibCC = cc
363235783Skib# endif
364235783Skib#endif
365235783Skib
366235783Skib#ifdef HESIOD
367235783SkibHESLIB = -L/usr/athena/lib -lhesiod
368235783Skib/* it seems to me that the -I shouldn't be necessary, but there seems
369235783Skibto be a bug in the Imake stuff, so here it is. */
370235783SkibHESDEF = -DHESIOD -I/usr/athena/include
371235783Skib#else
372235783SkibHESLIB =
373235783SkibHESDEF =
374235783Skib#endif
375235783Skib
376235783Skib#ifdef AFS
377235783Skib#ifndef AFSDIR
378235783SkibAFSDIR = /usr/afsws
379235783Skib#endif
380235783Skib#ifdef AFS33
381235783Skib#define AFS33LIB -laudit
382235783Skib#else
383235783Skib#define AFS33LIB
384235783Skib#endif
385235783Skib/* Auxilliary libs needed for AFS */
386235783Skib/* Both HPUX and Solaris need the BSD libraries.  We need -lc before
387235783Skib * the bsd library to avoid using any more of it than is necessary.
388235783Skib */
389235783Skib#if defined(HPArchitecture)
390235783Skib#define AFSAUXLIB -lc -lBSD
391235783Skib/* This is probably a kludge, but so is imake. */
392235783Skib#else
393235783Skib#if defined(SunArchitecture) && (OSMajorVersion == 5)
394235783Skib#define AFSAUXLIB -lsocket -lnsl -lc -lucb
395235783Skib#else
396235783Skib#define AFSAUXLIB
397235783Skib#endif
398235783Skib#endif /* AFSAUXLIB */
399282199SdumbbellAFSLIB = -L$(AFSDIR)/lib -L$(AFSDIR)/lib/afs -lkauth -lprot -lubik\
400235783Skib	 -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\
401235783Skib	 $(AFSDIR)/lib/afs/util.a AFS33LIB AFSAUXLIB
402235783SkibAFSDEF = -DAFS -I$(AFSDIR)/include
403235783Skib#else
404235783SkibAFSLIB =
405235783SkibAFSDEF =
406235783Skib#endif
407235783Skib
408235783Skib/* This is encore specific, but I don't know what encore's #define is,
409235783Skiband it shouldn't hurt to have it here, so here it is */
410235783SkibPARALLEL=12				# Make the multi-max run fast.
411235783Skib
412235783Skib#ifndef TcshTop
413235783Skib#define TcshTop /usr/local
414235783Skib#endif
415235783SkibTCSHTOP = TcshTop
416235783Skib
417235783Skib#ifndef ManSuffix
418235783Skib#define ManSuffix 1
419235783Skib#endif
420235783SkibMANSUFFIX = ManSuffix
421235783Skib
422235783Skib#ifdef TcshPath
423235783SkibPATH_TCSHELL = TcshPath
424235783SkibTCSHPATH = -D_PATH_TCSHELL='"$(PATH_TCSHELL)"'
425235783Skib#else
426235783SkibTCSHPATH =
427235783Skib#endif
428235783Skib
429235783Skib#ifdef DestBin
430235783SkibTCSH_BINDIR = DestBin
431235783Skib#else
432235783SkibTCSH_BINDIR = $(TCSHTOP)/bin
433235783Skib#endif
434235783Skib#ifdef DestMan
435235783SkibTCSH_MANDIR = DestMan
436235783Skib#else
437235783SkibTCSH_MANDIR = $(TCSHTOP)/man/man$(MANSUFFIX)
438235783Skib#endif
439235783Skib
440235783SkibLOCALLIBS =
441235783Skib
442235783Skib#ifndef MyCflags
443235783Skib#define MyCflags
444235783Skib#endif
445235783Skib
446235783Skib#ifndef MyDefines
447235783Skib#define MyDefines
448235783Skib#endif
449235783Skib
450235783Skib#ifndef MyIncludes
451235783Skib#define MyIncludes
452235783Skib#endif
453235783Skib
454235783Skib#ifndef MyStdc
455235783Skib#define MyStdc
456235783Skib#endif
457235783Skib
458235783Skib#ifdef CDebugFlags
459235783SkibCDEBUGFLAGS = CDebugFlags
460235783Skib#else
461235783Skib# if HasGcc2
462235783SkibCDEBUGFLAGS = -O2
463235783Skib# else
464235783SkibCDEBUGFLAGS = -O
465235783Skib# endif
466235783Skib#endif
467235783Skib
468235783Skib
469235783Skib#ifdef HostType
470282199SdumbbellHOSTTYPE=HostType
471235783SkibHTDEF = -DHOSTTYPE='"$(HOSTTYPE)"'
472235783Skib#else
473282199SdumbbellHTDEF =
474235783Skib#endif
475235783Skib
476282199SdumbbellDEFINES = $(TCSHPATH) $(HESDEF) $(AFSDEF) $(HTDEF) MyDefines MyCflags MyStdc
477235783SkibINCLUDES = -I. MyIncludes
478235783Skib#ifdef MyLibs
479235783SkibLDLIBS = MyLibs
480235783Skib#endif
481235783Skib
482235783SkibSUF = o
483235783SkibVERSION = 6.12
484235783Skib
485235783SkibSHSRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c \
486235783Skib	sh.char.c sh.exp.c sh.file.c sh.func.c \
487235783Skib	sh.glob.c sh.hist.c sh.init.c sh.lex.c \
488235783Skib	sh.misc.c sh.parse.c sh.print.c sh.proc.c \
489235783Skib	sh.sem.c sh.set.c sh.time.c glob.c \
490235783Skib	sh.char.h sh.dir.h sh.proc.h sh.h \
491235783Skib	sh.decls.h glob.h ${SYSSRCS}
492235783SkibSHOBJS=	sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
493235783Skib	sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \
494235783Skib	sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \
495235783Skib	sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \
496235783Skib	sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} ${SYSOBJS}
497235783Skib
498235783SkibTWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \
499235783Skib	tw.comp.c tw.color.c
500235783SkibTWOBJS=	tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} \
501235783Skib	tw.comp.${SUF} tw.color.${SUF}
502235783Skib
503235783SkibEDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
504235783Skib	ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
505235783SkibEDOBJS=	ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
506235783Skib	ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
507235783Skib
508235783SkibTCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
509235783Skib	tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
510235783Skib	tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
511235783Skib	tc.who.c tc.h 
512235783SkibTCOBJS=	tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
513235783Skib	tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \
514235783Skib	tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
515235783Skib	tc.vers.${SUF} tc.who.${SUF} 
516282199Sdumbbell
517282199SdumbbellMISCF = Makefile.std Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \
518235783Skib	WishList config_f.h eight-bit.me glob.3 patchlevel.h \
519235783Skib	pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
520235783Skib	README.imake complete.tcsh vmsreadme.txt Makefile.vms termcap.vms \
521235783Skib	snames.h host.defs gethost.c tcsh.man2html Makefile.in configure.in \
522235783Skib	Makefile.win32
523235783SkibCONFSRCS=config/[a-z]*
524235783Skib
525235783Skib
526235783SkibSRCS = $(SHSRCS) $(TWSRCS) $(EDSRCS) $(TCSRCS)
527235783SkibOBJS = $(SHOBJS) $(TWOBJS) $(EDOBJS) $(TCOBJS)
528235783Skib
529235783SkibALLSRCS= $(MISCF) $(SRCS) $(EXTF)
530235783Skib
531235783SkibAllTarget(tcsh)
532235783Skib
533235783Skibed.defns.h: config.h ed.defns.c
534235783Skib	@rm -f $@
535235783Skib	@echo '/* Do not edit this file, make creates it. */' > $@
536235783Skib	@echo '#ifndef _h_ed_defns' >> $@
537235783Skib	@echo '#define _h_ed_defns' >> $@
538235783Skib	egrep '[FV]_' ed.defns.c | egrep '^#define' >> $@
539235783Skib	@echo '#endif /* _h_ed_defns */' >> $@
540235783Skib
541235783Skibsh.err.h: config.h sh.err.c
542235783Skib	@rm -f $@
543235783Skib	@echo '/* Do not edit this file, make creates it. */' > $@
544235783Skib	@echo '#ifndef _h_sh_err' >> $@
545235783Skib	@echo '#define _h_sh_err' >> $@
546235783Skib	egrep 'ERR_' sh.err.c | egrep '^#define' >> $@
547235783Skib	@echo '#endif /* _h_sh_err */' >> $@
548235783Skib
549235783Skibtc.const.h: config.h tc.const.c
550235783Skib	@rm -f $@
551235783Skib	@echo '/* Do not edit this file, make creates it. */' > $@
552235783Skib	@echo '#ifndef _h_tc_const' >> $@
553235783Skib	@echo '#define _h_tc_const' >> $@
554235783Skib	${CC} -E $(INCLUDES) ${DEFINES} -D_h_tc_const tc.const.c | \
555235783Skib	    grep 'Char STR' | \
556235783Skib	    sed -e 's/Char \([a-zA-Z0-9_]*\)\[\].*/extern Char \1[];/' | \
557235783Skib	    sort >> $@
558235783Skib	@echo '#endif /* _h_tc_const */' >> $@
559235783Skib
560235783Skibconfig.h: config_f.h
561235783Skib	cp config/ConfigH config.h
562282199Sdumbbell
563282199Sdumbbell$(OBJS): sh.err.h tc.const.h ed.defns.h
564282199Sdumbbell
565235783Skibtar.Z:
566235783Skib	rm -f tcsh-${VERSION}.tar.Z
567282199Sdumbbell	rm -rf tcsh-${VERSION} 
568235783Skib	mkdir tcsh-${VERSION} tcsh-${VERSION}/config
569235783Skib	cp ${ALLSRCS} tcsh-${VERSION}
570235783Skib	cp ${CONFSRCS} tcsh-${VERSION}/config
571235783Skib	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
572235783Skib	tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
573235783Skib	rm -rf tcsh-${VERSION}
574235783Skib
575235783Skibtar.gz:
576235783Skib	rm -f tcsh-${VERSION}.tar.gz
577235783Skib	rm -rf tcsh-${VERSION} 
578235783Skib	mkdir tcsh-${VERSION} tcsh-${VERSION}/config
579235783Skib	cp ${ALLSRCS} tcsh-${VERSION}
580235783Skib	cp ${CONFSRCS} tcsh-${VERSION}/config
581235783Skib	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
582235783Skib	tar cvf - tcsh-${VERSION} | gzip > tcsh-${VERSION}.tar.gz
583235783Skib	rm -rf tcsh-${VERSION}
584235783Skib
585235783Skibshar:
586235783Skib	rm -f tcsh-*.shar
587235783Skib	rm -rf tcsh-${VERSION} 
588235783Skib	mkdir tcsh-${VERSION} tcsh-${VERSION}/config
589235783Skib	cp ${ALLSRCS} tcsh-${VERSION}
590282199Sdumbbell	cp ${CONFSRCS} tcsh-${VERSION}/config
591235783Skib	tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
592235783Skib	MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
593282199Sdumbbell		 tcsh-${VERSION}/?* tcsh-${VERSION}/config/?* \
594282199Sdumbbell		 tcsh-${VERSION}/?*/set?*
595235783Skib	rm -rf tcsh-${VERSION}
596235783Skib
597282199Sdumbbellcatalogs:
598235783Skib	@(cd nls; make catalogs)
599235783Skib	
600282199Sdumbbellworld:
601235783Skib	$(MAKE) clean ; $(MAKE) depend ; $(MAKE) tcsh ; $(MAKE) install
602235783Skib
603282199Sdumbbellclean::
604235783Skib	rm -f ed.defns.h sh.err.h tc.const.h config.h tc.defs.*
605235783Skib	rm -f tcsh.*.m tcsh.*.cat
606282199Sdumbbell
607235783Skibdepend:: config.h ed.defns.h sh.err.h tc.const.h $(SRCS) tc.defs.c
608235783Skib
609282199Sdumbbelltc.defs.${SUF}:	tc.defs.c sh.h
610235783Skib
611235783Skibtc.defs.c:	gethost host.defs
612282199Sdumbbell	@rm -f $@
613282199Sdumbbell	@echo "/* Do not edit this file, make creates it */" > $@
614235783Skib	./gethost host.defs >> $@
615282199Sdumbbell
616235783SkibALIB=$(HESLIB) $(AFSLIB) $(SYSLIBS)
617235783SkibAINC=ed.defns.h sh.err.h tc.const.h sh.h
618282199Sdumbbell
619235783SkibNormalProgramTarget(tcsh, $(OBJS), $(AINC), $(LOCALLIBS), $(ALIB))
620282199SdumbbellNormalProgramTarget(gethost, gethost.${SUF}, $(AINC), $(LOCALLIBS), $(ALIB))
621282199Sdumbbell
622235783SkibInstallProgram(tcsh,$(TCSH_BINDIR))
623235783SkibInstallManPage(tcsh,$(TCSH_MANDIR))
624282199SdumbbellDependTarget()
625282199Sdumbbell