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