X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=docs%2FGoalfile.pod;h=abe9f502e61605a749c1efa26a1bd4e38e30eeaa;hb=bed4036653ce47a91b96dd0ead65341aa80d6b97;hp=f586ec409dd6b7bccba7b04f922b1360c731aa96;hpb=692f7e7a70572c5f4f7242ce721a674a75b34e06;p=goals.git diff --git a/docs/Goalfile.pod b/docs/Goalfile.pod index f586ec4..abe9f50 100644 --- a/docs/Goalfile.pod +++ b/docs/Goalfile.pod @@ -132,6 +132,20 @@ For example: 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 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: