mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libs/light: Rework generation of include/_libxl_*.h
Instead of moving the public "_libxl_*.h" headers, we make a copy to the destination so that make doesn't try to remake the targets "_libxl_*.h" in libs/light/ again. A new .PRECIOUS target is added to tell make to not deletes the intermediate targets generated by "gentypes.py". Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Release-acked-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
1 parent
9eb46d3f98
commit
68d19cfb90
1 file changed
+6
-2
@@ -215,6 +215,8 @@ libxl_internal_json.h: _libxl_types_internal_json.h
|
||||
$(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): $(XEN_INCLUDE)/libxl.h
|
||||
$(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h
|
||||
|
||||
# This exploits the 'multi-target pattern rule' trick.
|
||||
# gentypes.py should be executed only once to make all the targets.
|
||||
_libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py
|
||||
$(eval stem = $(notdir $*))
|
||||
$(PYTHON) gentypes.py libxl_type$(stem).idl __libxl_type$(stem).h __libxl_type$(stem)_private.h \
|
||||
@@ -224,8 +226,10 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_
|
||||
$(call move-if-changed,__libxl_type$(stem)_json.h,_libxl_type$(stem)_json.h)
|
||||
$(call move-if-changed,__libxl_type$(stem).c,_libxl_type$(stem).c)
|
||||
|
||||
$(XEN_INCLUDE)/_%.h: _%.h
|
||||
$(call move-if-changed,_$*.h,$(XEN_INCLUDE)/_$*.h)
|
||||
.PRECIOUS: _libxl_type%.h _libxl_type%.c
|
||||
|
||||
$(XEN_INCLUDE)/_libxl_%.h: _libxl_%.h
|
||||
cp -f $< $@
|
||||
|
||||
.PHONY: acpi
|
||||
acpi:
|
||||
|
||||