summaryrefslogtreecommitdiff
path: root/build-aux/Makefile.once.head/10-write-atomic.mk
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/Makefile.once.head/10-write-atomic.mk')
-rw-r--r--build-aux/Makefile.once.head/10-write-atomic.mk18
1 files changed, 18 insertions, 0 deletions
diff --git a/build-aux/Makefile.once.head/10-write-atomic.mk b/build-aux/Makefile.once.head/10-write-atomic.mk
index f099ae2..ce6acd8 100644
--- a/build-aux/Makefile.once.head/10-write-atomic.mk
+++ b/build-aux/Makefile.once.head/10-write-atomic.mk
@@ -1,4 +1,22 @@
mod.write-atomic.description = `write-atomic` auxiliary build script
mod.write-atomic.files += $(topsrcdir)/build-aux/write-atomic
+define mod.write-atomic.doc
+# User variables:
+# - `WRITE_ATOMIC ?= $(topsrcdir)/build-aux/write-atomic`
+# Inputs:
+# (none)
+# Outputs:
+# (none)
+#
+# The $(WRITE_ATOMIC) program reads a file from stdin, and writes it to
+# the file named in argv[1], but does so atomically.
+#
+# That is, the following lines are almost equivalient:
+#
+# ... > $@
+# ... | $(WRITE_ATOMIC) $@
+#
+# The are only different in that one is atomic, while the other is not.
+endef
WRITE_ATOMIC ?= $(topsrcdir)/build-aux/write-atomic