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