"Fossies" - the Fresh Open Source Software Archive 
Member "tcsh-6.22.03/Imakefile" (18 Nov 2020, 14116 Bytes) of package /linux/misc/tcsh-6.22.03.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
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 "Imakefile":
6.22.02_vs_6.22.03.
1 XCOMM
2 XCOMM Imakefile for tcsh 6.12
3 XCOMM Marc Horowitz, MIT SIPB
4 XCOMM
5
6 #ifdef DestDir
7 #undef DestDir
8 #endif
9 #ifdef ManSuffix
10 #undef ManSuffix
11 #endif
12
13 /* All config options go in a separate file. */
14
15 #include "imake.config"
16
17 #ifndef HasGcc
18 # define HasGcc 0
19 #endif
20
21 #ifndef HasGcc2
22 # define HasGcc2 0
23 #endif
24
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! */
28
29 /**** tcsh configuration defines ****/
30
31 /* specific platforms */
32
33 #ifndef ConfigH
34 # ifdef UltrixArchitecture
35 # define ConfigH ultrix
36 # endif
37
38 # ifdef UxpArchitecture
39 # define ConfigH sysv4
40 # endif
41
42 # if defined(LinuxArchitecture) || defined(GNUArchitecture)
43 # define ConfigH linux
44 # endif
45
46 # ifdef AlphaArchitecture
47 # if !defined(LinuxArchitecture) && !defined(GNUArchitecture)
48 # define ConfigH decosf1
49 # endif
50 # if !HasGcc
51 # define MyCflags -std1 -Olimit 2000
52 # else
53 # define NoCombineRegs
54 # endif
55 # endif
56
57 # if defined(VaxArchitecture) && !defined(UltrixArchitecture)
58 # define ConfigH bsd
59 # endif
60
61 # ifdef NeXTArchitecture
62 # define ConfigH mach
63 # endif
64
65 # if defined(SunArchitecture)
66 # if (OSMajorVersion == 3)
67 # define ConfigH sunos35
68 # else
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
77 # endif
78 # endif
79 # define NoCombineRegs
80 # else /* OSMajorVersion == 5 */
81 # if (OSMinorVersion < 3)
82 # if (OSMinorVersion < 2)
83 # define ConfigH sol2
84 # else
85 # define ConfigH sol22
86 # endif
87 # else
88 # if (OSMinorVersion < 4)
89 # define ConfigH sol23
90 # else
91 # if (OSMinorVersion < 6)
92 # define ConfigH sol24
93 # else
94 # if (OSMinorVersion < 9)
95 # define ConfigH sol26
96 # else
97 # define ConfigH sol29
98 # endif
99 # endif
100 # endif
101 # endif
102 # define NoCombineRegs
103 # endif
104 # endif
105 # endif
106
107 # ifdef HPArchitecture
108 /* For some stupid reason makedepend on HP requires this */
109 DEPENDFLAGS = -o.o
110 # if (OSMajorVersion >= 8)
111 # define ConfigH hpux8
112 # else
113 # define ConfigH hpux7
114 # endif
115 # endif
116
117 # ifdef CrayArchitecture
118 # define ConfigH cray
119 # endif
120
121 # ifdef SGIArchitecture
122 # define ConfigH irix
123 # define UseLibBSD
124 # if (OSMajorVersion < 5)
125 # ifdef you_are_using_yp
126 # define UseSunLib
127 # endif
128 # if !HasGCC
129 # define MyStdc -D__STDC__
130 # if SGICompilerMajorVersion < 4
131 CCOPTIONS=-float # We don't want -cckr and -prototypes
132 # endif
133 # endif
134 # endif
135 # if (OSMajorVersion == 6)
136 # if (OSMinorVersion >= 2)
137 # undef UseLibBSD
138 # define ConfigH irix62
139 # endif
140 # endif
141 # endif
142
143 # ifdef IBMArchitecture
144 # undef UseLibBSD
145 # if (SystemV == YES)
146 # define ConfigH aix
147 # if OSMajorVersion < 3
148 # if OSMinorVersion < 2
149 # define UseLibBSD
150 # endif
151 # endif
152 # else
153 # define ConfigH bsd
154 # define AOSArchitecture
155 # endif
156 # endif
157
158
159 #ifdef AOSArchitecture
160 #define MyStdc -U__STDC__
161 #endif
162
163 # if defined(MipsBsdArchitecture) || defined(MipsSysvArchitecture)
164 # define ConfigH mips
165 # endif
166
167 # ifdef DguxArchitecture
168 # define ConfigH dgux
169 # endif
170
171 # ifdef ConvexArchitecture
172 # define ConfigH convex
173 # endif
174
175 # if defined(SQNTArchitecture) || defined(SequentArchitecture)
176 # define ConfigH sequent
177 # endif
178
179 # ifdef MacIIArchitecture
180 # define ConfigH mac2
181 # endif
182
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
188 # else
189 /* Maybe conditional on MACH? */
190 SYSSRCS=ma.setp.c
191 SYSOBJS=ma.setp.${SUF}
192 EXTF=mi.termios.c mi.wait.h mi.varargs.h vms.termcap.c
193 # endif
194
195 # ifdef i386Isc
196 # if IscVersion != 202
197 # define ConfigH isc
198 # define UseLibCposix
199 # else
200 # define ConfigH isc202
201 # endif
202 # endif /* i386Isc */
203
204 # ifdef OpenBSDArchitecture
205 # define ConfigH bsd4.4
206 # endif /* OpenBsdArchitecture */
207
208 # ifdef NetBSDArchitecture
209 # define ConfigH bsd4.4
210 # endif /* NetBsdArchitecture */
211
212 # ifdef FreeBSDArchitecture
213 # define ConfigH bsd4.4
214 # endif /* FreeBsdArchitecture */
215
216 # ifdef MidnightBSDArchitecture
217 # define ConfigH bsd4.4
218 # endif /* MidnightBsdArchitecture */
219
220 # ifdef i386SVR4Architecture
221 # define ConfigH sysv4
222 # ifdef DELL
223 # define NoCombineRegs
224 # endif
225 # endif
226
227 #endif /* !ConfigH */
228
229 /* generic os's */
230
231 #ifndef ConfigH
232
233 #if (SystemV == YES)
234 #define ConfigH sysv3
235 #else
236 /* why this as a default? Why not? */
237 #define ConfigH bsd
238 #endif
239
240 #endif /* !ConfigH */
241
242 /**** libraries ****/
243
244 #if (SystemV == NO) || defined(HPArchitecture) || \
245 defined(SQNTArchitecture) || defined(SequentArchitecture) || \
246 defined(MacIIArchitecture) || defined(UseLibTermcap)
247 LIBTERMCAP = -ltermcap
248 #else
249 LIBTERMCAP =
250 #endif
251
252 #if defined(SQNTArchitecture) || defined(SequentArchitecture)
253 LIBSQNT=-lsocket -linet -lnsl -lseq
254 #endif
255
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)
259 LIBCURSES = -lcurses
260 #else
261 LIBCURSES =
262 #endif
263
264 #if defined(UseLibNet)
265 LIBNET = -lnet
266 #else
267 LIBNET =
268 #endif
269
270 #if defined(UseLibSocket)
271 LIBSOCKET = -lsocket
272 #else
273 LIBSOCKET =
274 #endif
275
276 #if defined(UseLibBSD)
277 LIBBSD = -lbsd
278 #else
279 LIBBSD =
280 #endif
281
282 #if (defined(SGIArchitecture) && \
283 (OSMajorVersion == 3) && (OSMinorVersion == 3)) || \
284 defined(UseLibC_S)
285 LIBC_S = -lc_s
286 #else
287 LIBC_S =
288 #endif
289
290 #if defined(UseLibSun)
291 LIBSUN = -lsun
292 #else
293 LIBSUN =
294 #endif
295
296 #if defined(UseLibCposix)
297 LIBCPOSIX = -lcposix
298 #else
299 LIBCPOSIX =
300 #endif
301
302 #if defined(UseLibInet)
303 LIBINET = -linet
304 #else
305 LIBINET =
306 #endif
307
308 #if defined(UseLibDir)
309 LIBDIRECT = -ldir
310 #else
311 LIBDIRECT =
312 #endif
313
314 #if defined(UseLibX)
315 LIBX = -lx
316 #else
317 LIBX =
318 #endif
319
320 #if defined(UseLibIntl)
321 LIBINTL = -lintl
322 #else
323 LIBINTL =
324 #endif
325
326 #if (HasLibCrypt == YES)
327 LIBCRYPT = -lcrypt
328 #else
329 LIBCRYPT =
330 #endif
331
332 #if defined(MacIIArchitecture) || defined(UseLibPosix)
333 LIBPOSIX = -lposix
334 #else
335 LIBPOSIX =
336 #endif
337
338 #if defined(ATTArchitecture) || defined(UseLibDirent)
339 LIBDIRECTENT = -ldirent
340 #else
341 LIBDIRECTENT =
342 #endif
343
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. */
346
347 SYSLIBS = $(LIBPOSIX) $(LIBDIRECTENT) $(LIBTERMCAP) $(LIBCURSES) \
348 $(LIBNET) $(LIBINTL) $(LIBSOCKET) $(LIBSUN) $(LIBBSD) $(LIBCPOSIX) \
349 $(LIBINET) $(LIBDIRECT) $(LIBX) $(LIBC_S) $(LIBSQNT) $(LIBCRYPT)
350
351 /* Past here, nothing should need to be changed to compile on a different
352 platform, unless you have a really weird architecture. */
353
354 #ifdef MyCC
355 CC = MyCC
356 #else
357 # if HasGcc
358 # if HasGcc2
359 CC = gcc
360 # else
361 # ifdef NoCombineRegs
362 CC = gcc -finline-functions -fstrength-reduce
363 # else
364 CC = gcc -fcombine-regs -finline-functions -fstrength-reduce
365 # endif
366 # endif
367 # else
368 CC = cc
369 # endif
370 #endif
371
372 #ifdef HESIOD
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
377 #else
378 HESLIB =
379 HESDEF =
380 #endif
381
382 #ifdef AFS
383 #ifndef AFSDIR
384 AFSDIR = /usr/afsws
385 #endif
386 #ifdef AFS33
387 #define AFS33LIB -laudit
388 #else
389 #define AFS33LIB
390 #endif
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.
394 */
395 #if defined(HPArchitecture)
396 #define AFSAUXLIB -lc -lBSD
397 /* This is probably a kludge, but so is imake. */
398 #else
399 #if defined(SunArchitecture) && (OSMajorVersion == 5)
400 #define AFSAUXLIB -lsocket -lnsl -lc -lucb
401 #else
402 #define AFSAUXLIB
403 #endif
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
409 #else
410 AFSLIB =
411 AFSDEF =
412 #endif
413
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.
417
418 #ifndef TcshTop
419 #define TcshTop /usr/local
420 #endif
421 TCSHTOP = TcshTop
422
423 #ifndef ManSuffix
424 #define ManSuffix 1
425 #endif
426 MANSUFFIX = ManSuffix
427
428 #ifdef TcshPath
429 PATH_TCSHELL = TcshPath
430 TCSHPATH = -D_PATH_TCSHELL='"$(PATH_TCSHELL)"'
431 #else
432 TCSHPATH =
433 #endif
434
435 #ifdef DestBin
436 TCSH_BINDIR = DestBin
437 #else
438 TCSH_BINDIR = $(TCSHTOP)/bin
439 #endif
440 #ifdef DestMan
441 TCSH_MANDIR = DestMan
442 #else
443 TCSH_MANDIR = $(TCSHTOP)/man/man$(MANSUFFIX)
444 #endif
445
446 LOCALLIBS =
447
448 #ifndef MyCflags
449 #define MyCflags
450 #endif
451
452 #ifndef MyDefines
453 #define MyDefines
454 #endif
455
456 #ifndef MyIncludes
457 #define MyIncludes
458 #endif
459
460 #ifndef MyStdc
461 #define MyStdc
462 #endif
463
464 #ifdef CDebugFlags
465 CDEBUGFLAGS = CDebugFlags
466 #else
467 # if HasGcc2
468 CDEBUGFLAGS = -O2
469 # else
470 CDEBUGFLAGS = -O
471 # endif
472 #endif
473
474
475 #ifdef HostType
476 HOSTTYPE=HostType
477 HTDEF = -DHOSTTYPE='"$(HOSTTYPE)"'
478 #else
479 HTDEF =
480 #endif
481
482 DEFINES = $(TCSHPATH) $(HESDEF) $(AFSDEF) $(HTDEF) MyDefines MyCflags MyStdc
483 INCLUDES = -I. MyIncludes
484 #ifdef MyLibs
485 LDLIBS = MyLibs
486 #endif
487
488 SUF = o
489 VERSION = 6.12
490
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 dotlock.c dotlock.h 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} dotlock.${SUF} glob.${SUF} \
503 ${SYSOBJS}
504
505 TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \
506 tw.comp.c tw.color.c
507 TWOBJS= tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} \
508 tw.comp.${SUF} tw.color.${SUF}
509
510 EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
511 ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
512 EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
513 ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
514
515 TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
516 tc.func.c tc.nls.c tc.nls.h tc.os.c tc.os.h tc.printf.c tc.prompt.c \
517 tc.disc.${SUF} tc.func.${SUF} tc.nls.${SUF} tc.os.${SUF} \
518 tc.printf.${SUF} tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h \
519 tc.vers.c tc.wait.h tc.who.c tc.h
520 TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
521 tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \
522 tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
523 tc.vers.${SUF} tc.who.${SUF}
524
525 MISCF = Makefile.std BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md \
526 FAQ WishList config_f.h eight-bit.me glob.3 patchlevel.h pathnames.h \
527 tcsh.man Ported src.desc Imakefile imake.config complete.tcsh \
528 Makefile.vms termcap.vms snames.h host.defs gethost.c tcsh.man2html \
529 Makefile.in configure.ac Makefile.win32 aclocal.m4 dot.login dot.tcshrc
530 CONFSRCS=config/[a-z]*
531
532
533 SRCS = $(SHSRCS) $(TWSRCS) $(EDSRCS) $(TCSRCS)
534 OBJS = $(SHOBJS) $(TWOBJS) $(EDOBJS) $(TCOBJS)
535
536 ALLSRCS= $(MISCF) $(SRCS) $(EXTF)
537
538 AllTarget(tcsh)
539
540 ed.defns.h: config.h ed.defns.c
541 @rm -f $@
542 @echo '/* Do not edit this file, make creates it. */' > $@
543 @echo '#ifndef _h_ed_defns' >> $@
544 @echo '#define _h_ed_defns' >> $@
545 egrep '[FV]_' ed.defns.c | egrep '^#define' >> $@
546 @echo '#endif /* _h_ed_defns */' >> $@
547
548 sh.err.h: config.h sh.err.c
549 @rm -f $@
550 @echo '/* Do not edit this file, make creates it. */' > $@
551 @echo '#ifndef _h_sh_err' >> $@
552 @echo '#define _h_sh_err' >> $@
553 egrep 'ERR_' sh.err.c | egrep '^#define' >> $@
554 @echo '#endif /* _h_sh_err */' >> $@
555
556 tc.const.h: config.h tc.const.c
557 @rm -f $@
558 @echo '/* Do not edit this file, make creates it. */' > $@
559 @echo '#ifndef _h_tc_const' >> $@
560 @echo '#define _h_tc_const' >> $@
561 ${CC} -E $(INCLUDES) ${DEFINES} -D_h_tc_const tc.const.c | \
562 grep 'Char STR' | \
563 sed -e 's/Char \([a-zA-Z0-9_]*\)\[\].*/extern Char \1[];/' | \
564 sort >> $@
565 @echo '#endif /* _h_tc_const */' >> $@
566
567 config.h: config_f.h
568 cp config/ConfigH config.h
569
570 $(OBJS): sh.err.h tc.const.h ed.defns.h
571
572 tar.Z:
573 rm -f tcsh-${VERSION}.tar.Z
574 rm -rf tcsh-${VERSION}
575 mkdir tcsh-${VERSION} tcsh-${VERSION}/config
576 cp ${ALLSRCS} tcsh-${VERSION}
577 cp ${CONFSRCS} tcsh-${VERSION}/config
578 tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
579 tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
580 rm -rf tcsh-${VERSION}
581
582 tar.gz:
583 rm -f tcsh-${VERSION}.tar.gz
584 rm -rf tcsh-${VERSION}
585 mkdir tcsh-${VERSION} tcsh-${VERSION}/config
586 cp ${ALLSRCS} tcsh-${VERSION}
587 cp ${CONFSRCS} tcsh-${VERSION}/config
588 tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
589 tar cvf - tcsh-${VERSION} | gzip > tcsh-${VERSION}.tar.gz
590 rm -rf tcsh-${VERSION}
591
592 shar:
593 rm -f tcsh-*.shar
594 rm -rf tcsh-${VERSION}
595 mkdir tcsh-${VERSION} tcsh-${VERSION}/config
596 cp ${ALLSRCS} tcsh-${VERSION}
597 cp ${CONFSRCS} tcsh-${VERSION}/config
598 tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
599 MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
600 tcsh-${VERSION}/?* tcsh-${VERSION}/config/?* \
601 tcsh-${VERSION}/?*/set?*
602 rm -rf tcsh-${VERSION}
603
604 catalogs:
605 @(cd nls; make catalogs)
606
607 world:
608 $(MAKE) clean ; $(MAKE) depend ; $(MAKE) tcsh ; $(MAKE) install
609
610 clean::
611 rm -f ed.defns.h sh.err.h tc.const.h config.h tc.defs.*
612 rm -f tcsh.*.m tcsh.*.cat
613
614 depend:: config.h ed.defns.h sh.err.h tc.const.h $(SRCS) tc.defs.c
615
616 tc.defs.${SUF}: tc.defs.c sh.h
617
618 tc.defs.c: gethost host.defs
619 @rm -f $@
620 @echo "/* Do not edit this file, make creates it */" > $@
621 ./gethost host.defs >> $@
622
623 ALIB=$(HESLIB) $(AFSLIB) $(SYSLIBS)
624 AINC=ed.defns.h sh.err.h tc.const.h sh.h
625
626 NormalProgramTarget(tcsh, $(OBJS), $(AINC), $(LOCALLIBS), $(ALIB))
627 NormalProgramTarget(gethost, gethost.${SUF}, $(AINC), $(LOCALLIBS), $(ALIB))
628
629 InstallProgram(tcsh,$(TCSH_BINDIR))
630 InstallManPage(tcsh,$(TCSH_MANDIR))
631 DependTarget()