[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH v6 17/31] build: convert binfile use to if_changed



This will allow to detect command line changes and allow to regenerate
the file in that case.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 xen/common/Makefile    | 8 ++++++--
 xen/xsm/flask/Makefile | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/xen/common/Makefile b/xen/common/Makefile
index 54de70d42278..93df3178b71f 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -80,8 +80,12 @@ config.gz: $(CONF_FILE)
 
 config_data.o: config.gz
 
-config_data.S: $(BASEDIR)/tools/binfile
-       $(SHELL) $(BASEDIR)/tools/binfile $@ config.gz xen_config_data
+quiet_cmd_binfile = BINFILE $@
+cmd_binfile = $(SHELL) $< $@ config.gz xen_config_data
+
+config_data.S: $(BASEDIR)/tools/binfile FORCE
+       $(call if_changed,binfile)
+targets += config_data.S
 
 clean::
        rm -f config_data.S config.gz 2>/dev/null
diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
index 637159ad8276..0ad15cb16606 100644
--- a/xen/xsm/flask/Makefile
+++ b/xen/xsm/flask/Makefile
@@ -35,8 +35,12 @@ $(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) 
$(mkaccess) FORCE
 obj-bin-$(CONFIG_XSM_FLASK_POLICY) += flask-policy.o
 flask-policy.o: policy.bin
 
-flask-policy.S: $(BASEDIR)/tools/binfile
-       $(SHELL) $(BASEDIR)/tools/binfile -i $@ policy.bin xsm_flask_init_policy
+quiet_cmd_binfile = BINFILE $@
+cmd_binfile = $(SHELL) $< -i $@ policy.bin xsm_flask_init_policy
+
+flask-policy.S: $(BASEDIR)/tools/binfile FORCE
+       $(call if_changed,binfile)
+targets += flask-policy.S
 
 FLASK_BUILD_DIR := $(CURDIR)
 POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION)
-- 
Anthony PERARD




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.