home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / m / m4v05as.zip / MAKE.INC < prev    next >
Text File  |  1992-02-22  |  1KB  |  69 lines

  1. # make.inc - General purpose targets for makefiles -*-Text-*-
  2. # Copyright (C) 1990 by Thorsten Ohl, ohl@gnu.ai.mit.edu
  3.  
  4. # $Header$
  5. #
  6.  
  7. # This library of targets contains fairly standard idioms
  8. # for makefile (but they seem not yet ripe enough to become
  9. # hard coded defaults).
  10.  
  11. #
  12. # Maintaing backups in a .zip archive and on floppy disk.
  13. #
  14. # entry points:
  15. # zip, disk
  16. #
  17. # required macros:
  18. # ZIPFILE:  name of the zip file (without suffix)
  19. # DISK:     letter of the disk on which the backup lives
  20. # RCSFILES: files living in RCS (w/o prefix)
  21. # MISC:        more files
  22.  
  23.  
  24. ifdef ZIPFILE
  25.  
  26. .PHONY: zip
  27. zip: $(ZIPFILE).zip
  28.  
  29. ifdef RCSFILES
  30. $(ZIPFILE).zip: $(addprefix RCS/, $(RCSFILES)) $(MISC)
  31. else
  32. $(ZIPFILE).zip: $(MISC)
  33. endif
  34.     pkzip -r- -P $@ $?
  35.  
  36.  
  37. ifdef DISK
  38.  
  39. .PHONY: disk
  40. disk: $(DISK):/$(ZIPFILE).zip
  41. $(DISK):/$(ZIPFILE).zip: $(ZIPFILE).zip
  42.     cp -f $< $@
  43.     pkunzip -t $@ | grep -vw OK
  44.  
  45. endif # DISK
  46.  
  47. endif # ZIPFILE
  48.  
  49. #
  50. # Creating .tar files:
  51.  
  52. %.tar:
  53.     tar -cf $@ $^
  54.  
  55. # Compressing .tar files for mailing
  56.  
  57. %.uue: %.tar
  58.     compress < $< | uuencode $<.Z > $@
  59.  
  60.  
  61.  
  62. #
  63. # Local Variables:
  64. # mode:Text
  65. # ChangeLog:ChangeLog
  66. # compile-command:make
  67. # End:
  68.  
  69.