2 XCOMM Imakefile for tcsh 6.12
3 XCOMM Marc Horowitz, MIT SIPB
13 /* All config options go in a separate file. */
15 #include "imake.config"
25 /* This is a giant conditional block. It should be set up right for
26 platforms which are in here, but it may need to be changed for new
27 ones. Please send in your fixes and additions! */
29 /**** tcsh configuration defines ****/
31 /* specific platforms */
34 # ifdef UltrixArchitecture
35 # define ConfigH ultrix
38 # ifdef UxpArchitecture
39 # define ConfigH sysv4
42 # if defined(LinuxArchitecture) || defined(GNUArchitecture)
43 # define ConfigH linux
46 # ifdef AlphaArchitecture
47 # if !defined(LinuxArchitecture) && !defined(GNUArchitecture)
48 # define ConfigH decosf1
51 # define MyCflags -std1 -Olimit 2000
53 # define NoCombineRegs
57 # if defined(VaxArchitecture) && !defined(UltrixArchitecture)
61 # ifdef NeXTArchitecture
65 # if defined(SunArchitecture)
66 # if (OSMajorVersion == 3)
67 # define ConfigH sunos35
69 # if (OSMajorVersion == 4)
70 # if (OSMinorVersion == 0)
71 # define ConfigH sunos40
72 # else /* OSMinorVersion == 1 */
73 # if (OSTeenyVersion == 3)
74 # define ConfigH sunos413
75 # else /* OsTeenyVersion in [0,1,2] */
76 # define ConfigH sunos41
79 # define NoCombineRegs
80 # else /* OSMajorVersion == 5 */
81 # if (OSMinorVersion < 3)
82 # if (OSMinorVersion < 2)
85 # define ConfigH sol22
88 # if (OSMinorVersion < 4)
89 # define ConfigH sol23
91 # if (OSMinorVersion < 6)
92 # define ConfigH sol24
94 # if (OSMinorVersion < 9)
95 # define ConfigH sol26
97 # define ConfigH sol29
102 # define NoCombineRegs
107 # ifdef HPArchitecture
108 /* For some stupid reason makedepend on HP requires this */
110 # if (OSMajorVersion >= 8)
111 # define ConfigH hpux8
113 # define ConfigH hpux7
117 # ifdef CrayArchitecture
118 # define ConfigH cray
121 # ifdef SGIArchitecture
122 # define ConfigH irix
124 # if (OSMajorVersion < 5)
125 # ifdef you_are_using_yp
129 # define MyStdc -D__STDC__
130 # if SGICompilerMajorVersion < 4
131 CCOPTIONS=-float # We don't want -cckr and -prototypes
135 # if (OSMajorVersion == 6)
136 # if (OSMinorVersion >= 2)
138 # define ConfigH irix62
143 # ifdef IBMArchitecture
145 # if (SystemV == YES)
147 # if OSMajorVersion < 3
148 # if OSMinorVersion < 2
154 # define AOSArchitecture
159 #ifdef AOSArchitecture
160 #define MyStdc -U__STDC__
163 # if defined(MipsBsdArchitecture) || defined(MipsSysvArchitecture)
164 # define ConfigH mips
167 # ifdef DguxArchitecture
168 # define ConfigH dgux
171 # ifdef ConvexArchitecture
172 # define ConfigH convex
175 # if defined(SQNTArchitecture) || defined(SequentArchitecture)
176 # define ConfigH sequent
179 # ifdef MacIIArchitecture
180 # define ConfigH mac2
183 # ifdef MinixArchitecture
184 /* Maybe conditional on MACH? */
185 SYSSRCS=mi.termios.c mi.wait.h mi.varargs.h
186 SYSOBJS=mi.termios.${SUF}
187 EXTF=ma.setp.c vms.termcap.c
189 /* Maybe conditional on MACH? */
191 SYSOBJS=ma.setp.${SUF}
192 EXTF=mi.termios.c mi.wait.h mi.varargs.h vms.termcap.c
196 # if IscVersion != 202
198 # define UseLibCposix
200 # define ConfigH isc202
202 # endif /* i386Isc */
204 # ifdef OpenBSDArchitecture
205 # define ConfigH bsd4.4
206 # endif /* OpenBsdArchitecture */
208 # ifdef NetBSDArchitecture
209 # define ConfigH bsd4.4
210 # endif /* NetBsdArchitecture */
212 # ifdef FreeBSDArchitecture
213 # define ConfigH bsd4.4
214 # endif /* FreeBsdArchitecture */
216 # ifdef MidnightBSDArchitecture
217 # define ConfigH bsd4.4
218 # endif /* MidnightBsdArchitecture */
220 # ifdef i386SVR4Architecture
221 # define ConfigH sysv4
223 # define NoCombineRegs
227 #endif /* !ConfigH */
234 #define ConfigH sysv3
236 /* why this as a default? Why not? */
240 #endif /* !ConfigH */
242 /**** libraries ****/
244 #if (SystemV == NO) || defined(HPArchitecture) || \
245 defined(SQNTArchitecture) || defined(SequentArchitecture) || \
246 defined(MacIIArchitecture) || defined(UseLibTermcap)
247 LIBTERMCAP = -ltermcap
252 #if defined(SQNTArchitecture) || defined(SequentArchitecture)
253 LIBSQNT=-lsocket -linet -lnsl -lseq
256 /* This may not be good enough - I don't have access to enough systems
257 to really test it. */
258 #if (SystemV == YES) || defined(UseLibCurses) && !defined(HPArchitecture)
264 #if defined(UseLibNet)
270 #if defined(UseLibSocket)
276 #if defined(UseLibBSD)
282 #if (defined(SGIArchitecture) && \
283 (OSMajorVersion == 3) && (OSMinorVersion == 3)) || \
290 #if defined(UseLibSun)
296 #if defined(UseLibCposix)
302 #if defined(UseLibInet)
308 #if defined(UseLibDir)
320 #if defined(UseLibIntl)
326 #if (HasLibCrypt == YES)
332 #if defined(MacIIArchitecture) || defined(UseLibPosix)
338 #if defined(ATTArchitecture) || defined(UseLibDirent)
339 LIBDIRECTENT = -ldirent
344 /* The order here is significant. Although nothing uses all of these,
345 some platforms which use more than one do care about the order. */
347 SYSLIBS = $(LIBPOSIX) $(LIBDIRECTENT) $(LIBTERMCAP) $(LIBCURSES) \
348 $(LIBNET) $(LIBINTL) $(LIBSOCKET) $(LIBSUN) $(LIBBSD) $(LIBCPOSIX) \
349 $(LIBINET) $(LIBDIRECT) $(LIBX) $(LIBC_S) $(LIBSQNT) $(LIBCRYPT)
351 /* Past here, nothing should need to be changed to compile on a different
352 platform, unless you have a really weird architecture. */
361 # ifdef NoCombineRegs
362 CC = gcc -finline-functions -fstrength-reduce
364 CC = gcc -fcombine-regs -finline-functions -fstrength-reduce
373 HESLIB = -L/usr/athena/lib -lhesiod
374 /* it seems to me that the -I shouldn't be necessary, but there seems
375 to be a bug in the Imake stuff, so here it is. */
376 HESDEF = -DHESIOD -I/usr/athena/include
387 #define AFS33LIB -laudit
391 /* Auxilliary libs needed for AFS */
392 /* Both HPUX and Solaris need the BSD libraries. We need -lc before
393 * the bsd library to avoid using any more of it than is necessary.
395 #if defined(HPArchitecture)
396 #define AFSAUXLIB -lc -lBSD
397 /* This is probably a kludge, but so is imake. */
399 #if defined(SunArchitecture) && (OSMajorVersion == 5)
400 #define AFSAUXLIB -lsocket -lnsl -lc -lucb
404 #endif /* AFSAUXLIB */
405 AFSLIB = -L$(AFSDIR)/lib -L$(AFSDIR)/lib/afs -lkauth -lprot -lubik\
406 -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\
407 $(AFSDIR)/lib/afs/util.a AFS33LIB AFSAUXLIB
408 AFSDEF = -DAFS -I$(AFSDIR)/include
414 /* This is encore specific, but I don't know what encore's #define is,
415 and it shouldn't hurt to have it here, so here it is */
416 PARALLEL=12 # Make the multi-max run fast.
419 #define TcshTop /usr/local
426 MANSUFFIX = ManSuffix
429 PATH_TCSHELL = TcshPath
430 TCSHPATH = -D_PATH_TCSHELL='"$(PATH_TCSHELL)"'
436 TCSH_BINDIR = DestBin
438 TCSH_BINDIR = $(TCSHTOP)/bin
441 TCSH_MANDIR = DestMan
443 TCSH_MANDIR = $(TCSHTOP)/man/man$(MANSUFFIX)
465 CDEBUGFLAGS = CDebugFlags
477 HTDEF = -DHOSTTYPE='"$(HOSTTYPE)"'
482 DEFINES = $(TCSHPATH) $(HESDEF) $(AFSDEF) $(HTDEF) MyDefines MyCflags MyStdc
483 INCLUDES = -I. MyIncludes
491 SHSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c \
492 sh.char.c sh.exp.c sh.file.c sh.func.c \
493 sh.glob.c sh.hist.c sh.init.c sh.lex.c \
494 sh.misc.c sh.parse.c sh.print.c sh.proc.c \
495 sh.sem.c sh.set.c sh.time.c glob.c \
496 sh.char.h sh.dir.h sh.proc.h sh.h \
497 sh.decls.h glob.h ${SYSSRCS}
498 SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
499 sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \
500 sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \
501 sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \
502 sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} ${SYSOBJS}
504 TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \
506 TWOBJS= tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} \
507 tw.comp.${SUF} tw.color.${SUF}
509 EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
510 ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
511 EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
512 ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
514 TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
515 tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
516 tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
518 TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
519 tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \
520 tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
521 tc.vers.${SUF} tc.who.${SUF}
523 MISCF = Makefile.std BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md \
524 FAQ WishList config_f.h eight-bit.me glob.3 patchlevel.h pathnames.h \
525 tcsh.man Ported src.desc Imakefile imake.config complete.tcsh \
526 Makefile.vms termcap.vms snames.h host.defs gethost.c tcsh.man2html \
527 Makefile.in configure.ac Makefile.win32 aclocal.m4
528 CONFSRCS=config/[a-z]*
531 SRCS = $(SHSRCS) $(TWSRCS) $(EDSRCS) $(TCSRCS)
532 OBJS = $(SHOBJS) $(TWOBJS) $(EDOBJS) $(TCOBJS)
534 ALLSRCS= $(MISCF) $(SRCS) $(EXTF)
538 ed.defns.h: config.h ed.defns.c
540 @echo '/* Do not edit this file, make creates it. */' > $@
541 @echo '#ifndef _h_ed_defns' >> $@
542 @echo '#define _h_ed_defns' >> $@
543 egrep '[FV]_' ed.defns.c | egrep '^#define' >> $@
544 @echo '#endif /* _h_ed_defns */' >> $@
546 sh.err.h: config.h sh.err.c
548 @echo '/* Do not edit this file, make creates it. */' > $@
549 @echo '#ifndef _h_sh_err' >> $@
550 @echo '#define _h_sh_err' >> $@
551 egrep 'ERR_' sh.err.c | egrep '^#define' >> $@
552 @echo '#endif /* _h_sh_err */' >> $@
554 tc.const.h: config.h tc.const.c
556 @echo '/* Do not edit this file, make creates it. */' > $@
557 @echo '#ifndef _h_tc_const' >> $@
558 @echo '#define _h_tc_const' >> $@
559 ${CC} -E $(INCLUDES) ${DEFINES} -D_h_tc_const tc.const.c | \
561 sed -e 's/Char \([a-zA-Z0-9_]*\)\[\].*/extern Char \1[];/' | \
563 @echo '#endif /* _h_tc_const */' >> $@
566 cp config/ConfigH config.h
568 $(OBJS): sh.err.h tc.const.h ed.defns.h
571 rm -f tcsh-${VERSION}.tar.Z
572 rm -rf tcsh-${VERSION}
573 mkdir tcsh-${VERSION} tcsh-${VERSION}/config
574 cp ${ALLSRCS} tcsh-${VERSION}
575 cp ${CONFSRCS} tcsh-${VERSION}/config
576 tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
577 tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
578 rm -rf tcsh-${VERSION}
581 rm -f tcsh-${VERSION}.tar.gz
582 rm -rf tcsh-${VERSION}
583 mkdir tcsh-${VERSION} tcsh-${VERSION}/config
584 cp ${ALLSRCS} tcsh-${VERSION}
585 cp ${CONFSRCS} tcsh-${VERSION}/config
586 tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
587 tar cvf - tcsh-${VERSION} | gzip > tcsh-${VERSION}.tar.gz
588 rm -rf tcsh-${VERSION}
592 rm -rf tcsh-${VERSION}
593 mkdir tcsh-${VERSION} tcsh-${VERSION}/config
594 cp ${ALLSRCS} tcsh-${VERSION}
595 cp ${CONFSRCS} tcsh-${VERSION}/config
596 tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
597 MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
598 tcsh-${VERSION}/?* tcsh-${VERSION}/config/?* \
599 tcsh-${VERSION}/?*/set?*
600 rm -rf tcsh-${VERSION}
603 @(cd nls; make catalogs)
606 $(MAKE) clean ; $(MAKE) depend ; $(MAKE) tcsh ; $(MAKE) install
609 rm -f ed.defns.h sh.err.h tc.const.h config.h tc.defs.*
610 rm -f tcsh.*.m tcsh.*.cat
612 depend:: config.h ed.defns.h sh.err.h tc.const.h $(SRCS) tc.defs.c
614 tc.defs.${SUF}: tc.defs.c sh.h
616 tc.defs.c: gethost host.defs
618 @echo "/* Do not edit this file, make creates it */" > $@
619 ./gethost host.defs >> $@
621 ALIB=$(HESLIB) $(AFSLIB) $(SYSLIBS)
622 AINC=ed.defns.h sh.err.h tc.const.h sh.h
624 NormalProgramTarget(tcsh, $(OBJS), $(AINC), $(LOCALLIBS), $(ALIB))
625 NormalProgramTarget(gethost, gethost.${SUF}, $(AINC), $(LOCALLIBS), $(ALIB))
627 InstallProgram(tcsh,$(TCSH_BINDIR))
628 InstallManPage(tcsh,$(TCSH_MANDIR))