[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XEN PATCH] build: fix building flask headers before descending in flask/ss/
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Fri, 20 Jan 2023 13:36:26 +0000
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 20 Jan 2023 13:37:13 +0000
- Ironport-data: A9a23:/enUAaNMs/M6mtTvrR3cl8FynXyQoLVcMsEvi/4bfWQNrUongTJRz GAaW2CAb/3eZGb2eN5wOtyw8BsD7JLVytJgTQto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQA+KmU4YoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9Suv3rRC9H5qyo42tB5ARmP5ingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0sh3X1NFr tYGEXMuZzrTmuCp66/ja9A506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLo3mvuogX/uNSVVsluPqYI84nTJzRw327/oWDbQUo3RGJgJxxnBz o7A10bBOhsqFdDP8D2m4mu+pcHX3iikBbtHQdVU8dY12QbOlwT/EiY+RVa95PW0lEO6c9ZeM FAPvDojq7Ao806mRcW7WAe3yFaIpgUZWsZQO+Qi5RuR17HP5AKEGmkDSCUHY9sj3PLaXhRzi AXPxYmwQ2Uy7vvMEyn1GqqoQS2aFyhLH2R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WwGoo+FmbEyE8fbU/ G8NNZ9GPn4N1bjHo5PwknXR4RSE38DS8cY0+xLAW5mmvi7drECi9arKMo7ZYCdSArMY1mPRE friQKDf/mp7SiQKwvFaVbqKj6dJXAWO/pLYefnFqMoufkw37Z3w30oYY7Q3LDLFdRziN15QK I3GsKWrkqanxj0wY+a1RQqBvKqZnwlqYkJpBtx1Hk32gXPAOg+Uv2kCBJv9WrCPBN5UsXQCR VSo1Rs9cuMXtyt+Rw=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't
work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk.
So, make is allow to try to build objects in "xsm/flask/ss/" before
generating the headers.
Adding a prerequisite on "$(obj)/ss" instead will fix the issue has
that the target used to run make in this subdirectory.
Unfortunatly, that target is also used when running `make clean`, so
we need to ignore it in this case. $(MAKECMDGOALS) can't be used in
this case as it is empty, but we can guess which operation is done by
looking at the list of loaded makefiles.
Fixes: 7a3bcd2babcc ("build: build everything from the root dir, use
obj=$subdir")
Reported-by: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
xen/xsm/flask/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
index d25312f4fa..2d24346ee3 100644
--- a/xen/xsm/flask/Makefile
+++ b/xen/xsm/flask/Makefile
@@ -16,7 +16,11 @@ FLASK_H_FILES := flask.h class_to_string.h
initial_sid_to_string.h
AV_H_FILES := av_perm_to_string.h av_permissions.h
ALL_H_FILES := $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES))
-$(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix
$(obj)/,$(ALL_H_FILES))
+# Adding prerequisite to descending into ss/ folder only when not running `make
+# clean`.
+ifeq ($(filter %/Makefile.clean,$(MAKEFILE_LIST)),)
+$(addprefix $(obj)/,$(obj-y)) $(obj)/ss: $(addprefix $(obj)/,$(ALL_H_FILES))
+endif
extra-y += $(ALL_H_FILES)
mkflask := $(srcdir)/policy/mkflask.sh
--
Anthony PERARD
|