csh and tcsh work

Sources of csh/makefile.v6

csh と tcsh のソース

Bill Joy

First published: October, 1978.

Copyright © 1979 Regents of the University of California.

  1. 1
    #
  2. 2
    # Skeleton for version 6
  3. 3
    #
  4. 4
    # Flags you can define
  5. 5
    #	NOHELP		login doesnt setenv HOME, thus do ./.login
  6. 6
    #	NORMAL6		standard version 6 arg lists, number of units
  7. 7
    #	TELL		have tell system call
  8. 8
    #
  9. 9
    # The -t1 version of the C compiler makes text larger and data smaller.
  10. 10
    # Use it if you have it; it isn't critical
  11. 11
    #
  12. 12
    BINDIR=	/bin
  13. 13
    CFLAGS=	-O -I/usr/include/retrofit -Dpdp11 -t1 -DNORMAL6 -DNOHELP
  14. 14
    XSTR=	/usr/ucb/xstr
  15. 15
    ED=	-ed
  16. 16
    AS=	-as
  17. 17
    RM=	-rm
  18. 18
    CXREF=	/usr/ucb/cxref
  19. 19
  20. 20
    #
  21. 21
    # strings.o must be last in OBJS since it can change when previous files compile
  22. 22
    #
  23. 23
    OBJS=sh.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.func.o sh.glob.o sh.hist.o \
  24. 24
    	sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.sem.o sh.set.o \
  25. 25
    	sh.wait.o alloc.o sh.init.o 11printf.o getpwent.o getpwnam.o  \
  26. 26
    	getpwuid.o errlst.o strings.o
  27. 27
  28. 28
    #
  29. 29
    # Special massaging of C files for sharing of strings
  30. 30
    #
  31. 31
    .c.o:
  32. 32
    	${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  33. 33
    	${CC} -c ${CFLAGS} x.c
  34. 34
    	mv x.o $*.o
  35. 35
  36. 36
    a.out: ${OBJS} sh.local.h
  37. 37
    	${CC} -n ${OBJS} -lretro -lS
  38. 38
  39. 39
    #
  40. 40
    # strings.o and sh.init.o are specially processed to be shared
  41. 41
    #
  42. 42
    strings.o: strings
  43. 43
    	${XSTR}
  44. 44
    	${CC} -S xs.c
  45. 45
    	${ED} - <:rofix xs.s
  46. 46
    	${AS} -o strings.o xs.s
  47. 47
    	${RM} xs.s
  48. 48
  49. 49
    sh.init.o:
  50. 50
    	${CC} -E ${CFLAGS} sh.init.c | ${XSTR} -c -
  51. 51
    	${CC} ${CFLAGS} -S x.c
  52. 52
    	echo ${ED} - <:rofix x.s
  53. 53
    	${AS} - -o sh.init.o x.s
  54. 54
    	${RM} x.s
  55. 55
  56. 56
    errlst.o:
  57. 57
    	${CC} -E ${CFLAGS} errlst.c | ${XSTR} -c -
  58. 58
    	${CC} ${CFLAGS} -S x.c
  59. 59
    	echo ${ED} - <:rofix x.s
  60. 60
    	${AS} -o errlst.o x.s
  61. 61
    	${RM} x.s
  62. 62
  63. 63
    lint:
  64. 64
    	lint sh*.h sh*.c
  65. 65
  66. 66
    print:
  67. 67
    	@pr READ_ME
  68. 68
    	@pr makefile makefile.*
  69. 69
    	@(size -l a.out; size *.o) | pr -h SIZES
  70. 70
    	@${CXREF} sh*.c | pr -h XREF
  71. 71
    	@ls -l | pr
  72. 72
    	@pr sh*.h [a-rt-z]*.h sh*.c alloc.c
  73. 73
  74. 74
    install: a.out sh.local.h
  75. 75
    	cp a.out x
  76. 76
    	strip x
  77. 77
    	${RM} -f ${BINDIR}/csh
  78. 78
    	mv x ${BINDIR}/csh
  79. 79
    	${RM} -f ${BINDIR}/makesh
  80. 80
    	ln ${BINDIR}/csh ${BINDIR}/makesh
  81. 81
  82. 82
    clean:
  83. 83
    	${RM} -f a.out strings x.c xs.c
  84. 84
    	${RM} -f *.o

To the top of this page