make/common/MakeBase.gmk
changeset 48078 94a38ebbc9bb
parent 47751 f7e430cbfe34
child 48912 01237b276b8b
child 49024 953b3fd36b08
--- a/make/common/MakeBase.gmk	Wed Dec 06 02:09:08 2017 -0800
+++ b/make/common/MakeBase.gmk	Wed Dec 06 13:45:46 2017 +0100
@@ -912,6 +912,17 @@
       $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
 endif
 
+# Param 1 - Text to write
+# Param 2 - File to write to
+ifeq ($(HAS_FILE_FUNCTION), true)
+  AppendFile = \
+      $(file >>$2,$(strip $1))
+else
+  # Use printf to get consistent behavior on all platforms.
+  AppendFile = \
+      $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
+endif
+
 ################################################################################
 # DependOnVariable
 #