home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / aix-rs6000 / elm2.3.11.AIX3.1.5.Z / elm2.3.11.AIX3.1.5 / doc / Makefile.SH < prev    next >
Makefile  |  1990-10-24  |  6KB  |  243 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . ./config.sh
  10.     ;;
  11. esac
  12. case "$0" in
  13. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  14. esac
  15.  
  16. echo "Extracting doc/Makefile (with variable substitutions)"
  17. cat >Makefile <<!GROK!THIS!
  18. #
  19. # $Id: Makefile.SH,v 4.1.1.1 90/10/24 15:42:13 syd Exp $
  20. #
  21. #  Makefile for the documentation of the ELM mail system
  22. #
  23. #         (C) Copyright 1989, 1990, USENET Community Trust
  24. #
  25. #  $Log:    Makefile.SH,v $
  26. # Revision 4.1.1.1  90/10/24  15:42:13  syd
  27. # Add uninstall target
  28. # From: Rusty Haddock
  29. # Revision 4.1  90/04/28  22:41:07  syd
  30. # checkin of Elm 2.3 as of Release PL0
  31. #
  32. # Variables
  33. #    Variables established by Configure
  34. CHMOD        =    $chmod
  35. CP        =    $cp
  36. DEST        =    $bin
  37. ECHO        =    $echo
  38. FORMATTER    =    $roff
  39. LIB        =    $lib
  40. LN        =    $ln
  41. MAN        =    $mansrc
  42. MANEXT        =    $manext
  43. RM        =     $rm -f
  44. TBL           =    $tbl
  45. !GROK!THIS!
  46.  
  47. cat >>Makefile <<'!NO!SUBS!'
  48.  
  49. #    Other variables
  50. SHELL        =    /bin/sh
  51.  
  52. # List of installed man pages (except for wnemail.1 - handled differently)
  53. MAN_LIST        =    $(MAN)/answer.$(MANEXT)        \
  54.                 $(MAN)/autoreply.$(MANEXT)    \
  55.                 $(MAN)/checkalias.$(MANEXT)    \
  56.                 $(MAN)/elm.$(MANEXT)        \
  57.                 $(MAN)/fastmail.$(MANEXT)    \
  58.                 $(MAN)/filter.$(MANEXT)        \
  59.                 $(MAN)/frm.$(MANEXT)        \
  60.                 $(MAN)/listalias.$(MANEXT)    \
  61.                 $(MAN)/messages.$(MANEXT)    \
  62.                 $(MAN)/newalias.$(MANEXT)    \
  63.                 $(MAN)/newmail.$(MANEXT)    \
  64.                 $(MAN)/printmail.$(MANEXT)    \
  65.                 $(MAN)/readmsg.$(MANEXT)
  66.  
  67. # List of remotely installed man pages (except for wnemail.1 - handled
  68. # differently)
  69. REMOTE_MAN_LIST        =    $(REMOTE)$(MAN)/answer.$(MANEXT)    \
  70.                 $(REMOTE)$(MAN)/autoreply.$(MANEXT)    \
  71.                 $(REMOTE)$(MAN)/checkalias.$(MANEXT)    \
  72.                 $(REMOTE)$(MAN)/elm.$(MANEXT)        \
  73.                 $(REMOTE)$(MAN)/fastmail.$(MANEXT)    \
  74.                 $(REMOTE)$(MAN)/filter.$(MANEXT)    \
  75.                 $(REMOTE)$(MAN)/frm.$(MANEXT)        \
  76.                 $(REMOTE)$(MAN)/listalias.$(MANEXT)    \
  77.                 $(REMOTE)$(MAN)/messages.$(MANEXT)    \
  78.                 $(REMOTE)$(MAN)/newalias.$(MANEXT)    \
  79.                 $(REMOTE)$(MAN)/newmail.$(MANEXT)    \
  80.                 $(REMOTE)$(MAN)/printmail.$(MANEXT)    \
  81.                 $(REMOTE)$(MAN)/readmsg.$(MANEXT)
  82.  
  83. # List of files installed in LIB directory
  84. LIB_LIST        =    $(LIB)/elm-help.0    \
  85.                 $(LIB)/elm-help.1    \
  86.                 $(LIB)/elm-help.2    \
  87.                 $(LIB)/elm-help.3    \
  88.                 $(LIB)/elmrc-info
  89.  
  90. # List of files installed in remote LIB directory
  91. REMOTE_LIB_LIST        =    $(REMOTE)$(LIB)/elm-help.0    \
  92.                 $(REMOTE)$(LIB)/elm-help.1    \
  93.                 $(REMOTE)$(LIB)/elm-help.2    \
  94.                 $(REMOTE)$(LIB)/elm-help.3    \
  95.                 $(REMOTE)$(LIB)/elmrc-info
  96.  
  97. # List of formatted guides
  98. FORMATTED_LIST        =    Alias.fmtd    \
  99.                 Config.fmtd     \
  100.                 Cover.fmtd    \
  101.                 Filter.fmtd    \
  102.                 Form.fmtd    \
  103.                 Ref.fmtd    \
  104.                 Users.fmtd
  105.  
  106. # Targets
  107. #    The following are no-ops
  108. all:
  109. lint:
  110. clean:    
  111.  
  112. install:    $(LIB_LIST) $(MAN_LIST) $(MAN)/wnewmail.$(MANEXT)
  113.  
  114. uninstall:
  115.         $(RM) $(LIB_LIST) $(MAN_LIST) $(MAN)/wnewmail.$(MANEXT)
  116.  
  117. #    Dependencies and rules for installing man pages and lib files
  118. #    taken from a remote system
  119. #    This is the only target that gets installed even if not out-of-date
  120. #    with respect the files from which it is installed.
  121. rmt-install:    rmt-defined
  122.         $(RM) $(MAN)/newmail.$(MANEXT) $(MAN)/wnewmail.$(MANEXT)
  123.         $(CP) $(REMOTE_MAN_LIST) $(MAN)
  124.         $(CHMOD) u+w,a+r $(MAN_LIST)
  125.         $(LN) $(MAN)/newmail.$(MANEXT) $(MAN)/wnewmail.$(MANEXT)
  126.         $(CP) $(REMOTE_LIB_LIST) $(LIB)
  127.         $(CHMOD) u+w,a+r $(LIB_LIST)
  128.  
  129. rmt-defined:
  130.     @(if [ "$(REMOTE)" = "" ];\
  131.       then\
  132.         $(ECHO) "You need to define 'REMOTE' as the remote file system";\
  133.         $(ECHO) "for this particular command. The easiest way to do this";\
  134.         $(ECHO) "to type:";\
  135.         $(ECHO) "        make REMOTE=<remote file system> rmt-install";\
  136.         exit 1;\
  137.       fi);
  138.  
  139. #    Dependencies and rules for installing man pages and lib files
  140. $(MAN)/answer.$(MANEXT):    answer.1
  141.                 $(CP) $? $@
  142.                 $(CHMOD) u+w,a+r $@
  143.  
  144. $(MAN)/autoreply.$(MANEXT):    autoreply.1
  145.                 $(CP) $? $@
  146.                 $(CHMOD) u+w,a+r $@
  147.  
  148. $(MAN)/checkalias.$(MANEXT):    chkalias.1
  149.                 $(CP) $? $@
  150.                 $(CHMOD) u+w,a+r $@
  151.  
  152. $(MAN)/elm.$(MANEXT):        elm.1
  153.                 $(CP) $? $@
  154.                 $(CHMOD) u+w,a+r $@
  155.  
  156. $(MAN)/fastmail.$(MANEXT):    fastmail.1
  157.                 $(CP) $? $@
  158.                 $(CHMOD) u+w,a+r $@
  159.  
  160. $(MAN)/filter.$(MANEXT):    filter.1
  161.                 $(CP) $? $@
  162.                 $(CHMOD) u+w,a+r $@
  163.  
  164. $(MAN)/frm.$(MANEXT):        frm.1
  165.                 $(CP) $? $@
  166.                 $(CHMOD) u+w,a+r $@
  167.  
  168. $(MAN)/listalias.$(MANEXT):    listalias.1
  169.                 $(CP) $? $@
  170.                 $(CHMOD) u+w,a+r $@
  171.  
  172. $(MAN)/messages.$(MANEXT):    messages.1
  173.                 $(CP) $? $@
  174.                 $(CHMOD) u+w,a+r $@
  175.  
  176. $(MAN)/newalias.$(MANEXT):    newalias.1
  177.                 $(CP) $? $@
  178.                 $(CHMOD) u+w,a+r $@
  179.  
  180. $(MAN)/newmail.$(MANEXT):    newmail.1
  181.                 $(RM) $@
  182.                 $(CP) $? $@
  183.                 $(CHMOD) u+w,a+r $@
  184.  
  185. $(MAN)/printmail.$(MANEXT):    printmail.1
  186.                 $(CP) $? $@
  187.                 $(CHMOD) u+w,a+r $@
  188.  
  189. $(MAN)/readmsg.$(MANEXT):    readmsg.1
  190.                 $(CP) $? $@
  191.                 $(CHMOD) u+w,a+r $@
  192.  
  193. $(MAN)/wnewmail.$(MANEXT):    $(MAN)/newmail.$(MANEXT)
  194.                 $(RM) $@
  195.                 $(LN) $? $@
  196.  
  197. $(LIB)/elm-help.0:        elm-help.0
  198.                 $(CP) $? $@
  199.                 $(CHMOD) u+w,a+r $@
  200.  
  201. $(LIB)/elm-help.1:        elm-help.1
  202.                 $(CP) $? $@
  203.                 $(CHMOD) u+w,a+r $@
  204.  
  205. $(LIB)/elm-help.2:        elm-help.2
  206.                 $(CP) $? $@
  207.                 $(CHMOD) u+w,a+r $@
  208.  
  209. $(LIB)/elm-help.3:        elm-help.3
  210.                 $(CP) $? $@
  211.                 $(CHMOD) u+w,a+r $@
  212.  
  213. $(LIB)/elmrc-info:        elmrc-info
  214.                 $(CP) $? $@
  215.                 $(CHMOD) u+w,a+r $@
  216.  
  217. #    Dependencies and rules for formatting guides
  218. documentation:    $(FORMATTED_LIST)
  219.  
  220. Alias.fmtd:    Alias.guide
  221.         $(TBL) $? | $(FORMATTER) tmac.n - > $@
  222.  
  223. Config.fmtd:    Config.guid
  224.         $(TBL) $? | $(FORMATTER) tmac.n - > $@
  225.  
  226. Cover.fmtd:    Elm.cover
  227.         $(FORMATTER) tmac.n $? > $@
  228.  
  229. Filter.fmtd:    Filter.guid
  230.         $(TBL) $? | $(FORMATTER) tmac.n - > $@
  231.  
  232. Form.fmtd:    Form.guide
  233.         $(FORMATTER) tmac.n $? > $@
  234.  
  235. Ref.fmtd:    Ref.guide
  236.         $(FORMATTER) tmac.n $? > $@
  237.  
  238. Users.fmtd:    Users.guide
  239.         $(TBL) $? | $(FORMATTER) tmac.n - > $@
  240. !NO!SUBS!
  241.