home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / emacs / Makefile.orig < prev    next >
Makefile  |  1992-12-09  |  4KB  |  151 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.  
  15. # Where to install things
  16. # Note that on system V you must change MANDIR to /use/local/man/man1.
  17. # This got changed in late 1991 to say /usr/local/lib/emacs,
  18. # but there was no explanation of why, so it seems better to keep this stable.
  19. LIBDIR= /usr/local/emacs
  20. BINDIR= /usr/local/bin
  21. MANDIR= /usr/local/man/man1
  22.  
  23. # Flags passed down to subdirectory makefiles.
  24. MFLAGS=
  25.  
  26. # Command used for installation.
  27. # If `install' doesn't work on your system, try `./install.sh'.
  28. INSTALL=install
  29.  
  30. # Subdirectories to make recursively.  `lisp' is not included
  31. # because the compiled lisp files are part of the distribution
  32. # and you cannot remake them without installing Emacs first.
  33. SUBDIR= etc src
  34.  
  35. # Subdirectories to install
  36. COPYDIR= etc info lisp
  37.  
  38. # Subdirectories to clean
  39. CLEANDIR= ${COPYDIR} lisp/term oldXMenu
  40.  
  41. all:    src/paths.h ${SUBDIR}
  42.  
  43. src/paths.h: src/paths.h-dist
  44.     sed 's;/usr/local/emacs;${LIBDIR};g' < src/paths.h-dist > src/paths.h
  45.  
  46. src:    etc
  47.  
  48. .RECURSIVE: ${SUBDIR}
  49.  
  50. ${SUBDIR}: FRC
  51.     cd $@; make ${MFLAGS} all
  52.  
  53. install: all mkdir lockdir
  54. # B option to tar xf removed because some systems don't have it.
  55. # It should work without that as long as the same tar program
  56. # is running on both sides of the pipe.
  57.     -if [ `/bin/pwd` != `(cd ${LIBDIR}; /bin/pwd)` ] ; then \
  58.         tar cf - ${COPYDIR} | (cd ${LIBDIR}; umask 0; tar xf - ) ;\
  59.         for i in ${CLEANDIR}; do \
  60.             (rm -rf ${LIBDIR}/$$i/RCS; \
  61.              rm -f ${LIBDIR}/$$i/\#*; \
  62.              rm -f ${LIBDIR}/$$i/*~); \
  63.         done \
  64.     else true; \
  65.     fi
  66.     $(INSTALL) -c etc/emacsclient ${BINDIR}/emacsclient
  67.     $(INSTALL) -c etc/etags ${BINDIR}/etags
  68.     $(INSTALL) -c etc/ctags ${BINDIR}/ctags
  69.     $(INSTALL) -c -m 1755 src/xemacs ${BINDIR}/xemacs
  70.     $(INSTALL) -c -m 444 etc/emacs.1 ${MANDIR}/emacs.1
  71.     -rm -f ${BINDIR}/emacs
  72.     mv ${BINDIR}/xemacs ${BINDIR}/emacs
  73.  
  74. install.sysv: all mkdir lockdir
  75.     -if [ `/bin/pwd` != `(cd ${LIBDIR}; /bin/pwd)` ] ; then \
  76.         find ${COPYDIR} -print | cpio -pdum ${LIBDIR} ;\
  77.         for i in ${CLEANDIR}; do \
  78.             (rm -rf ${LIBDIR}/$$i/RCS; \
  79.              rm -f ${LIBDIR}/$$i/\#*; \
  80.              rm -f ${LIBDIR}/$$i/*~); \
  81.         done \
  82.     else true; \
  83.     fi
  84.     -cpset etc/emacsclient ${BINDIR}/emacsclient 755 bin bin
  85.     -cpset etc/etags ${BINDIR}/etags 755 bin bin
  86.     -cpset etc/ctags ${BINDIR}/ctags 755 bin bin
  87.     -cpset etc/emacs.1 ${MANDIR}/emacs.1 444 bin bin
  88.     -/bin/rm -f ${BINDIR}/emacs
  89.     -cpset src/xemacs ${BINDIR}/emacs 1755 bin bin
  90.  
  91. install.xenix: all mkdir lockdir
  92.     if [ `pwd` != `(cd ${LIBDIR}; pwd)` ] ; then \
  93.         tar cf - ${COPYDIR} | (cd ${LIBDIR}; umask 0; tar xpf - ) ;\
  94.         for i in ${CLEANDIR}; do \
  95.             (rm -rf ${LIBDIR}/$$i/RCS; \
  96.              rm -f ${LIBDIR}/$$i/\#*; \
  97.              rm -f ${LIBDIR}/$$i/*~); \
  98.         done \
  99.     else true; \
  100.     fi
  101.     cp etc/etags etc/ctags etc/emacsclient ${BINDIR}
  102.     chmod 755 ${BINDIR}/etags ${BINDIR}/ctags ${BINDIR}/emacsclient
  103.     cp etc/emacs.1 ${MANDIR}/emacs.1
  104.     chmod 444 ${MANDIR}/emacs.1
  105.     -mv -f ${BINDIR}/emacs ${BINDIR}/emacs.old
  106.     cp src/xemacs ${BINDIR}/emacs
  107.     chmod 1755 ${BINDIR}/emacs
  108.     -rm -f ${BINDIR}/emacs.old
  109.  
  110. install.aix: all mkdir lockdir
  111.     -if [ `/bin/pwd` != `(cd ${LIBDIR}; /bin/pwd)` ] ; then \
  112.         tar cf - ${COPYDIR} | (cd ${LIBDIR}; umask 0; tar xBf - ) ;\
  113.         for i in ${CLEANDIR}; do \
  114.             (rm -rf ${LIBDIR}/$$i/RCS; \
  115.              rm -f ${LIBDIR}/$$i/\#*; \
  116.              rm -f ${LIBDIR}/$$i/*~); \
  117.         done \
  118.     else true; \
  119.     fi
  120.     install -f ${BINDIR} etc/emacsclient
  121.     install -f ${BINDIR} etc/etags
  122.     install -f ${BINDIR} etc/ctags
  123.     install -M 1755 -f ${BINDIR} src/xemacs
  124.     install -M 444 -f ${MANDIR} etc/emacs.1
  125.     -rm -f ${BINDIR}/emacs
  126.     mv ${BINDIR}/xemacs ${BINDIR}/emacs
  127.  
  128. mkdir: FRC
  129.     -mkdir ${LIBDIR} ${BINDIR} ${MANDIR}
  130.  
  131. distclean:
  132.     for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done
  133.     cd oldXMenu; make ${MFLAGS} distclean
  134.  
  135. clean:
  136.     cd src; make clean
  137.     cd oldXMenu; make ${MFLAGS} clean
  138.     if [ `/bin/pwd` != `(cd ${LIBDIR}; /bin/pwd)` ] ; then \
  139.         cd etc; make clean; \
  140.     else true; \
  141.     fi
  142.  
  143. lockdir:
  144.     -mkdir ${LIBDIR}/lock
  145.     -chmod 777 ${LIBDIR}/lock
  146.  
  147. FRC:
  148.  
  149. tags:    etc
  150.     cd src; ../etc/etags *.[ch] ../lisp/*.el ../lisp/term/*.el
  151.