mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/include: Rework Makefile
Rework "xen-xsm" rules to not have to change directory to run mkflask.sh, and store mkflask.sh path in a var, and use a full path for FLASK_H_DEPEND, and output directory is made relative. Rename "all-y" target to a more descriptive "xen/lib/x86/all". Removed the "dist" target which was the only one existing in tools/. 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
13c05b9efa
commit
6aabee32b5
1 file changed
+15
-13
+15
-13
@@ -7,17 +7,20 @@ include $(XEN_ROOT)/tools/Rules.mk
|
||||
# taken into account, i.e. there should be no rules added here for generating
|
||||
# any tools/include/*.h files.
|
||||
|
||||
# Relative to $(XEN_ROOT)/xen/xsm/flask
|
||||
FLASK_H_DEPEND := policy/initial_sids
|
||||
.PHONY: all
|
||||
all: xen-foreign xen-dir xen-xsm/.dir
|
||||
ifeq ($(CONFIG_X86),y)
|
||||
all: xen/lib/x86/all
|
||||
endif
|
||||
|
||||
.PHONY: all all-y build xen-dir
|
||||
all build: all-y xen-foreign xen-dir xen-xsm/.dir
|
||||
all-y:
|
||||
.PHONY: build
|
||||
build: all
|
||||
|
||||
.PHONY: xen-foreign
|
||||
xen-foreign:
|
||||
$(MAKE) -C xen-foreign
|
||||
|
||||
.PHONY: xen-dir
|
||||
xen-dir:
|
||||
mkdir -p xen/libelf acpi
|
||||
find xen/ acpi/ -type l -exec rm '{}' +
|
||||
@@ -36,16 +39,18 @@ ifeq ($(CONFIG_X86),y)
|
||||
ln -s $(XEN_ROOT)/xen/include/xen/lib/x86/Makefile xen/lib/x86/
|
||||
endif
|
||||
|
||||
all-$(CONFIG_X86): xen-dir
|
||||
.PHONY: xen/lib/x86/all
|
||||
xen/lib/x86/all: xen-dir
|
||||
$(MAKE) -C xen/lib/x86 all XEN_ROOT=$(XEN_ROOT) PYTHON=$(PYTHON)
|
||||
|
||||
MKFLASK := $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh
|
||||
FLASK_H_DEPEND := $(XEN_ROOT)/xen/xsm/flask/policy/initial_sids
|
||||
|
||||
# Not xen/xsm as that clashes with link to
|
||||
# $(XEN_ROOT)/xen/include/public/xsm above.
|
||||
xen-xsm/.dir: $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh \
|
||||
$(patsubst %,$(XEN_ROOT)/xen/xsm/flask/%,$(FLASK_H_DEPEND))
|
||||
xen-xsm/.dir: $(MKFLASK) $(FLASK_H_DEPEND)
|
||||
mkdir -p xen-xsm/flask
|
||||
cd $(XEN_ROOT)/xen/xsm/flask/ && \
|
||||
$(SHELL) policy/mkflask.sh $(AWK) $(CURDIR)/xen-xsm/flask $(FLASK_H_DEPEND)
|
||||
$(SHELL) $(MKFLASK) $(AWK) xen-xsm/flask $(FLASK_H_DEPEND)
|
||||
touch $@
|
||||
|
||||
.PHONY: install
|
||||
@@ -84,8 +89,5 @@ clean:
|
||||
$(MAKE) -C xen-foreign clean
|
||||
rm -f _*.h
|
||||
|
||||
.PHONY: dist
|
||||
dist: install
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||