Make.src 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # CHK=0xFF6D
  2. #+---------------------------------------------------------------
  3. # Makefile for helpgen (ecu help system)
  4. #----------------------------------------------------------------
  5. #+:EDITS:
  6. #:01-24-1997-02:37-wht@yuriatin-SOURCE RELEASE 4.00
  7. #:09-11-1996-20:00-wht@yuriatin-3.48-major telnet,curses,structural overhaul
  8. #:11-23-1995-11:20-wht@kepler-source control 3.37 for tsx-11
  9. #:11-14-1995-10:23-wht@kepler-3.37.80-source control point: SOCKETS
  10. #:09-04-1995-19:12-wht@n4hgf-prettify install since now part of iecu
  11. #:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
  12. #:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
  13. #:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
  14. #:07-25-1991-12:58-wht@n4hgf-ECU release 3.10
  15. #:04-21-1991-13:31-wht@n4hgf-convert to Make.src
  16. SHELL = /bin/sh
  17. PROGRAM = helpgen
  18. .SUFFIXES:
  19. .SUFFIXES: .c .o .h .src .data
  20. .c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
  21. SRC = \
  22. $(PROGRAM).c\
  23. util.c
  24. OBJ = \
  25. $(PROGRAM).o\
  26. util.o
  27. all: $(PROGRAM) ecuhelp.data # ecuhelp.doc
  28. $(PROGRAM): $(OBJ)
  29. $(BINTIME) $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $(PROGRAM)
  30. $(OBJ): Makefile
  31. ecuhelp.data: ecuhelp.src $(PROGRAM)
  32. ./$(PROGRAM) -b
  33. ecuhelp.doc: ecuhelp.src $(PROGRAM)
  34. ./$(PROGRAM) -d
  35. $(PROGRAM).fls: Makefile
  36. ls $(SRC) >$(PROGRAM).fls
  37. install: $(PROGRAM) ecuhelp.data # ecuhelp.doc
  38. @../makedirs -m 755 $(ECULIBDIR)
  39. @rm -f $(ECULIBDIR)/ecuhelp.data
  40. @cp ecuhelp.data $(ECULIBDIR)/ecuhelp.data
  41. @chown bin $(ECULIBDIR)/ecuhelp.data
  42. @chgrp bin $(ECULIBDIR)/ecuhelp.data
  43. @chmod 444 $(ECULIBDIR)/ecuhelp.data
  44. @echo Installed
  45. @ls -l $(ECULIBDIR)/ecuhelp.data
  46. neat:
  47. rm -f .make.* depend.tmp eddep.tmp Makefile.new *.bak *.BAK
  48. rm -f core tags cscope.out
  49. -rm -f *~ *# *.orig *.rej make.log a.out
  50. clean: neat
  51. rm -f $(OBJ)
  52. clobber: clean
  53. rm -f $(PROGRAM) ecuhelp.data ecuhelp.doc
  54. #MSC -Zg is broken and even my kludge mechanism can't make this one
  55. #anymore. Decommitted until some future day.
  56. #protos: $(PROGRAM).fls
  57. # echo > protos.h
  58. # csh ../zgcc $(PROGRAM).fls protos.h ..
  59. #
  60. # MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
  61. #
  62. depend:
  63. rm -f depend.tmp
  64. grep '^#include' $(SRC) \
  65. | sed \
  66. -e '/</d'\
  67. -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
  68. -e 's?\(.*\)\.c?\1.o?'\
  69. >> depend.tmp
  70. echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  71. echo '.+1,$$d' >>eddep.tmp
  72. echo 'r depend.tmp' >> eddep.tmp
  73. echo 'w' >> eddep.tmp
  74. cp Makefile Makefile.new
  75. ed Makefile.new < eddep.tmp
  76. rm eddep.tmp depend.tmp
  77. echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  78. echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  79. echo '# see make depend above'>>Makefile.new
  80. mv Makefile Makefile.bak
  81. mv Makefile.new Makefile
  82. # DO NOT DELETE THIS LINE
  83. # DEPENDENCIES MUST END AT END OF FILE
  84. # IF YOU PUT STUFF HERE IT WILL GO AWAY
  85. # see make depend above