summaryrefslogtreecommitdiffstats
path: root/rules/pre
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2020-03-20 14:05:35 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2020-03-20 16:50:34 +0100
commit7f95c7b6293e0919bb22e406af4997e35d8a3fc3 (patch)
tree766beea59bd7653c94dbddc92857facf43534c8d /rules/pre
parent1e25e4cc10c204b04c451ad53e36de4db52615ba (diff)
downloadptxdist-7f95c7b6293e0919bb22e406af4997e35d8a3fc3.tar.gz
ptxdist-7f95c7b6293e0919bb22e406af4997e35d8a3fc3.tar.xz
add helper macros to add data to the <PKG>_CFGHASH
These macros can be used to add strings or files to the <PKG>_CFGHASH. With this, changes to these strings and files will trigger a rebuild of the package. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/pre')
-rw-r--r--rules/pre/000-cfghash.make21
1 files changed, 21 insertions, 0 deletions
diff --git a/rules/pre/000-cfghash.make b/rules/pre/000-cfghash.make
new file mode 100644
index 000000000..2c5ad66dd
--- /dev/null
+++ b/rules/pre/000-cfghash.make
@@ -0,0 +1,21 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# add an arbitrary string to the <PKG>_CFGHASH source
+# If the string changes, then the package will be rebuilt
+#
+define ptx/cfghash
+$(file >>$(PTXDIST_TEMPDIR)/pkghash-$(strip $(1)),$(strip $(2)))
+endef
+
+define ptx/cfghash-file
+$(file >>$(PTXDIST_TEMPDIR)/pkghash.list,CONFIG: $(strip $(1)) $(strip $(2)))
+endef
+
+# vim: syntax=make