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 / src / Makefile.SH < prev    next >
Makefile  |  1990-04-28  |  7KB  |  317 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 src/Makefile (with variable substitutions)"
  17. cat >Makefile <<!GROK!THIS!
  18. # $Id: Makefile.SH,v 4.1 90/04/28 22:42:16 syd Exp $
  19. #
  20. #  Makefile for the ELM mail program.
  21. #
  22. #    Copyright (c) 1986, 1987 Dave Taylor
  23. #    Copyright (c) 1988, 1989, 1990 USENET Community Trust
  24. #
  25. # Bug reports, patches, comments, suggestions should be sent to:
  26. #
  27. #    Syd Weinstein - elm@DSI.COM
  28. #            dsinc!elm
  29. #
  30. # $Log:    Makefile.SH,v $
  31. # Revision 4.1  90/04/28  22:42:16  syd
  32. # checkin of Elm 2.3 as of Release PL0
  33. #
  34. # Variables
  35. #    Variables established by Configure
  36. CC        =    $cc
  37. CCFLAGS        =    $ccflags $xencf
  38. CHGRP        =    $chgrp
  39. CHMOD        =    $chmod
  40. CP        =    $cp
  41. DEST        =    $bin
  42. ECHO        =    $echo
  43. LFLAGS        =    $ldflags $xenlf
  44. LIB        =    $lib
  45. LIB2        =     $libs
  46. LIBS        =    $cryptlib $termlib $dbm
  47. LINT        =    $lint
  48. MAILGRP        =    $mailgrp
  49. MAILERMODE    =    $mailermode
  50. MV        =    $mv
  51. OPTIMIZE    =    $optimize
  52. RM        =     $rm -f
  53. TOUCH        =    $touch
  54.  
  55. !GROK!THIS!
  56.  
  57. cat >>Makefile <<'!NO!SUBS!'
  58.  
  59. #    Variables you may want to manually edit
  60. #        If you want debug logging then you'll
  61. #        want to uncomment the following.
  62. #DEBUG        =    -DDEBUG
  63.  
  64. #        If you're on an ACSnet system (Australia) then
  65. #        you'll want to uncomment the following.
  66. # DACSNET    =    -DACSNET
  67.  
  68. #    Other general variables
  69. BIN        =    ../bin
  70. CFLAGS        =    $(CCFLAGS) $(OPTIMIZE) -I$(INCLDIR) $(DEBUG) $(DACSNET) 
  71. INCLDIR        =    ../hdrs
  72. LINTFLAGS    =    -I$(INCLDIR)
  73. SHELL        =    /bin/sh
  74.  
  75. #     Lists
  76. ELM_SRC        =    addr_util.c    \
  77.             alias.c        \
  78.             aliasdb.c    \
  79.             aliaslib.c    \
  80.             args.c        \
  81.             bouncebk.c    \
  82.             builtin.c    \
  83.             calendar.c    \
  84.             conn_to.c    \
  85.             curses.c    \
  86.             date.c        \
  87.             delete.c    \
  88.             domains.c    \
  89.             edit.c        \
  90.             editmsg.c    \
  91.             elm.c        \
  92.             encode.c    \
  93.             errno.c        \
  94.             exitprog.c    \
  95.             expires.c    \
  96.             file.c        \
  97.             file_util.c    \
  98.             fileio.c    \
  99.             forms.c        \
  100.             hdrconfg.c    \
  101.             help.c        \
  102.             init.c        \
  103.             in_utils.c    \
  104.             leavembox.c    \
  105.             limit.c        \
  106.             mailmsg1.c    \
  107.             mailmsg2.c    \
  108.             mailtime.c    \
  109.             mkhdrs.c    \
  110.             newmbox.c    \
  111.             opt_utils.c    \
  112.             options.c    \
  113.             out_utils.c    \
  114.             pattern.c    \
  115.             pmalloc.c    \
  116.             quit.c        \
  117.             read_rc.c    \
  118.             remail.c    \
  119.             reply.c        \
  120.             returnadd.c    \
  121.             save_opts.c    \
  122.             savecopy.c    \
  123.             screen.c    \
  124.             showmsg.c    \
  125.             showmsg_c.c    \
  126.             signals.c    \
  127.             softkeys.c    \
  128.             sort.c        \
  129.             string2.c    \
  130.             strings.c    \
  131.             syscall.c    \
  132.             utils.c        \
  133.             validname.c
  134.  
  135. ELM_OBJ        =    addr_util.o    \
  136.             alias.o        \
  137.             aliasdb.o    \
  138.             aliaslib.o    \
  139.             args.o        \
  140.             bouncebk.o    \
  141.             builtin.o    \
  142.             calendar.o    \
  143.             conn_to.o    \
  144.             curses.o    \
  145.             date.o        \
  146.             delete.o    \
  147.             domains.o    \
  148.             edit.o        \
  149.             editmsg.o    \
  150.             elm.o        \
  151.             encode.o    \
  152.             errno.o        \
  153.             exitprog.o    \
  154.             expires.o    \
  155.             file.o        \
  156.             file_util.o    \
  157.             fileio.o    \
  158.             forms.o        \
  159.             hdrconfg.o    \
  160.             help.o        \
  161.             init.o        \
  162.             in_utils.o    \
  163.             leavembox.o    \
  164.             limit.o        \
  165.             mailmsg1.o    \
  166.             mailmsg2.o    \
  167.             mailtime.o    \
  168.             mkhdrs.o    \
  169.             newmbox.o    \
  170.             opt_utils.o    \
  171.             options.o    \
  172.             out_utils.o    \
  173.             pattern.o    \
  174.             pmalloc.o    \
  175.             quit.o        \
  176.             read_rc.o    \
  177.             remail.o    \
  178.             reply.o        \
  179.             returnadd.o    \
  180.             save_opts.o    \
  181.             savecopy.o    \
  182.             screen.o    \
  183.             showmsg.o    \
  184.             showmsg_c.o    \
  185.             signals.o    \
  186.             softkeys.o    \
  187.             sort.o        \
  188.             string2.o    \
  189.             strings.o    \
  190.             syscall.o    \
  191.             utils.o        \
  192.             validname.o
  193.  
  194. # Standard targets
  195. all:        $(BIN)/elm
  196.  
  197. install:    $(DEST)/elm
  198.  
  199. uninstall:    
  200.         $(RM) $(DEST)/elm
  201.  
  202. #    This is the only target that gets installed even if not out-of-date
  203. #    with respect the files from which it is installed.
  204. rmt-install:    rmt-defined
  205.         -$(MV) $(DEST)/elm $(DEST)/elm.old
  206.         -$(RM) $(DEST)/elm.old
  207.         $(CP) $(REMOTE)$(DEST)/elm $(DEST)/elm
  208.         $(CHGRP) $(MAILGRP) $(DEST)/elm
  209.         $(CHMOD) $(MAILERMODE) $(DEST)/elm
  210.  
  211. rmt-defined:
  212.     @(if [ "$(REMOTE)" = "" ];\
  213.       then\
  214.         $(ECHO) "You need to define 'REMOTE' as the remote file system";\
  215.         $(ECHO) "for this particular command. The easiest way to do this";\
  216.         $(ECHO) "to type:";\
  217.         $(ECHO) "        make REMOTE=<remote file system> rmt-install";\
  218.         exit 1;\
  219.     fi);
  220.  
  221. lint:        
  222.         $(LINT) $(LINTFLAGS) $(ELM_SRC) > LINT.OUT
  223.  
  224. clean:        
  225.         $(RM) $(ELM_OBJ) $(BIN)/elm
  226.  
  227. # Dependencies and rules
  228. #    Dependencies of header files upon other header files they include
  229. .PRECIOUS:        $(INCLDIR)/defs.h $(INCLDIR)/elm.h $(INCLDIR)/headers.h
  230.  
  231. $(INCLDIR)/defs.h:    $(INCLDIR)/../config.h $(INCLDIR)/sysdefs.h
  232.             $(CHMOD) u+w $@
  233.             $(TOUCH) $@
  234.  
  235. $(INCLDIR)/elm.h:    $(INCLDIR)/curses.h $(INCLDIR)/defs.h
  236.             $(CHMOD) u+w $@
  237.             $(TOUCH) $@
  238.  
  239. $(INCLDIR)/headers.h:    $(INCLDIR)/curses.h $(INCLDIR)/defs.h
  240.             $(CHMOD) u+w $@
  241.             $(TOUCH) $@
  242.  
  243. #    Dependencies of C object files
  244. addr_util.o:    $(INCLDIR)/headers.h
  245. alias.o:    $(INCLDIR)/headers.h
  246. aliasdb.o:    $(INCLDIR)/headers.h
  247. aliaslib.o:    $(INCLDIR)/headers.h
  248. args.o:        $(INCLDIR)/headers.h $(INCLDIR)/patchlevel.h
  249. bouncebk.o:    $(INCLDIR)/headers.h
  250. builtin.o:    $(INCLDIR)/headers.h
  251. calendar.o:    $(INCLDIR)/headers.h
  252. conn_to.o:    $(INCLDIR)/headers.h
  253. curses.o:    $(INCLDIR)/headers.h
  254. date.o:        $(INCLDIR)/headers.h
  255. delete.o:    $(INCLDIR)/headers.h
  256. domains.o:    $(INCLDIR)/headers.h
  257. edit.o:        $(INCLDIR)/headers.h
  258. editmsg.o:    $(INCLDIR)/headers.h
  259. elm.o:        $(INCLDIR)/elm.h
  260. encode.o:    $(INCLDIR)/headers.h
  261. errno.o:    $(INCLDIR)/headers.h
  262. exitprog.o:    $(INCLDIR)/headers.h
  263. expires.o:    $(INCLDIR)/headers.h
  264. file.o:        $(INCLDIR)/headers.h
  265. file_util.o:    $(INCLDIR)/headers.h
  266. fileio.o:    $(INCLDIR)/headers.h
  267. forms.o:    $(INCLDIR)/headers.h
  268. hdrconfg.o:    $(INCLDIR)/headers.h
  269. help.o:        $(INCLDIR)/headers.h
  270. in_utils.o:    $(INCLDIR)/headers.h
  271. init.o:        $(INCLDIR)/headers.h $(INCLDIR)/patchlevel.h
  272. leavembox.o:    $(INCLDIR)/headers.h
  273. limit.o:    $(INCLDIR)/headers.h
  274. mailmsg1.o:    $(INCLDIR)/headers.h
  275. mailmsg2.o:    $(INCLDIR)/headers.h
  276. mailtime.o:    $(INCLDIR)/headers.h
  277. mkhdrs.o:    $(INCLDIR)/headers.h
  278. newmbox.o:    $(INCLDIR)/headers.h
  279. opt_utils.o:    $(INCLDIR)/headers.h
  280. options.o:    $(INCLDIR)/headers.h
  281. out_utils.o:    $(INCLDIR)/headers.h
  282. pattern.o:    $(INCLDIR)/headers.h
  283. pmalloc.o:    $(INCLDIR)/defs.h
  284. quit.o:        $(INCLDIR)/headers.h
  285. read_rc.o:    $(INCLDIR)/headers.h
  286. remail.o:    $(INCLDIR)/headers.h
  287. reply.o:    $(INCLDIR)/headers.h
  288. returnadd.o:    $(INCLDIR)/headers.h
  289. save_opts.o:    $(INCLDIR)/save_opts.h $(INCLDIR)/headers.h
  290. savecopy.o:    $(INCLDIR)/headers.h
  291. screen.o:    $(INCLDIR)/headers.h
  292. showmsg.o:    $(INCLDIR)/headers.h
  293. showmsg_c.o:    $(INCLDIR)/headers.h
  294. signals.o:    $(INCLDIR)/headers.h
  295. softkeys.o:    $(INCLDIR)/headers.h
  296. sort.o:        $(INCLDIR)/headers.h
  297. string2.o:    $(INCLDIR)/headers.h
  298. strings.o:    $(INCLDIR)/headers.h
  299. syscall.o:    $(INCLDIR)/headers.h
  300. utils.o:    $(INCLDIR)/headers.h
  301. validname.o:    $(INCLDIR)/defs.h
  302.  
  303. #    Dependencies and rules for compiling C programs
  304. $(BIN)/elm:    $& $(ELM_OBJ)
  305.         $(CC) $(LFLAGS) -o $@ $(ELM_OBJ) $(LIBS) $(LIB2)
  306.  
  307. #    Dependencies and rules for installing C programs
  308. $(DEST)/elm:    $(BIN)/elm
  309.         -$(MV) $@ $@.old
  310.         -$(RM) $@.old
  311.         $(CP) $(BIN)/elm $@
  312.         $(CHGRP) $(MAILGRP) $@
  313.         $(CHMOD) $(MAILERMODE) $@
  314.  
  315. !NO!SUBS!
  316.