Makefile.dst 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ## set this variable to "xemacs" if you use XEmacs
  2. EMACS = emacs
  3. ## You will probably not need to change anything below this line
  4. BYTE = $(EMACS) -batch -q -no-site-file -l dot.el -f batch-byte-compile
  5. .PHONY: all default clean
  6. default:
  7. $(MAKE) info-look.elc gnuplot.elc gnuplot-gui.elc
  8. gnuplot.elc: gnuplot.el
  9. $(BYTE) gnuplot.el
  10. gnuplot-gui.elc: gnuplot-gui.el
  11. $(BYTE) gnuplot-gui.el
  12. ## There are many possibilities for info-look:
  13. ##
  14. ## EMACS version use
  15. ## -----------------------------------------
  16. ## Emacs or XEmacs 19 info-look.20.2.el
  17. ## Emacs 20.2 or less info-look.20.2.el
  18. ## Emacs 20.3 nothing
  19. ## XEmacs 20+ info-look.20.3.el
  20. ##
  21. ## want to use my modified version even if 20.2 is installed because a
  22. ## bug is fixed
  23. ##
  24. ## the first 6 lines attempt to ascertain the version number of
  25. ## $(EMACS), then multiply by 100 to convert it to an integer for the
  26. ## sake of the integer comparisons in the following lines. Is this a
  27. ## hassle, or what?!
  28. ##
  29. MESSAGE = compiling info-look for $(EMACS) $$vnum
  30. info-look.elc: info-look.20.2.el info-look.20.3.el
  31. @if [ $(EMACS) = "emacs" ]; \
  32. then vnum=`emacs --version | grep 'Emacs [12]' | awk '{print $$3}'`; \
  33. else vnum=`xemacs --version | grep 'Emacs [12]' | awk '{print $$2}'`; \
  34. fi; \
  35. vn=`echo "$$vnum" | awk 'BEGIN{FS="."}{print $$1 "." $$2}'`; \
  36. version=`echo "$$vn" | awk '{print 100*$$1}'`; \
  37. if [ $(EMACS) = "emacs" -a $$version -ge 2030 ]; \
  38. then echo "no need to compile info-look for $(EMACS) $$vnum"; \
  39. else echo "$(MESSAGE)"; \
  40. fi; \
  41. if [ $(EMACS) = "emacs" -a $$version -lt 2030 ]; \
  42. then cp -v info-look.20.2.el info-look.el; \
  43. elif [ $(EMACS) = "xemacs" -a $$version -ge 2000 ]; \
  44. then cp -v info-look.20.3.el info-look.el; \
  45. elif [ $(EMACS) = "xemacs" -a $$version -lt 2000 ]; \
  46. then cp -v info-look.20.2.el info-look.el; \
  47. fi ;\
  48. if [ ! \( $(EMACS) = "emacs" -a $$version -ge 2030 \) ]; \
  49. then $(BYTE) info-look.el; fi;
  50. gpelcard.ps: gpelcard.dvi
  51. dvips -o gpelcard.ps gpelcard.dvi
  52. gpelcard.dvi: gpelcard.tex
  53. latex gpelcard.tex
  54. all:
  55. $(MAKE) gnuplot.elc info-look.elc gnuplot-gui.elc gpelcard.ps
  56. clean:
  57. rm -f *.elc info-look.el gpelcard.dvi gpelcard.log gpelcard.aux
  58. ##----------------------------------------------------------------------
  59. ## old stuff:
  60. ## from the `all' and `default' targets:
  61. # gnuplot-toolbar.elc kw-compl.elc
  62. #kw-compl.elc: kw-compl.el
  63. # $(BYTE) kw-compl.el
  64. ## only make this for XEmacs
  65. #gnuplot-toolbar.elc: gnuplot-toolbar.el
  66. # if [ $(EMACS) = "xemacs" ]; then $(BYTE) gnuplot-toolbar.el; fi