@@ -4,27 +4,68 @@ EXTENSIONS := bigreq composite damage dbe dpms dri2 dri3 ge glx present randr \
4
4
record render res screensaver shape shm sync xc_misc xevie xf86dri \
5
5
xf86vidmode xfixes xinerama xinput xkb xprint xselinux xtest xvmc xv
6
6
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
9
14
10
- all : clean $(LIBS )
15
+ .PHONY : all
16
+ all : $(ELCS )
11
17
12
18
xcb-% .el : $(PROTO_PATH ) /% .xml
13
19
@echo -n " \n" Generating $@ ...
14
20
@./xelb-gen $< > $@
15
21
16
- $( EXT_LIBS ) : xcb-xproto.el
17
-
22
+ # Dependencies needed for generating.
23
+ $( ELXS ) : xcb-xproto.el
18
24
xcb-composite.el : xcb-xfixes.el
25
+ xcb-cursor.el : xcb-render.el
19
26
xcb-damage.el : xcb-xfixes.el
20
27
xcb-present.el : xcb-randr.el xcb-xfixes.el xcb-sync.el
21
28
xcb-randr.el : xcb-render.el
22
29
xcb-xfixes.el : xcb-render.el xcb-shape.el
23
30
xcb-xinput.el : xcb-xfixes.el
24
- xcb-xvmc.el : xcb-xv.el
25
31
xcb-xv.el : xcb-shm.el
32
+ xcb-xvmc.el : xcb-xv.el
26
33
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 $< $@
28
40
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
29
70
clean :
30
- @rm -vf $(LIBS )
71
+ @rm -vf $(ELGS ) $( ELCS )
0 commit comments