From 3b7bf479568790a8b04772a36c1b3e712fed4579 Mon Sep 17 00:00:00 2001 From: Renato Maia Date: Sun, 27 Apr 2025 17:03:33 -0300 Subject: feat: add build vars. for rockspecs with the dir. of its deps. Rockspecs can access the directory of its dependencies using variables in the format 'foo_ROCKDIR' where 'foo' is the name of a dependency. This is used to be able to access files of the rock like 'conf', 'docs' and more. --- docs/creating_a_rock.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/creating_a_rock.md b/docs/creating_a_rock.md index 1d42b07f..a5441ea4 100644 --- a/docs/creating_a_rock.md +++ b/docs/creating_a_rock.md @@ -148,6 +148,14 @@ and `5.3`, but not yet-to-be-released `5.4`. There are a few other operators for specifying version constraints, see [Rockspec format](rockspec_format.md#dependency-information). +Rockspecs from [`rockspec_format = "3.1"`](rockspec_format.md#package-metadata)), +have access to special variables with the path of the installed rocks of its +dependencies. See the [section below](#including-documentation-and-other-files) +for information on how rocks can include files in their installation. Each +variable is the name of the dependency followed by the suffix `_ROCKDIR`. For +the example above, variable `LUAKNIFE_ROCKDIR` will be provided with the path of +the installed rock. + #### C modules linking to external libraries *If your code does not use third-party libraries, you may skip this subsection.* -- cgit v1.2.3-55-g6feb