commit bc9e6fe
Michael Forney
·
2013-11-24 06:53:14 +0000 UTC
parent 335822a
Fix dependencies on generated files
2 files changed,
+5,
-5
+2,
-1
1@@ -65,7 +65,8 @@ SWC_STATIC_OBJECTS = $(SWC_SOURCES:%.c=%.o)
2 SWC_SHARED_OBJECTS = $(SWC_SOURCES:%.c=%.lo)
3
4 # Explicitly state dependencies on generated files
5-$(dir)/drm.c $(dir)/drm_buffer.c: protocol/wayland-drm-server-protocol.h
6+objects = $(foreach obj,$(1),$(dir)/$(obj).o $(dir)/$(obj.lo))
7+$(call objects,drm drm_buffer): protocol/wayland-drm-server-protocol.h
8
9 $(dir)/libswc.a: $(SWC_STATIC_OBJECTS)
10 $(call quiet,AR) cru $@ $^
+3,
-4
1@@ -5,15 +5,14 @@ dir := protocol
2 PROTOCOL_EXTENSIONS = \
3 $(dir)/wayland-drm.xml
4
5+$(dir)_TARGETS := $(PROTOCOL_EXTENSIONS:%.xml=%-protocol.c) \
6+ $(PROTOCOL_EXTENSIONS:%.xml=%-server-protocol.h)
7+
8 $(dir)/%-protocol.c: $(dir)/%.xml
9 $(call quiet,GEN,$(WAYLAND_SCANNER)) code < $< > $@
10
11 $(dir)/%-server-protocol.h: $(dir)/%.xml
12 $(call quiet,GEN,$(WAYLAND_SCANNER)) server-header < $< > $@
13
14-CLEAN_FILES += \
15- $(PROTOCOL_EXTENSIONS:%.xml=%-protocol.c) \
16- $(PROTOCOL_EXTENSIONS:%.xml=%-server-protocol.h)
17-
18 include Makefile.common
19