home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cmdline.lha / cmdline / doc / Makefile < prev    next >
Encoding:
Makefile  |  1992-08-03  |  2.8 KB  |  117 lines

  1. ##########################################################################
  2. ## ^FILE: Makefile - make file for the documentation for CmdLine product
  3. ##
  4. ## ^DESCRIPTION:
  5. ##    This is the makefile that is used to build and install the
  6. ##    documentation CmdLine product.
  7. ##
  8. ## ^HISTORY:
  9. ##    04/28/92  Brad Appleton   <brad@ssd.csd.harris.com>   Created
  10. ###^^#####################################################################
  11.  
  12. include ../Config.mk
  13.  
  14. ###
  15. # give a usage message if no target is given
  16. ###
  17. usage:
  18.     @echo "Usage: make <target>"
  19.     @echo " "
  20.     @echo "where <target> is one of the following: "
  21.     @echo " "
  22.     @echo "   install  -- to install the documentation"
  23.     @echo "   installman  -- to install the unpacked documentation"
  24.     @echo "   installcatman  -- to install the packed documentation"
  25.     @echo "   print  -- to print the documentation"
  26.     @echo "   view   -- to view the documentation"
  27.     @echo "   text   -- to build text copies of the documentation"
  28.     @echo "   spell  -- to spell check the documentation"
  29.     @echo "   clean  -- to remove all intermediate files"
  30.     @echo "   clobber  -- to remove all created files"
  31.  
  32. ###
  33. # files used
  34. ###
  35. INCLUDES=bugs.man caveats.man environ.man example.man files.man \
  36.          macros.man parsing.man
  37. DOCS=cmdparse.man1 cmdline.man3 cmdargs.man3
  38. MAN3FILES=cmdline.3 cmdargs.3
  39. MAN1FILES=cmdparse.1
  40. CATMAN3FILES=cmdline.3.z cmdargs.3.z
  41. CATMAN1FILES=cmdparse.1.z
  42.  
  43. ###
  44. # target dependencies
  45. ###
  46. .SUFFIXES: .man1 .man3 .1 .3
  47.  
  48. .man1.1:
  49.     $(SOELIM) $< >$*.1
  50.     $(MANTOCATMAN) $*.1
  51.  
  52. .man3.3:
  53.     $(SOELIM) $< >$*.3
  54.     $(MANTOCATMAN) $*.3
  55.  
  56. ###
  57. # installation dependencies
  58. ###
  59. all:
  60.  
  61. install: installman installcatman
  62.  
  63. installman: installman1 installman3
  64.  
  65. installcatman: installcatman1 installcatman3
  66.  
  67. installman1: $(MAN1FILES)
  68.     ( $(CHDIR) $(MANDIR)$(MAN1DIR) ; $(RM) $(MAN1FILES) )
  69.     $(CP) $(MAN1FILES) $(MANDIR)$(MAN1DIR)
  70.  
  71. installcatman1: $(CATMAN1FILES)
  72.     ( $(CHDIR) $(CATMANDIR)$(MAN1DIR) ; $(RM) $(CATMAN1FILES) )
  73.     $(CP) $(CATMAN1FILES) $(CATMANDIR)$(MAN1DIR)
  74.  
  75. installman3: $(MAN3FILES)
  76.     ( $(CHDIR) $(MANDIR)$(MAN3DIR) ; $(RM) $(MAN3FILES) )
  77.     $(CP) $(MAN3FILES) $(MANDIR)$(MAN3DIR)
  78.  
  79. installcatman3: $(CATMAN3FILES)
  80.     ( $(CHDIR) $(CATMANDIR)$(MAN3DIR) ; $(RM) $(CATMAN3FILES) )
  81.     $(CP) $(CATMAN3FILES) $(CATMANDIR)$(MAN3DIR)
  82.  
  83. ###
  84. # maintenance dependencies
  85. ###
  86. clean:
  87.     $(RM) $(MAN1FILES) $(MAN3FILES) $(CATMAN1FILES) $(CATMAN3FILES) CmdLine.3.z
  88.  
  89. clobber: clean
  90.     $(RM) *.txt
  91.  
  92. spell: $(DOCS) $(INCLUDES)
  93.     $(SPELL) $(DOCS) $(INCLUDES)
  94.  
  95. print: $(MANFILES)
  96.     $(TROFF) $(TRFLAGS) $(DOCS)
  97.  
  98. text: ascii
  99. txt: ascii
  100. ascii:
  101.     $(NROFF) $(NRFLAGS) cmdparse.man1 | $(COL) > cmdparse1.txt
  102.     $(NROFF) $(NRFLAGS) cmdline.man3  | $(COL) > cmdline3.txt
  103.     $(NROFF) $(NRFLAGS) cmdargs.man3  | $(COL) > cmdargs3.txt
  104.  
  105. view: $(MANFILES)
  106.     $(NROFF) $(NRFLAGS) $(DOCS)
  107.  
  108. ##
  109. # include dependencies
  110. ##
  111. cmdparse.1: cmdparse.man1 $(INCLUDES)
  112.  
  113. cmdline.3: cmdline.man3 $(INCLUDES)
  114.  
  115. cmdargs.3: cmdargs.man3 $(INCLUDES)
  116.  
  117.