home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2912 / Makefile.SH < prev    next >
Encoding:
Makefile  |  1991-03-03  |  1.0 KB  |  60 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. echo "Extracting Makefile (with variable substitutions)"
  16. $spitshell >Makefile <<!GROK!THIS!
  17. #
  18. #    Makefile for mailagent
  19. #
  20.  
  21. # $Id: Makefile.SH,v 2.0 91/02/19 15:48:41 ram Exp $
  22. #
  23. # $Log:    Makefile.SH,v $
  24. # Revision 2.0  91/02/19  15:48:41  ram
  25. # Baseline for first official release.
  26.  
  27. SHELL = /bin/sh
  28.  
  29. TARGETS = all install clean realclean
  30. SUBDIRS = btoa kit man
  31. RM = $rm
  32. !GROK!THIS!
  33. $spitshell >>Makefile <<'!NO!SUBS!'
  34.  
  35. #
  36. #    Building rules
  37. #
  38.  
  39. $(TARGETS): makefiles
  40.     $(MAKE) $(SUBDIRS) TARGET=$@
  41.  
  42. .force:
  43.  
  44. $(SUBDIRS): .force
  45.     cd $@; $(MAKE) $(TARGET)
  46.  
  47. makefiles:
  48.     -@for dir in $(SUBDIRS); do \
  49.         (cd $$dir && if test ! -f Makefile; then \
  50.             sh Makefile.SH; fi) \
  51.     done
  52.  
  53. clobber: makefiles
  54.     $(MAKE) $(SUBDIRS) TARGET=$@
  55.     $(RM) -f config.h config.sh Makefile install
  56. !NO!SUBS!
  57. chmod 755 Makefile
  58. $eunicefix Makefile
  59.