@@ -4,27 +4,68 @@ EXTENSIONS := bigreq composite damage dbe dpms dri2 dri3 ge glx present randr \
44record render res screensaver shape shm sync xc_misc xevie xf86dri \
55xf86vidmode xfixes xinerama xinput xkb xprint xselinux xtest xvmc xv
66
7- EXT_LIBS = $(addprefix xcb-,$(addsuffix .el,$(EXTENSIONS ) ) )
8- LIBS = xcb-xproto.el $(EXT_LIBS )
7+ ELXS = $(addprefix xcb-,$(addsuffix .el,$(EXTENSIONS ) ) )
8+ ELGS = xcb-xproto.el $(ELXS )
9+ ELLS = xcb-cursor.el xcb-debug.el xcb-ewmh.el xcb-icccm.el xcb-keysyms.el \
10+ xcb-renderutil.el xcb-systemtray.el xcb-types.el xcb-xembed.el xcb-xim.el \
11+ xcb-xlib.el xcb-xsettings.el xcb.el xelb.el
12+ ELS = $(ELLS ) $(ELGS )
13+ ELCS = $(ELS:.el=.elc ) xelb-gen.elc
914
10- all : clean $(LIBS )
15+ .PHONY : all
16+ all : $(ELCS )
1117
1218xcb-% .el : $(PROTO_PATH ) /% .xml
1319 @echo -n " \n" Generating $@ ...
1420 @./xelb-gen $< > $@
1521
16- $( EXT_LIBS ) : xcb-xproto.el
17-
22+ # Dependencies needed for generating.
23+ $( ELXS ) : xcb-xproto.el
1824xcb-composite.el : xcb-xfixes.el
25+ xcb-cursor.el : xcb-render.el
1926xcb-damage.el : xcb-xfixes.el
2027xcb-present.el : xcb-randr.el xcb-xfixes.el xcb-sync.el
2128xcb-randr.el : xcb-render.el
2229xcb-xfixes.el : xcb-render.el xcb-shape.el
2330xcb-xinput.el : xcb-xfixes.el
24- xcb-xvmc.el : xcb-xv.el
2531xcb-xv.el : xcb-shm.el
32+ xcb-xvmc.el : xcb-xv.el
2633
27- .PHONY : clean
34+ # Generate an intermediate .el file from the xelb-gen script so that
35+ # byte-compiling rules below apply. This file will be deleted after the .elc is
36+ # created.
37+ .INTERMEDIATE : xelb-gen.el
38+ xelb-gen.el : xelb-gen
39+ cp $< $@
2840
41+ # Dependencies needed for byte-compiling.
42+ xcb-cursor.elc : xcb-render.elc xcb.elc
43+ xcb-ewmh.elc : xcb.elc xcb-icccm.elc xcb.elc
44+ xcb-icccm.elc : xcb.elc
45+ xcb-keysyms.elc : xcb.elc xcb-xkb.elc
46+ xcb-renderutil.elc : xcb.elc xcb-render.elc
47+ xcb-systemtray.elc : xcb-ewmh.elc xcb.elc
48+ xcb-types.elc : xcb-debug.elc
49+ xcb-xembed.elc : xcb-icccm.elc
50+ xcb-xim.elc : xcb-types.elc xcb-xlib.elc
51+ xcb-xsettings.elc : xcb-icccm.elc xcb-types.elc
52+ xcb.elc : xcb-xproto.elc xcb-xkb.elc
53+ xelb.elc : xcb.elc
54+ $(ELXS:.el =.elc): xcb-xproto.elc xcb-types.elc
55+ xcb-composite.elc : xcb-xfixes.elc
56+ xcb-damage.elc : xcb-xfixes.elc
57+ xcb-present.elc : xcb-randr.elc xcb-xfixes.elc xcb-sync.elc
58+ xcb-randr.elc : xcb-render.elc
59+ xcb-xfixes.elc : xcb-render.elc xcb-shape.elc
60+ xcb-xinput.elc : xcb-xfixes.elc
61+ xcb-xv.elc : xcb-shm.elc
62+ xcb-xvmc.elc : xcb-xv.elc
63+ xelb-gen.elc : xcb-types.elc
64+
65+ % .elc : % .el
66+ @printf " Compiling $<\n"
67+ emacs --batch -Q -L . -f batch-byte-compile $<
68+
69+ .PHONY : clean
2970clean :
30- @rm -vf $(LIBS )
71+ @rm -vf $(ELGS ) $( ELCS )
0 commit comments