From efe1a8beb068c79e4daae2b21f966d9df990e0dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Mon, 28 Jan 2019 12:45:18 +0100
Subject: [PATCH] Manual.md: document working directory for functions

---
 Manual.md | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Manual.md b/Manual.md
index 358cb22a032..cd18c7830c4 100644
--- a/Manual.md
+++ b/Manual.md
@@ -938,6 +938,17 @@ still be passed in if it's a GNU configure script.
 > A function defined in a template has preference over the same function
 defined by a `build_style` script.
 
+Current working directory for functions is set as follows:
+
+- For pre_fetch, pre_extract, do_clean: `<masterdir>`.
+
+- For do_fetch, post_fetch: `XBPS_BUILDDIR`.
+
+- For do_extract, post_extract: `wrksrc`.
+
+- For pre_configure through post_install: `build_wrksrc`
+if it is defined, otherwise `wrksrc`.
+
 <a id="build_options"></a>
 ### Build options