git.annexia.org
/
goals.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stdlib: Fix %branch -> %fedora-branch.
[goals.git]
/
docs
/
Goalfile.pod
diff --git
a/docs/Goalfile.pod
b/docs/Goalfile.pod
index
9031780
..
abe9f50
100644
(file)
--- a/
docs/Goalfile.pod
+++ b/
docs/Goalfile.pod
@@
-82,6
+82,22
@@
Concatenate C<list1> and C<list2>. It's not usually necessary to use
this function since goals automatically flattens lists within lists
into simple lists in many cases.
this function since goals automatically flattens lists within lists
into simple lists in many cases.
+=head3 last (list)
+
+For example:
+
+ last (["a", "b", "c"]) β "c"
+
+Returns the last element of a list.
+
+=head3 nth (n, list)
+
+For example:
+
+ nth (1, ["a", "b", "c"]) β "b"
+
+Returns the nβth element of a list (counting from 0).
+
=head3 read (filename)
For example:
=head3 read (filename)
For example:
@@
-116,6
+132,20
@@
For example:
This takes a list of strings and sorts it, removing duplicates.
This takes a list of strings and sorts it, removing duplicates.
+=head3 split (string)
+
+For example:
+
+ split ("-g -O2") β ["-g", "-O2"]
+
+Split a string using shell rules into a list of strings. This is
+commonly used for splitting C<CFLAGS> provided by autoconf into a list
+for use by goals:
+
+ let CFLAGS = split ("@CFLAGS@")
+ goal compile (name) =
+ "%name.o" : "%name.c" { %CC %CFLAGS -c %< -o %@ }
+
=head3 subst (from, to, text)
For example:
=head3 subst (from, to, text)
For example: