home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / src / patch.tar.gz / patch.tar / patch / Makefile < prev    next >
Makefile  |  1989-02-02  |  2KB  |  91 lines

  1. # $Header: Makefile.SH,v 2.0.1.2 88/06/22 20:43:40 lwall Locked $
  2. #
  3. # $Log:    Makefile.SH,v $
  4. # Revision 2.0.1.2  88/06/22  20:43:40  lwall
  5. # patch12: config.h now depends on config.h.SH
  6. # Revision 2.0.1.1  88/06/03  15:00:48  lwall
  7. # patch10: upgraded to match some new metaconfig stuff
  8. # Revision 2.0  86/09/17  15:36:15  lwall
  9. # Baseline for netwide release.
  10. # Revision 1.2  86/09/08  14:07:42  lwall
  11. # Split up patch.c.
  12. # Revision 1.1  86/08/01  20:18:35  lwall
  13. # Initial revision
  14.  
  15. CC = cc
  16. bin = /usr/local/bin
  17. mansrc = /usr/man/manl
  18. manext = l
  19. CFLAGS =  -O
  20. LDFLAGS = 
  21. SMALL = 
  22. LARGE =  
  23.  
  24.  
  25. public = patch
  26. private = 
  27. manpages = patch.man
  28. util = Makefile
  29.  
  30. c = patch.c pch.c inp.c version.c util.c
  31.  
  32. obj = patch.o pch.o inp.o util.o version.o
  33.  
  34. lintflags = -phbvxac
  35.  
  36. addedbyconf = Makefile.old bsd config.h config.sh eunice loc pdp11 usg v7
  37.  
  38. # grrr
  39. SHELL = /bin/sh
  40.  
  41. .c.o:
  42.     $(CC) -c $(CFLAGS) $(LARGE) $*.c
  43.  
  44. all: $(public) $(private) $(util)
  45.     touch all
  46.  
  47. patch: $(obj)
  48.     $(CC) $(LDFLAGS) $(obj) $(libs) -o patch
  49.  
  50. config.h: config.h.SH
  51.     sh config.h.SH
  52.  
  53. # won't work with csh
  54. install: patch
  55.     export PATH || exit 1
  56.     - mv $(bin)/patch $(bin)/patch.old
  57.     - if test `pwd` != $(bin); then cp $(public) $(bin); fi
  58.     cd $(bin); chmod 755 $(public)
  59.     - if test `pwd` != $(mansrc); then \
  60. for page in $(manpages); do \
  61. rm -f $(mansrc)/../cat$(manext)/`basename $$page .man`.$(manext); \
  62. cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
  63. done; \
  64. fi
  65.  
  66. clean:
  67.     rm -f *.o *.orig core
  68.  
  69. realclean:
  70.     rm -f patch *.o *.orig *~ core $(addedbyconf)
  71.  
  72. # The following lint has practically everything turned on.  Unfortunately,
  73. # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  74. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  75. # for that spot.
  76.  
  77. lint:
  78.     lint $(lintflags) $(defs) $(c) > patch.fuzz
  79.  
  80. patch.o: config.h common.h patch.c inp.h pch.h util.h version.h
  81. pch.o: config.h common.h pch.c pch.h util.h
  82. inp.o: config.h common.h inp.c inp.h util.h
  83. util.o: config.h common.h util.c util.h
  84. version.o: config.h common.h version.c version.h patchlevel.h util.h
  85.  
  86.