home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / elm-2.4-pl20.tar.Z / elm-2.4-pl20.tar / Makefile.SH < prev    next >
Makefile  |  1992-10-03  |  3KB  |  128 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. case "$d_symlink" in
  17. *define*) sln='ln -s' ;;
  18. *) sln='ln';;
  19. esac
  20.  
  21. echo "Extracting Makefile (with variable substitutions)"
  22. cat >Makefile <<!GROK!THIS!
  23. #
  24. # $Id: Makefile.SH,v 5.1 1992/10/03 22:12:17 syd Exp $
  25. #
  26. #  Makefile for the entire ELM mail system
  27. #
  28. #         (C) Copyright 1986,1987, by Dave Taylor
  29. #         (C) Copyright 1988-1992, USENET Community Trust
  30. #
  31. #  $Log: Makefile.SH,v $
  32. # Revision 5.1  1992/10/03  22:12:17  syd
  33. # Initial checkin as of 2.4 Release at PL0
  34. #
  35. #
  36.  
  37. #    Variables established by Configure
  38. CAT        =    $cat
  39. GREP        =    $grep
  40. ECHO        =    $echo
  41. MAKE        =    $make
  42. PR        =    $pr
  43. SHAR        =    $shar -s 60000
  44. SLEEP        =    $sleep
  45. TAR        =    $tar
  46. TAPE        =    $rmttape
  47.  
  48. !GROK!THIS!
  49. cat >>Makefile <<'!NO!SUBS!'
  50. #    Other variables
  51. SHELL            =    /bin/sh
  52. SOURCE_FILES        =    `$(GREP) -v 'doc/' MANIFEST`
  53. DISTRIBUTED_FILES    =    `$(CAT) MANIFEST`
  54.  
  55.  
  56. # Targets
  57. #    Give default target first and alone
  58. default_target:    all
  59.  
  60. #    Targets that are simply executed in each subordinate makefile as is
  61. all install uninstall lint clean:
  62.         cd lib; $(MAKE) -$(MAKEFLAGS) $@
  63.         cd src; $(MAKE) -$(MAKEFLAGS) $@
  64.         cd utils; $(MAKE) -$(MAKEFLAGS) $@
  65.         cd filter; $(MAKE) -$(MAKEFLAGS) $@
  66.         cd doc; $(MAKE) -$(MAKEFLAGS) $@
  67.  
  68. #    Targets that apply to all elm at once
  69. listing:
  70.         @$(ECHO) "Making source listing in file LISTING."
  71.         @$(PR) -n -f $(SOURCE_FILES) > LISTING
  72.  
  73. #    This is the only target that gets installed even if not out-of-date
  74. #    with respect the files from which it is installed.
  75. rmt-install:    rmt-defined
  76.         @($(ECHO) "Warning: This assumes you have already installed";\
  77.           $(ECHO) "ELM on the remote machine <$(REMOTE)>. If this is";\
  78.           $(ECHO) "not the case, interrupt this process quickly!";\
  79.           $(SLEEP) 10;)
  80.         cd lib; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
  81.         cd src; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
  82.         cd filter; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
  83.         cd utils; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
  84.         cd doc; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
  85.  
  86. rmt-defined:
  87.     @(if [ "$(REMOTE)" = "" ];\
  88.       then\
  89.         $(ECHO) "You need to define 'REMOTE' as the remote file system";\
  90.         $(ECHO) "for this particular command. The easiest way to do this";\
  91.         $(ECHO) "to type:";\
  92.         $(ECHO) "        make REMOTE=<remote file system> rmt-install";\
  93.         exit 1;\
  94.     fi);
  95.  
  96. shar:
  97.         $(SHAR) $(DISTRIBUTED_FILES)
  98.  
  99. tar:
  100.         $(TAR) cvf $(TAPE) $(DISTRIBUTED_FILES)
  101.  
  102. #    Targets that are really in subordinate make files
  103. documentation:
  104.     cd doc; $(MAKE) -$(MAKEFLAGS) $@
  105.  
  106. elm:
  107.     cd lib; $(MAKE) -$(MAKEFLAGS) all
  108.     cd src; $(MAKE) -$(MAKEFLAGS) all
  109.  
  110. #    The dummy dependency here prevents make from thinking the target is the
  111. #    filter directory that sits in the current directory, rather than
  112. #    an abstract target.
  113. filter: _filter
  114.  
  115. _filter:
  116.     cd filter; $(MAKE) -$(MAKEFLAGS) all
  117.  
  118. #    The dummy dependency here prevents make from thinking the target is the
  119. #    utils directory that sits in the current directory, rather than
  120. #    an abstract target.
  121. utils: _utils
  122.  
  123. _utils:
  124.     cd utils; $(MAKE) -$(MAKEFLAGS) all
  125.  
  126. !NO!SUBS!
  127.