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