Documentation
¶
Index ¶
- Constants
- Variables
- func ScanTokens(data []byte, atEOF bool) (advance int, token []byte, err error)
- type Makefile
- type PreReq
- type Recipe
- type Rule
- type Scanner
- type Target
- type Writer
- func (w *Writer) WriteLine() (n int, err error)
- func (w *Writer) WriteMakefile(m Makefile) (n int, err error)
- func (w *Writer) WritePreReq(p string) (n int, err error)
- func (w *Writer) WritePreReqs(ps []string) (n int, err error)
- func (w *Writer) WriteRecipe(r string) (n int, err error)
- func (w *Writer) WriteRecipes(rs []string) (n int, err error)
- func (w *Writer) WriteRule(r Rule) (n int, err error)
- func (w *Writer) WriteTarget(t string) (n int, err error)
- func (w *Writer) WriteTargets(ts []string) (n int, err error)
Constants ¶
View Source
const ( DefineDirective = "define" EndefDirective = "endef" UndefineDirective = "undefine" IfdefDirective = "ifdef" IfndefDirective = "ifndef" IfeqDirective = "ifeq" IfneqDirective = "ifneq" ElseDirective = "else" EndifDirective = "endif" IncludeDirective = "include" DashIncludeDirective = "-include" SincludeDirective = "sinclude" OverrideDirective = "override" ExportDirective = "export" UnexportDirective = "unexport" PrivateDirective = "private" VpathDirective = "vpath" )
View Source
const ( SubstFunction = "subst" PatsubstFunction = "patsubst" StripFunction = "strip" FindstringFunction = "findstring" FilterFunction = "filter" FilterOutFunction = "filter-out" SortFunction = "sort" WordFunction = "word" WordsFunction = "words" WordlistFunction = "wordlist" FirstwordFunction = "firstword" LastwordFunction = "lastword" DirFunction = "dir" NotdirFunction = "notdir" SuffixFunction = "suffix" BasenameFunction = "basename" AddsuffixFunction = "addsuffix" AddprefixFunction = "addprefix" JoinFunction = "join" WildcardFunction = "wildcard" RealpathFunction = "realpath" AbspathFunction = "abspath" ErrorFunction = "error" WarningFunction = "warning" ShellFunction = "shell" OriginFunction = "origin" FlavorFunction = "flavor" LetFunction = "let" ForeachFunction = "foreach" IfFunction = "if" OrFunction = "or" AndFunction = "and" IntcmpFunction = "intcmp" CallFunction = "call" EvalFunction = "eval" FileFunction = "file" ValueFunction = "value" )
View Source
const ( MakefilesVariable = "MAKEFILES" VpathVariable = "VPATH" ShellVariable = "SHELL" MakeshellVariable = "MAKESHELL" MakeVariable = "MAKE" MakeVersionVariable = "MAKE_VERSION" MakeHostVariable = "MAKE_HOST" MakelevelVariable = "MAKELEVEL" MakeflagsVariable = "MAKEFLAGS" GnumakeflagsVariable = "GNUMAKEFLAGS" MakecmdgoalsVariable = "MAKECMDGOALS" CurdirVariable = "CURDIR" SuffixesVariable = "SUFFIXES" LibpatternsVariable = ".LIBPATTERNS" )
View Source
const ( PhonyTarget = ".PHONY" SuffixesTarget = ".SUFFIXES" DefaultTarget = ".DEFAULT" PreciousTarget = ".PRECIOUS" IntermediateTarget = ".INTERMEDIATE" NotintermediateTarget = ".NOTINTERMEDIATE" SecondaryTarget = ".SECONDARY" SecondexpansionTarget = ".SECONDEXPANSION" DeleteOnErrorTarget = ".DELETE_ON_ERROR" IgnoreTarget = ".IGNORE" LowResolutionTimeTarget = ".LOW_RESOLUTION_TIME" SilentTarget = ".SILENT" ExportAllVariablesTarget = ".EXPORT_ALL_VARIABLES" NotparallelTarget = ".NOTPARALLEL" OneshellTarget = ".ONESHELL" PosixTarget = ".POSIX" )
Variables ¶
View Source
var BuiltinFunctions = []string{ SubstFunction, PatsubstFunction, StripFunction, FindstringFunction, FilterFunction, FilterOutFunction, SortFunction, WordFunction, WordsFunction, WordlistFunction, FirstwordFunction, LastwordFunction, DirFunction, NotdirFunction, SuffixFunction, BasenameFunction, AddsuffixFunction, AddprefixFunction, JoinFunction, WildcardFunction, RealpathFunction, AbspathFunction, ErrorFunction, WarningFunction, ShellFunction, OriginFunction, FlavorFunction, LetFunction, ForeachFunction, IfFunction, OrFunction, AndFunction, IntcmpFunction, CallFunction, EvalFunction, FileFunction, ValueFunction, }
View Source
var BuiltinTargets = []string{ PhonyTarget, SuffixesTarget, DefaultTarget, PreciousTarget, IntermediateTarget, NotintermediateTarget, SecondaryTarget, SecondexpansionTarget, DeleteOnErrorTarget, IgnoreTarget, LowResolutionTimeTarget, SilentTarget, ExportAllVariablesTarget, NotparallelTarget, OneshellTarget, PosixTarget, }
View Source
var Directives = []string{ DefineDirective, EndefDirective, UndefineDirective, IfdefDirective, IfndefDirective, IfeqDirective, IfneqDirective, ElseDirective, EndifDirective, IncludeDirective, DashIncludeDirective, SincludeDirective, OverrideDirective, ExportDirective, UndefineDirective, PrivateDirective, VpathDirective, }
View Source
var SpecialVariables = []string{ MakefilesVariable, VpathVariable, ShellVariable, MakeshellVariable, MakeVariable, MakeVersionVariable, MakeHostVariable, MakelevelVariable, MakeflagsVariable, GnumakeflagsVariable, MakecmdgoalsVariable, CurdirVariable, SuffixesVariable, LibpatternsVariable, }
Functions ¶
func ScanTokens ¶
ScanTokens is a bufio.SplitFunc for a bufio.Scanner that scans for tokens supported by the make syntax.
Types ¶
Click to show internal directories.
Click to hide internal directories.