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