@@ -1,37 +1,6 @@
# SPDX-License-Identifier: copyleft-next-0.3.1
-# How we create the partition for the workflow data partition
-WORKFLOW_DATA_DEVICE:=$(subst ",,$(CONFIG_WORKFLOW_DATA_DEVICE))
-WORKFLOW_DATA_PATH:=$(subst ",,$(CONFIG_WORKFLOW_DATA_PATH))
-WORKFLOW_DATA_FSTYPE:=$(subst ",,$(CONFIG_WORKFLOW_DATA_FSTYPE))
-WORKFLOW_DATA_LABEL:=$(subst ",,$(CONFIG_WORKFLOW_DATA_LABEL))
-
-WORKFLOW_KDEVOPS_GIT:=$(subst ",,$(CONFIG_WORKFLOW_KDEVOPS_GIT))
-WORKFLOW_KDEVOPS_GIT_DATA:=$(subst ",,$(CONFIG_WORKFLOW_KDEVOPS_GIT_DATA))
-WORKFLOW_KDEVOPS_DIR:=$(subst ",,$(CONFIG_WORKFLOW_KDEVOPS_DIR))
-
-WORKFLOW_ARGS += data_device=$(WORKFLOW_DATA_DEVICE)
-WORKFLOW_ARGS += data_path=$(WORKFLOW_DATA_PATH)
-WORKFLOW_ARGS += data_fstype=$(WORKFLOW_DATA_FSTYPE)
-WORKFLOW_ARGS += data_label=$(WORKFLOW_DATA_LABEL)
-WORKFLOW_ARGS += kdevops_git=$(WORKFLOW_KDEVOPS_GIT)
-WORKFLOW_ARGS += kdevops_data=\"$(WORKFLOW_KDEVOPS_GIT_DATA)\"
-WORKFLOW_ARGS += kdevops_dir=\"$(WORKFLOW_KDEVOPS_DIR)\"
-
-ifeq (y,$(CONFIG_WORKFLOW_MAKE_CMD_OVERRIDE))
-WORKFLOW_MAKE_CMD:=$(subst ",,$(CONFIG_WORKFLOW_MAKE_CMD))
-endif
-
-ifeq (y,$(CONFIG_WORKFLOW_INFER_USER_AND_GROUP))
-WORKFLOW_ARGS += infer_uid_and_group=True
-else
-WORKFLOW_DATA_USER:=$(subst ",,$(CONFIG_WORKFLOW_DATA_USER))
-WORKFLOW_DATA_GROUP:=$(subst ",,$(CONFIG_WORKFLOW_DATA_GROUP))
-
-WORKFLOW_ARGS += data_user=$(WORKFLOW_DATA_USER)
-WORKFLOW_ARGS += data_group=$(WORKFLOW_DATA_GROUP)
-
-endif # CONFIG_WORKFLOW_MAKE_CMD_OVERRIDE == y
+include workflows/common/Makefile
BOOTLINUX_ARGS :=
ifeq (y,$(CONFIG_BOOTLINUX))
new file mode 100644
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: copyleft-next-0.3.1
+
+# How we create the partition for the workflow data partition
+WORKFLOW_DATA_DEVICE:=$(subst ",,$(CONFIG_WORKFLOW_DATA_DEVICE))
+WORKFLOW_DATA_PATH:=$(subst ",,$(CONFIG_WORKFLOW_DATA_PATH))
+WORKFLOW_DATA_FSTYPE:=$(subst ",,$(CONFIG_WORKFLOW_DATA_FSTYPE))
+WORKFLOW_DATA_LABEL:=$(subst ",,$(CONFIG_WORKFLOW_DATA_LABEL))
+
+WORKFLOW_KDEVOPS_GIT:=$(subst ",,$(CONFIG_WORKFLOW_KDEVOPS_GIT))
+WORKFLOW_KDEVOPS_GIT_DATA:=$(subst ",,$(CONFIG_WORKFLOW_KDEVOPS_GIT_DATA))
+WORKFLOW_KDEVOPS_DIR:=$(subst ",,$(CONFIG_WORKFLOW_KDEVOPS_DIR))
+
+WORKFLOW_ARGS += data_device=$(WORKFLOW_DATA_DEVICE)
+WORKFLOW_ARGS += data_path=$(WORKFLOW_DATA_PATH)
+WORKFLOW_ARGS += data_fstype=$(WORKFLOW_DATA_FSTYPE)
+WORKFLOW_ARGS += data_label=$(WORKFLOW_DATA_LABEL)
+WORKFLOW_ARGS += kdevops_git=$(WORKFLOW_KDEVOPS_GIT)
+WORKFLOW_ARGS += kdevops_data=\"$(WORKFLOW_KDEVOPS_GIT_DATA)\"
+WORKFLOW_ARGS += kdevops_dir=\"$(WORKFLOW_KDEVOPS_DIR)\"
+
+ifeq (y,$(CONFIG_WORKFLOW_MAKE_CMD_OVERRIDE))
+WORKFLOW_MAKE_CMD:=$(subst ",,$(CONFIG_WORKFLOW_MAKE_CMD))
+endif
+
+ifeq (y,$(CONFIG_WORKFLOW_INFER_USER_AND_GROUP))
+WORKFLOW_ARGS += infer_uid_and_group=True
+else
+WORKFLOW_DATA_USER:=$(subst ",,$(CONFIG_WORKFLOW_DATA_USER))
+WORKFLOW_DATA_GROUP:=$(subst ",,$(CONFIG_WORKFLOW_DATA_GROUP))
+
+WORKFLOW_ARGS += data_user=$(WORKFLOW_DATA_USER)
+WORKFLOW_ARGS += data_group=$(WORKFLOW_DATA_GROUP)
+
+endif # CONFIG_WORKFLOW_INFER_USER_AND_GROUP == y
There are shared kdevops variables between different workflows, which *can* be used by any workflow. Move these into a generic kdevops helper Makefile, as we can later expand on this. This makes no functional changes. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- workflows/Makefile | 33 +-------------------------------- workflows/common/Makefile | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 32 deletions(-) create mode 100644 workflows/common/Makefile