var f=(l,r,t)=>new Promise((a,o)=>{var m=n=>{try{e(t.next(n))}catch(i){o(i)}},c=n=>{try{e(t.throw(n))}catch(i){o(i)}},e=n=>n.done?a(n.value):Promise.resolve(n.value).then(m,c);e((t=t.apply(l,r)).next())});var s={custom:(l,r)=>f(void 0,null,function*(){let{stdout:t}=yield r({command:"bash",args:["-c","make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\\/\\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}' | sort -u"]}),a=new Map;for(let e of t.split(`
`))e!=="Makefile"&&a.set(e,{name:e.trim(),description:"Make target",icon:"\u{1F3AF}",priority:80});let{stdout:o}=yield r({command:"cat",args:["Makefile","makefile"]}),m=o.matchAll(/((?:^#.*\n)*)(?:^\.[A-Z_]+:.*\n)*(^\S*?):.*?(?:\s#+[ \t]*(.+))?$/gm),c=new Set([".PHONY",".SUFFIXES",".DEFAULT",".PRECIOUS",".INTERMEDIATE",".SECONDARY",".SECONDEXPANSION",".DELETE_ON_ERROR",".IGNORE",".LOW_RESOLUTION_TIME",".SILENT",".EXPORT_ALL_VARIABLES",".NOTPARALLEL",".ONESHELL",".POSIX"]);for(let e of m){let[n,i,d,p]=e;if(c.has(d)||/\$\(.+?\)/.test(d))continue;let g=d.trim(),u=p?p.trim():i?i.replace(/^#+\s*/gm,"").trim():"Make target";a.set(g,{name:g,description:u,icon:"\u{1F3AF}",priority:80})}return[...a.values()]})},b={name:"make",args:{name:"target",generators:s},options:[{name:"-j",args:[{name:"number"},{name:"target",generators:s}]},{name:["--file","-f","--makefile"],description:"Read FILE as a makefile",args:{name:"file",template:"filepaths"}},{name:["-C","--directory"],description:"Change to DIRECTORY before doing anything",args:{name:"directory",template:"folders"}},{name:["-B","--always-make"],description:"Unconditionally make all targets",args:{name:"target",generators:s}},{name:["-e","--environment-overrides"],description:"Environment variables override makefiles",args:{name:"target",generators:s}},{name:["-h","--help"],description:"Print this message and exit"},{name:["-i","--ignore-errors"],description:"Ignore errors from commands"},{name:["-k","--keep-going"],description:"Keep going when some targets can't be made"},{name:["-L","--check-symlink-times"],description:"Use the latest mtime between symlinks and target"},{name:["-p","--print-data-base"],description:"Print make's internal database"},{name:["-q","--question"],description:"Run no commands; exit status says if up to date"},{name:["-r","--no-builtin-rules"],description:"Disable the built-in implicit rules"},{name:["-R","--no-builtin-variables"],description:"Disable the built-in variable settings"},{name:["-t","--touch"],description:"Touch targets instead of remaking them"},{name:["-v","--version"],description:"Print the version number of make and exit"},{name:["-w","--print-directory"],description:"Print the current directory"},{name:"-d",description:"Print lots of debugging information"},{name:"--debug",description:"Print various types of debugging information"},{name:["-I","--include-dir"],args:{name:"directory",template:"folders"},description:"Search directory for included makefiles"},{name:["-l","--load-average"],args:{name:"N",isOptional:!0},description:"Don't start multiple jobs unless load is below N"},{name:["-o","--old-file"],args:{name:"file",template:"filepaths"},description:"Consider file to be very old and don't remake it"},{name:"--no-print-directory",description:"Turn off -w, even if it was turned on implicitly"},{name:["-W","--what-if","--new-file","--assume-new"],args:{name:"file",template:"filepaths"},description:"Consider file to be infinitely new"},{name:"--warn-undefined-variables",description:"Warn when an undefined variable is referenced"},{name:["-N","--Next-option"],args:{name:"option"},description:"Turn on value of next option"}]},k=b;export{k as default};
