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 / lib / Makefile.SH < prev    next >
Makefile  |  1993-01-12  |  6KB  |  271 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_usenls" in
  17. define)    mcsrc="mcprt.c mcprtlib.c msgcat.c"
  18.     mcobj="mcprt.o mcprtlib.o msgcat.o"
  19.     ;;
  20. *)    mcsrc= mcobj= ;;
  21. esac
  22.  
  23. case "$d_strstr" in
  24. define)    strsrc= strobj= ;;
  25. *)    strsrc="strstr.c"
  26.     strobj="strstr.o"
  27.     ;;
  28. esac
  29.  
  30. echo "Extracting lib/Makefile (with variable substitutions)"
  31. cat >Makefile <<!GROK!THIS!
  32. # $Id: Makefile.SH,v 5.6 1992/12/24 19:33:59 syd Exp $
  33. #
  34. #  Makefile for the ELM mail program.
  35. #
  36. #    Copyright (c) 1986,1987 Dave Taylor
  37. #    Copyright (c) 1988-1992 USENET Community Trust
  38. #
  39. # Bug reports, patches, comments, suggestions should be sent to:
  40. #
  41. #    Syd Weinstein - elm@DSI.COM
  42. #            dsinc!elm
  43. #
  44. # $Log: Makefile.SH,v $
  45. # Revision 5.6  1992/12/24  19:33:59  syd
  46. # tune dependency list further
  47. # From: Syd
  48. #
  49. # Revision 5.5  1992/12/24  19:30:46  syd
  50. # Make all object depend on config.h, so a reconfig for a new
  51. # arch in shared sources (or copied sources) forces a recompile
  52. # of all modules.
  53. # From: Syd
  54. #
  55. # Revision 5.4  1992/12/20  05:15:58  syd
  56. # Add a c)hange alias, -u and -t options to listalias to list only user
  57. # and only system aliases respectively.
  58. # From: "Robert L. Howard" <robert.howard@matd.gatech.edu>
  59. #
  60. # Revision 5.3  1992/11/07  20:07:23  syd
  61. # Add header_cmp routine
  62. # From: Syd
  63. #
  64. # Revision 5.2  1992/10/27  01:43:40  syd
  65. # Move posix_signal to lib directory
  66. # From: tom@osf.org
  67. #
  68. # Revision 5.1  1992/10/03  22:41:36  syd
  69. # Initial checkin as of 2.4 Release at PL0
  70. #
  71. #
  72. #
  73. # Variables
  74. #    Variables established by Configure
  75. AR        =    ar
  76. CC        =    $cc
  77. CCFLAGS        =    $ccflags $xencf
  78. CHMOD        =    $chmod
  79. LINT        =    $lint
  80. OPTIMIZE    =    $optimize
  81. RANLIB        =    $ranlib
  82. RM        =     $rm -f
  83. TOUCH        =    $touch
  84. TAGS        =    ctags
  85.  
  86. MCSRC        =    $mcsrc
  87. MCOBJ        =    $mcobj
  88.  
  89. STRSRC        =    $strsrc
  90. STROBJ        =    $strobj
  91.  
  92. !GROK!THIS!
  93.  
  94. cat >>Makefile <<'!NO!SUBS!'
  95.  
  96. #    Variables you may want to manually edit
  97. #        If you want debug logging then you'll
  98. #        want to uncomment the following.
  99. #DEBUG        =    -DDEBUG
  100.  
  101. #        If you're on an ACSnet system (Australia) then
  102. #        you'll want to uncomment the following.
  103. # DACSNET    =    -DACSNET
  104.  
  105. #    Other general variables
  106. CFLAGS        =    $(CCFLAGS) $(OPTIMIZE) -I$(INCLDIR) $(DEBUG) $(DACSNET) 
  107. INCLDIR        =    ../hdrs
  108. LINTFLAGS    =    -I$(INCLDIR)
  109. SHELL        =    /bin/sh
  110.  
  111. #     Lists
  112. LIB_SRC        =    add_site.c    \
  113.             addrmchusr.c    \
  114.             mk_aliases.c    \
  115.             aliasdb.c    \
  116.             mk_lockname.c    \
  117.             can_access.c    \
  118.             can_open.c    \
  119.             chloc.c        \
  120.             errno.c        \
  121.             expand.c    \
  122.             figadrssee.c    \
  123.             gcos_name.c    \
  124.             getaddrfrm.c    \
  125.             getarpdate.c    \
  126.             getfullnam.c    \
  127.             header_cmp.c    \
  128.             in_list.c    \
  129.             in_string.c    \
  130.             istrcmp.c    \
  131.             ldstate.c    \
  132.             len_next.c    \
  133.             mail_gets.c    \
  134.             $(MCSRC)    \
  135.             move_left.c    \
  136.             ndbz.c        \
  137.             okay_addr.c    \
  138.             opt_utils.c    \
  139.             parsarpwho.c    \
  140.             posixsig.c    \
  141.             putenv.c    \
  142.             qstrings.c    \
  143.             remfirstwd.c    \
  144.             reverse.c    \
  145.             shiftlower.c    \
  146.             strincmp.c    \
  147.             striparens.c    \
  148.             $(STRSRC)    \
  149.             tail_of.c    \
  150.             validname.c
  151.  
  152. LIB_OBJ        =    add_site.o    \
  153.             addrmchusr.o    \
  154.             mk_aliases.o    \
  155.             aliasdb.o    \
  156.             mk_lockname.o    \
  157.             can_access.o    \
  158.             can_open.o    \
  159.             chloc.o        \
  160.             errno.o        \
  161.             expand.o    \
  162.             figadrssee.o    \
  163.             gcos_name.o    \
  164.             getaddrfrm.o    \
  165.             getarpdate.o    \
  166.             getfullnam.o    \
  167.             header_cmp.o    \
  168.             in_list.o    \
  169.             in_string.o    \
  170.             istrcmp.o    \
  171.             ldstate.o    \
  172.             len_next.o    \
  173.             mail_gets.o    \
  174.             $(MCOBJ)    \
  175.             move_left.o    \
  176.             ndbz.o        \
  177.             okay_addr.o    \
  178.             opt_utils.o    \
  179.             parsarpwho.o    \
  180.             posixsig.o    \
  181.             putenv.o    \
  182.             qstrings.o    \
  183.             remfirstwd.o    \
  184.             reverse.o    \
  185.             shiftlower.o    \
  186.             strincmp.o    \
  187.             striparens.o    \
  188.             $(STROBJ)    \
  189.             tail_of.o    \
  190.             validname.o
  191.  
  192. all:            libutil.a
  193.  
  194. install:        libutil.a
  195.  
  196. uninstall:        libutil.a
  197.  
  198. libutil.a:        $(LIB_OBJ)
  199.             $(AR) r $@ $?
  200.             $(RANLIB) $@
  201.  
  202. lint:        
  203.         $(LINT) $(LINTFLAGS) $(LIB_SRC) > LINT.OUT
  204.  
  205. tags:
  206.         $(TAGS) $(LIB_SRC)
  207.  
  208. clean:        
  209.         $(RM) $(LIB_OBJ) libutil.a
  210.  
  211. # Dependencies and rules
  212. #    Dependencies of header files upon other header files they include
  213. .PRECIOUS:        $(INCLDIR)/defs.h $(INCLDIR)/elm.h $(INCLDIR)/headers.h
  214.  
  215. $(INCLDIR)/defs.h:    $(INCLDIR)/../config.h $(INCLDIR)/sysdefs.h
  216.             $(CHMOD) u+w $@
  217.             $(TOUCH) $@
  218.  
  219. $(INCLDIR)/elm.h:    $(INCLDIR)/curses.h $(INCLDIR)/defs.h
  220.             $(CHMOD) u+w $@
  221.             $(TOUCH) $@
  222.  
  223. $(INCLDIR)/headers.h:    $(INCLDIR)/curses.h $(INCLDIR)/defs.h
  224.             $(CHMOD) u+w $@
  225.             $(TOUCH) $@
  226.  
  227. #    Dependencies of C object files
  228. add_site.o:    $(INCLDIR)/headers.h
  229. addrmchusr.o:    $(INCLDIR)/headers.h
  230. mk_aliases.o:    $(INCLDIR)/headers.h $(INCLDIR)/ndbz.h $(INCLDIR)/s_newalias.h
  231. aliasdb.o:    $(INCLDIR)/headers.h $(INCLDIR)/ndbz.h
  232. mk_lockname.o:    $(INCLDIR)/headers.h
  233. can_access.o:    $(INCLDIR)/headers.h
  234. can_open.o:    $(INCLDIR)/headers.h
  235. chloc.o:    $(INCLDIR)/headers.h
  236. errno.o:    $(INCLDIR)/headers.h
  237. expand.o:    $(INCLDIR)/defs.h $(INCLDIR)/s_elmrc.h
  238. figadrssee.o:    $(INCLDIR)/headers.h
  239. gcos_name.o:    $(INCLDIR)/headers.h
  240. getaddrfrm.o:    $(INCLDIR)/headers.h
  241. getarpdate.o:    $(INCLDIR)/headers.h
  242. getfullnam.o:    $(INCLDIR)/headers.h
  243. header_cmp.o:    $(INCLDIR)/headers.h
  244. in_list.o:    $(INCLDIR)/headers.h
  245. in_string.o:    $(INCLDIR)/headers.h
  246. istrcmp.o:    $(INCLDIR)/headers.h
  247. ldstate.o:    $(INCLDIR)/defs.h
  248. len_next.o:    ../config.h
  249. mail_gets.o:    ../config.h
  250. mcprt.o:    $(INCLDIR)/mcprt.h $(INCLDIR)/mcprtlib.h
  251. mcprtlib.o:    $(INCLDIR)/mcprtlib.h $(INCLDIR)/nl_types.h
  252. move_left.o:    $(INCLDIR)/headers.h
  253. msgcat.o:    $(INCLDIR)/msgcat.h $(INCLDIR)/nl_types.h
  254. ndbz.o:        $(INCLDIR)/headers.h $(INCLDIR)/ndbz.h
  255. okay_addr.o:    $(INCLDIR)/headers.h
  256. opt_utils.o:    $(INCLDIR)/headers.h $(INCLDIR)/s_error.h
  257. parsarpwho.o:    $(INCLDIR)/headers.h
  258. posixsig.o:    $(INCLDIR)/headers.h
  259. putenv.o:    $(INCLDIR)/headers.h
  260. qstrings.o:    ../config.h
  261. remfirstwd.o:    $(INCLDIR)/headers.h
  262. reverse.o:    $(INCLDIR)/headers.h
  263. shiftlower.o:    $(INCLDIR)/headers.h
  264. strincmp.o:    $(INCLDIR)/headers.h
  265. striparens.o:    $(INCLDIR)/headers.h
  266. strstr.o:    $(INCLDIR)/headers.h
  267. tail_of.o:    $(INCLDIR)/headers.h
  268. validname.o:    $(INCLDIR)/defs.h
  269.  
  270. !NO!SUBS!
  271.