home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / lemacs-19.6 / Makefile < prev    next >
Encoding:
Makefile  |  1993-01-29  |  4.2 KB  |  145 lines

  1. # make all    to compile and build Emacs
  2. # make install    to install it
  3. # make install.sysv  to install on system V.
  4. # make install.xenix  to install on Xenix
  5. # make install.aix    to install on AIX.
  6. # make tags    to update tags tables
  7. #
  8. # make distclean    to delete everything that wasn't in the distribution
  9. #    This is a very dangerous thing to do!
  10. # make clean
  11. #       This is a little less dangerous.
  12.  
  13. SHELL = /bin/sh
  14. CC = cc
  15.  
  16. # Where to install things
  17. # Note that on system V you must change MANDIR to /use/local/man/man1.
  18. LIBDIR= /usr/local/emacs
  19. BINDIR= /usr/local/bin
  20. MANDIR= /usr/man/man1
  21.  
  22. # Flags passed down to subdirectory makefiles.
  23. MFLAGS=
  24.  
  25. # Command used for installation.
  26. # If `install' doesn't work on your system, try `./install.sh'.
  27. INSTALL=install
  28.  
  29. # Subdirectories to make recursively.  `lisp' is not included
  30. # because the compiled lisp files are part of the distribution
  31. # and you cannot remake them without installing Emacs first.
  32. SUBDIR= etc src
  33.  
  34. # Subdirectories to install
  35. COPYDIR= etc info lisp
  36.  
  37. # Subdirectories to clean
  38. CLEANDIR= ${COPYDIR} lisp/term
  39.  
  40. all:    ${SUBDIR}
  41.  
  42. src:    etc
  43.  
  44. .RECURSIVE: ${SUBDIR}
  45.  
  46. ${SUBDIR}: FRC
  47.     cd $@; ${MAKE} ${MFLAGS} all
  48.  
  49. install: all mkdir lockdir
  50. # B option to tar xf removed because some systems don't have it.
  51. # It should work without that as long as the same tar program
  52. # is running on both sides of the pipe.
  53.     -if [ "`/bin/pwd`" != "`(cd ${LIBDIR} && /bin/pwd)`" ] ; then \
  54.         tar cf - ${COPYDIR} | (cd ${LIBDIR}; umask 0; tar xf - ) ;\
  55.         for i in ${CLEANDIR}; do \
  56.             (rm -rf ${LIBDIR}/$$i/RCS; \
  57.              rm -f ${LIBDIR}/$$i/\#*; \
  58.              rm -f ${LIBDIR}/$$i/*~); \
  59.         done \
  60.     else true; \
  61.     fi
  62.     $(INSTALL) -c -s etc/emacsclient ${BINDIR}/emacsclient
  63.     $(INSTALL) -c -s etc/etags ${BINDIR}/etags
  64.     $(INSTALL) -c -s etc/ctags ${BINDIR}/ctags
  65.     $(INSTALL) -c -s -m 1755 src/xemacs ${BINDIR}/xemacs
  66.     $(INSTALL) -c -m 444 etc/emacs.1 ${MANDIR}/emacs.1
  67.     -rm -f ${BINDIR}/emacs
  68.     mv ${BINDIR}/xemacs ${BINDIR}/emacs
  69.  
  70. install.sysv: all mkdir lockdir
  71.     -if [ "`/bin/pwd`" != "`(cd ${LIBDIR} && /bin/pwd)`" ] ; then \
  72.         find ${COPYDIR} -print | cpio -pdum ${LIBDIR} ;\
  73.         for i in ${CLEANDIR}; do \
  74.             (rm -rf ${LIBDIR}/$$i/RCS; \
  75.              rm -f ${LIBDIR}/$$i/\#*; \
  76.              rm -f ${LIBDIR}/$$i/*~); \
  77.         done \
  78.     else true; \
  79.     fi
  80.     -cpset etc/emacsclient ${BINDIR}/emacsclient 755 bin bin
  81.     -cpset etc/etags ${BINDIR}/etags 755 bin bin
  82.     -cpset etc/ctags ${BINDIR}/ctags 755 bin bin
  83.     -cpset etc/emacs.1 ${MANDIR}/emacs.1 444 bin bin
  84.     -/bin/rm -f ${BINDIR}/emacs
  85.     -cpset src/xemacs ${BINDIR}/emacs 1755 bin bin
  86.   
  87. install.xenix: all mkdir lockdir
  88.     if [ "`pwd`" != "`(cd ${LIBDIR} && pwd)`" ] ; then \
  89.         tar cf - ${COPYDIR} | (cd ${LIBDIR}; umask 0; tar xpf - ) ;\
  90.         for i in ${CLEANDIR}; do \
  91.             (rm -rf ${LIBDIR}/$$i/RCS; \
  92.              rm -f ${LIBDIR}/$$i/\#*; \
  93.              rm -f ${LIBDIR}/$$i/*~); \
  94.         done \
  95.     else true; \
  96.     fi
  97.     cp etc/etags etc/ctags etc/emacsclient ${BINDIR}
  98.     chmod 755 ${BINDIR}/etags ${BINDIR}/ctags ${BINDIR}/emacsclient
  99.     cp etc/emacs.1 ${MANDIR}/emacs.1
  100.     chmod 444 ${MANDIR}/emacs.1
  101.     -mv -f ${BINDIR}/emacs ${BINDIR}/emacs.old
  102.     cp src/xemacs ${BINDIR}/emacs
  103.     chmod 1755 ${BINDIR}/emacs
  104.     -rm -f ${BINDIR}/emacs.old
  105.  
  106. install.aix: all mkdir lockdir
  107.     -if [ "`/bin/pwd`" != "`(cd ${LIBDIR} && /bin/pwd)`" ] ; then \
  108.                 tar cf - ${COPYDIR} | (cd ${LIBDIR}; umask 0; tar xBf - ) ;\
  109.                 for i in ${CLEANDIR}; do \
  110.                         (rm -rf ${LIBDIR}/$$i/RCS; \
  111.                          rm -f ${LIBDIR}/$$i/\#*; \
  112.                          rm -f ${LIBDIR}/$$i/*~); \
  113.                 done \
  114.         else true; \
  115.         fi
  116.     $(INSTALL) -c etc/emacsclient ${BINDIR}/emacsclient
  117.     $(INSTALL) -c etc/etags ${BINDIR}/etags
  118.     $(INSTALL) -c etc/ctags ${BINDIR}/ctags
  119.     $(INSTALL) -c -m 1755 src/xemacs ${BINDIR}/xemacs
  120.     $(INSTALL) -c -m 444 etc/emacs.1 ${MANDIR}/emacs.1
  121.     -rm -f ${BINDIR}/emacs
  122.     mv ${BINDIR}/xemacs ${BINDIR}/emacs
  123.  
  124. mkdir: FRC
  125.     -mkdir ${LIBDIR} ${BINDIR} ${MANDIR}
  126.  
  127. distclean:
  128.     for i in ${SUBDIR}; do (cd $$i && ${MAKE} ${MFLAGS} distclean); done
  129.  
  130. clean:
  131.     cd src; ${MAKE} clean
  132.     if [ "`/bin/pwd`" != "`(cd ${LIBDIR} && /bin/pwd)`" ] ; then \
  133.         cd etc; ${MAKE} clean; \
  134.     else true; \
  135.     fi
  136.  
  137. lockdir:
  138.     -mkdir ${LIBDIR}/lock
  139.     -chmod 777 ${LIBDIR}/lock
  140.  
  141. FRC:
  142.  
  143. tags:    etc
  144.     cd src; ../etc/etags *.[ch] ../lisp/*.el ../lisp/term/*.el
  145.