erlang.mk 246 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735
  1. # Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
  2. #
  3. # Permission to use, copy, modify, and/or distribute this software for any
  4. # purpose with or without fee is hereby granted, provided that the above
  5. # copyright notice and this permission notice appear in all copies.
  6. #
  7. # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. .PHONY: all app apps deps search rel relup docs install-docs check tests clean distclean help erlang-mk
  15. ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
  16. export ERLANG_MK_FILENAME
  17. ERLANG_MK_VERSION = bb811a8
  18. ERLANG_MK_WITHOUT =
  19. # Make 3.81 and 3.82 are deprecated.
  20. ifeq ($(MAKELEVEL)$(MAKE_VERSION),03.81)
  21. $(warning Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html)
  22. endif
  23. ifeq ($(MAKELEVEL)$(MAKE_VERSION),03.82)
  24. $(warning Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html)
  25. endif
  26. # Core configuration.
  27. PROJECT ?= $(notdir $(CURDIR))
  28. PROJECT := $(strip $(PROJECT))
  29. PROJECT_VERSION ?= rolling
  30. PROJECT_MOD ?= $(PROJECT)_app
  31. PROJECT_ENV ?= []
  32. # Verbosity.
  33. V ?= 0
  34. verbose_0 = @
  35. verbose_2 = set -x;
  36. verbose = $(verbose_$(V))
  37. ifeq ($(V),3)
  38. SHELL := $(SHELL) -x
  39. endif
  40. gen_verbose_0 = @echo " GEN " $@;
  41. gen_verbose_2 = set -x;
  42. gen_verbose = $(gen_verbose_$(V))
  43. gen_verbose_esc_0 = @echo " GEN " $$@;
  44. gen_verbose_esc_2 = set -x;
  45. gen_verbose_esc = $(gen_verbose_esc_$(V))
  46. # Temporary files directory.
  47. ERLANG_MK_TMP ?= $(CURDIR)/.erlang.mk
  48. export ERLANG_MK_TMP
  49. # "erl" command.
  50. ERL = erl +A1 -noinput -boot no_dot_erlang
  51. # Platform detection.
  52. ifeq ($(PLATFORM),)
  53. UNAME_S := $(shell uname -s)
  54. ifeq ($(UNAME_S),Linux)
  55. PLATFORM = linux
  56. else ifeq ($(UNAME_S),Darwin)
  57. PLATFORM = darwin
  58. else ifeq ($(UNAME_S),SunOS)
  59. PLATFORM = solaris
  60. else ifeq ($(UNAME_S),GNU)
  61. PLATFORM = gnu
  62. else ifeq ($(UNAME_S),FreeBSD)
  63. PLATFORM = freebsd
  64. else ifeq ($(UNAME_S),NetBSD)
  65. PLATFORM = netbsd
  66. else ifeq ($(UNAME_S),OpenBSD)
  67. PLATFORM = openbsd
  68. else ifeq ($(UNAME_S),DragonFly)
  69. PLATFORM = dragonfly
  70. else ifeq ($(shell uname -o),Msys)
  71. PLATFORM = msys2
  72. else
  73. $(error Unable to detect platform. Please open a ticket with the output of uname -a.)
  74. endif
  75. export PLATFORM
  76. endif
  77. # Core targets.
  78. all:: deps app rel
  79. # Noop to avoid a Make warning when there's nothing to do.
  80. rel::
  81. $(verbose) :
  82. relup:: deps app
  83. check:: tests
  84. clean:: clean-crashdump
  85. clean-crashdump:
  86. ifneq ($(wildcard erl_crash.dump),)
  87. $(gen_verbose) rm -f erl_crash.dump
  88. endif
  89. distclean:: clean distclean-tmp
  90. $(ERLANG_MK_TMP):
  91. $(verbose) mkdir -p $(ERLANG_MK_TMP)
  92. distclean-tmp:
  93. $(gen_verbose) rm -rf $(ERLANG_MK_TMP)
  94. help::
  95. $(verbose) printf "%s\n" \
  96. "erlang.mk (version $(ERLANG_MK_VERSION)) is distributed under the terms of the ISC License." \
  97. "Copyright (c) 2013-2016 Loïc Hoguin <essen@ninenines.eu>" \
  98. "" \
  99. "Usage: [V=1] $(MAKE) [target]..." \
  100. "" \
  101. "Core targets:" \
  102. " all Run deps, app and rel targets in that order" \
  103. " app Compile the project" \
  104. " deps Fetch dependencies (if needed) and compile them" \
  105. " fetch-deps Fetch dependencies recursively (if needed) without compiling them" \
  106. " list-deps List dependencies recursively on stdout" \
  107. " search q=... Search for a package in the built-in index" \
  108. " rel Build a release for this project, if applicable" \
  109. " docs Build the documentation for this project" \
  110. " install-docs Install the man pages for this project" \
  111. " check Compile and run all tests and analysis for this project" \
  112. " tests Run the tests for this project" \
  113. " clean Delete temporary and output files from most targets" \
  114. " distclean Delete all temporary and output files" \
  115. " help Display this help and exit" \
  116. " erlang-mk Update erlang.mk to the latest version"
  117. # Core functions.
  118. empty :=
  119. space := $(empty) $(empty)
  120. tab := $(empty) $(empty)
  121. comma := ,
  122. define newline
  123. endef
  124. define comma_list
  125. $(subst $(space),$(comma),$(strip $(1)))
  126. endef
  127. define escape_dquotes
  128. $(subst ",\",$1)
  129. endef
  130. # Adding erlang.mk to make Erlang scripts who call init:get_plain_arguments() happy.
  131. define erlang
  132. $(ERL) $2 -pz $(ERLANG_MK_TMP)/rebar3/_build/prod/lib/*/ebin/ -eval "$(subst $(newline),,$(call escape_dquotes,$1))" -- erlang.mk
  133. endef
  134. ifeq ($(PLATFORM),msys2)
  135. core_native_path = $(shell cygpath -m $1)
  136. else
  137. core_native_path = $1
  138. endif
  139. core_http_get = curl -Lf$(if $(filter-out 0,$(V)),,s)o $(call core_native_path,$1) $2
  140. core_eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
  141. # We skip files that contain spaces or '#' because they end up causing issues.
  142. core_find = $(if $(wildcard $1),$(shell find $(1:%/=%) \( -type l -o -type f \) -name $(subst *,\*,$2) -not -name "*[ \#]*"))
  143. core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1)))))))))))))))))))))))))))
  144. core_ls = $(filter-out $(1),$(shell echo $(1)))
  145. # @todo Use a solution that does not require using perl.
  146. core_relpath = $(shell perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' $1 $2)
  147. define core_render
  148. printf -- '$(subst $(newline),\n,$(subst %,%%,$(subst ','\'',$(subst $(tab),$(WS),$(call $(1))))))\n' > $(2)
  149. endef
  150. # Automated update.
  151. ERLANG_MK_REPO ?= https://github.com/ninenines/erlang.mk
  152. ERLANG_MK_COMMIT ?=
  153. ERLANG_MK_BUILD_CONFIG ?= build.config
  154. ERLANG_MK_BUILD_DIR ?= .erlang.mk.build
  155. erlang-mk: WITHOUT ?= $(ERLANG_MK_WITHOUT)
  156. erlang-mk:
  157. ifdef ERLANG_MK_COMMIT
  158. $(verbose) git clone $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)
  159. $(verbose) cd $(ERLANG_MK_BUILD_DIR) && git checkout $(ERLANG_MK_COMMIT)
  160. else
  161. $(verbose) git clone --depth 1 $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)
  162. endif
  163. $(verbose) if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR)/build.config; fi
  164. $(gen_verbose) $(MAKE) --no-print-directory -C $(ERLANG_MK_BUILD_DIR) WITHOUT='$(strip $(WITHOUT))' UPGRADE=1
  165. $(verbose) cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk
  166. $(verbose) rm -rf $(ERLANG_MK_BUILD_DIR)
  167. $(verbose) rm -rf $(ERLANG_MK_TMP)
  168. # The erlang.mk package index is bundled in the default erlang.mk build.
  169. # Search for the string "copyright" to skip to the rest of the code.
  170. # Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu>
  171. # This file is part of erlang.mk and subject to the terms of the ISC License.
  172. .PHONY: distclean-kerl
  173. KERL_INSTALL_DIR ?= $(HOME)/erlang
  174. ifeq ($(strip $(KERL)),)
  175. KERL := $(ERLANG_MK_TMP)/kerl/kerl
  176. endif
  177. KERL_DIR = $(ERLANG_MK_TMP)/kerl
  178. export KERL
  179. KERL_GIT ?= https://github.com/kerl/kerl
  180. KERL_COMMIT ?= master
  181. KERL_MAKEFLAGS ?=
  182. OTP_GIT ?= https://github.com/erlang/otp
  183. define kerl_otp_target
  184. $(KERL_INSTALL_DIR)/$(1): $(KERL)
  185. $(verbose) if [ ! -d $$@ ]; then \
  186. MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $(1) $(1); \
  187. $(KERL) install $(1) $(KERL_INSTALL_DIR)/$(1); \
  188. fi
  189. endef
  190. $(KERL): $(KERL_DIR)
  191. $(KERL_DIR): | $(ERLANG_MK_TMP)
  192. $(gen_verbose) git clone --depth 1 $(KERL_GIT) $(ERLANG_MK_TMP)/kerl
  193. $(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT)
  194. $(verbose) chmod +x $(KERL)
  195. distclean:: distclean-kerl
  196. distclean-kerl:
  197. $(gen_verbose) rm -rf $(KERL_DIR)
  198. # Allow users to select which version of Erlang/OTP to use for a project.
  199. ifneq ($(strip $(LATEST_ERLANG_OTP)),)
  200. # In some environments it is necessary to filter out master.
  201. ERLANG_OTP := $(notdir $(lastword $(sort\
  202. $(filter-out $(KERL_INSTALL_DIR)/master $(KERL_INSTALL_DIR)/OTP_R%,\
  203. $(filter-out %-rc1 %-rc2 %-rc3,$(wildcard $(KERL_INSTALL_DIR)/*[^-native]))))))
  204. endif
  205. ERLANG_OTP ?=
  206. # Use kerl to enforce a specific Erlang/OTP version for a project.
  207. ifneq ($(strip $(ERLANG_OTP)),)
  208. export PATH := $(KERL_INSTALL_DIR)/$(ERLANG_OTP)/bin:$(PATH)
  209. SHELL := env PATH=$(PATH) $(SHELL)
  210. $(eval $(call kerl_otp_target,$(ERLANG_OTP)))
  211. # Build Erlang/OTP only if it doesn't already exist.
  212. ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_OTP))$(BUILD_ERLANG_OTP),)
  213. $(info Building Erlang/OTP $(ERLANG_OTP)... Please wait...)
  214. $(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_OTP) ERLANG_OTP=$(ERLANG_OTP) BUILD_ERLANG_OTP=1 >&2)
  215. endif
  216. endif
  217. PACKAGES += aberth
  218. pkg_aberth_name = aberth
  219. pkg_aberth_description = Generic BERT-RPC server in Erlang
  220. pkg_aberth_homepage = https://github.com/a13x/aberth
  221. pkg_aberth_fetch = git
  222. pkg_aberth_repo = https://github.com/a13x/aberth
  223. pkg_aberth_commit = master
  224. PACKAGES += active
  225. pkg_active_name = active
  226. pkg_active_description = Active development for Erlang: rebuild and reload source/binary files while the VM is running
  227. pkg_active_homepage = https://github.com/proger/active
  228. pkg_active_fetch = git
  229. pkg_active_repo = https://github.com/proger/active
  230. pkg_active_commit = master
  231. PACKAGES += aleppo
  232. pkg_aleppo_name = aleppo
  233. pkg_aleppo_description = Alternative Erlang Pre-Processor
  234. pkg_aleppo_homepage = https://github.com/ErlyORM/aleppo
  235. pkg_aleppo_fetch = git
  236. pkg_aleppo_repo = https://github.com/ErlyORM/aleppo
  237. pkg_aleppo_commit = master
  238. PACKAGES += alog
  239. pkg_alog_name = alog
  240. pkg_alog_description = Simply the best logging framework for Erlang
  241. pkg_alog_homepage = https://github.com/siberian-fast-food/alogger
  242. pkg_alog_fetch = git
  243. pkg_alog_repo = https://github.com/siberian-fast-food/alogger
  244. pkg_alog_commit = master
  245. PACKAGES += annotations
  246. pkg_annotations_name = annotations
  247. pkg_annotations_description = Simple code instrumentation utilities
  248. pkg_annotations_homepage = https://github.com/hyperthunk/annotations
  249. pkg_annotations_fetch = git
  250. pkg_annotations_repo = https://github.com/hyperthunk/annotations
  251. pkg_annotations_commit = master
  252. PACKAGES += apns
  253. pkg_apns_name = apns
  254. pkg_apns_description = Apple Push Notification Server for Erlang
  255. pkg_apns_homepage = http://inaka.github.com/apns4erl
  256. pkg_apns_fetch = git
  257. pkg_apns_repo = https://github.com/inaka/apns4erl
  258. pkg_apns_commit = master
  259. PACKAGES += asciideck
  260. pkg_asciideck_name = asciideck
  261. pkg_asciideck_description = Asciidoc for Erlang.
  262. pkg_asciideck_homepage = https://ninenines.eu
  263. pkg_asciideck_fetch = git
  264. pkg_asciideck_repo = https://github.com/ninenines/asciideck
  265. pkg_asciideck_commit = master
  266. PACKAGES += backoff
  267. pkg_backoff_name = backoff
  268. pkg_backoff_description = Simple exponential backoffs in Erlang
  269. pkg_backoff_homepage = https://github.com/ferd/backoff
  270. pkg_backoff_fetch = git
  271. pkg_backoff_repo = https://github.com/ferd/backoff
  272. pkg_backoff_commit = master
  273. PACKAGES += barrel_tcp
  274. pkg_barrel_tcp_name = barrel_tcp
  275. pkg_barrel_tcp_description = barrel is a generic TCP acceptor pool with low latency in Erlang.
  276. pkg_barrel_tcp_homepage = https://github.com/benoitc-attic/barrel_tcp
  277. pkg_barrel_tcp_fetch = git
  278. pkg_barrel_tcp_repo = https://github.com/benoitc-attic/barrel_tcp
  279. pkg_barrel_tcp_commit = master
  280. PACKAGES += basho_bench
  281. pkg_basho_bench_name = basho_bench
  282. pkg_basho_bench_description = A load-generation and testing tool for basically whatever you can write a returning Erlang function for.
  283. pkg_basho_bench_homepage = https://github.com/basho/basho_bench
  284. pkg_basho_bench_fetch = git
  285. pkg_basho_bench_repo = https://github.com/basho/basho_bench
  286. pkg_basho_bench_commit = master
  287. PACKAGES += bcrypt
  288. pkg_bcrypt_name = bcrypt
  289. pkg_bcrypt_description = Bcrypt Erlang / C library
  290. pkg_bcrypt_homepage = https://github.com/erlangpack/bcrypt
  291. pkg_bcrypt_fetch = git
  292. pkg_bcrypt_repo = https://github.com/erlangpack/bcrypt.git
  293. pkg_bcrypt_commit = master
  294. PACKAGES += beam
  295. pkg_beam_name = beam
  296. pkg_beam_description = BEAM emulator written in Erlang
  297. pkg_beam_homepage = https://github.com/tonyrog/beam
  298. pkg_beam_fetch = git
  299. pkg_beam_repo = https://github.com/tonyrog/beam
  300. pkg_beam_commit = master
  301. PACKAGES += bear
  302. pkg_bear_name = bear
  303. pkg_bear_description = a set of statistics functions for erlang
  304. pkg_bear_homepage = https://github.com/boundary/bear
  305. pkg_bear_fetch = git
  306. pkg_bear_repo = https://github.com/boundary/bear
  307. pkg_bear_commit = master
  308. PACKAGES += bertconf
  309. pkg_bertconf_name = bertconf
  310. pkg_bertconf_description = Make ETS tables out of statc BERT files that are auto-reloaded
  311. pkg_bertconf_homepage = https://github.com/ferd/bertconf
  312. pkg_bertconf_fetch = git
  313. pkg_bertconf_repo = https://github.com/ferd/bertconf
  314. pkg_bertconf_commit = master
  315. PACKAGES += bifrost
  316. pkg_bifrost_name = bifrost
  317. pkg_bifrost_description = Erlang FTP Server Framework
  318. pkg_bifrost_homepage = https://github.com/thorstadt/bifrost
  319. pkg_bifrost_fetch = git
  320. pkg_bifrost_repo = https://github.com/thorstadt/bifrost
  321. pkg_bifrost_commit = master
  322. PACKAGES += binpp
  323. pkg_binpp_name = binpp
  324. pkg_binpp_description = Erlang Binary Pretty Printer
  325. pkg_binpp_homepage = https://github.com/jtendo/binpp
  326. pkg_binpp_fetch = git
  327. pkg_binpp_repo = https://github.com/jtendo/binpp
  328. pkg_binpp_commit = master
  329. PACKAGES += bisect
  330. pkg_bisect_name = bisect
  331. pkg_bisect_description = Ordered fixed-size binary dictionary in Erlang
  332. pkg_bisect_homepage = https://github.com/knutin/bisect
  333. pkg_bisect_fetch = git
  334. pkg_bisect_repo = https://github.com/knutin/bisect
  335. pkg_bisect_commit = master
  336. PACKAGES += bitcask
  337. pkg_bitcask_name = bitcask
  338. pkg_bitcask_description = because you need another a key/value storage engine
  339. pkg_bitcask_homepage = https://github.com/basho/bitcask
  340. pkg_bitcask_fetch = git
  341. pkg_bitcask_repo = https://github.com/basho/bitcask
  342. pkg_bitcask_commit = develop
  343. PACKAGES += bootstrap
  344. pkg_bootstrap_name = bootstrap
  345. pkg_bootstrap_description = A simple, yet powerful Erlang cluster bootstrapping application.
  346. pkg_bootstrap_homepage = https://github.com/schlagert/bootstrap
  347. pkg_bootstrap_fetch = git
  348. pkg_bootstrap_repo = https://github.com/schlagert/bootstrap
  349. pkg_bootstrap_commit = master
  350. PACKAGES += boss
  351. pkg_boss_name = boss
  352. pkg_boss_description = Erlang web MVC, now featuring Comet
  353. pkg_boss_homepage = https://github.com/ChicagoBoss/ChicagoBoss
  354. pkg_boss_fetch = git
  355. pkg_boss_repo = https://github.com/ChicagoBoss/ChicagoBoss
  356. pkg_boss_commit = master
  357. PACKAGES += boss_db
  358. pkg_boss_db_name = boss_db
  359. pkg_boss_db_description = BossDB: a sharded, caching, pooling, evented ORM for Erlang
  360. pkg_boss_db_homepage = https://github.com/ErlyORM/boss_db
  361. pkg_boss_db_fetch = git
  362. pkg_boss_db_repo = https://github.com/ErlyORM/boss_db
  363. pkg_boss_db_commit = master
  364. PACKAGES += brod
  365. pkg_brod_name = brod
  366. pkg_brod_description = Kafka client in Erlang
  367. pkg_brod_homepage = https://github.com/klarna/brod
  368. pkg_brod_fetch = git
  369. pkg_brod_repo = https://github.com/klarna/brod.git
  370. pkg_brod_commit = master
  371. PACKAGES += bson
  372. pkg_bson_name = bson
  373. pkg_bson_description = BSON documents in Erlang, see bsonspec.org
  374. pkg_bson_homepage = https://github.com/comtihon/bson-erlang
  375. pkg_bson_fetch = git
  376. pkg_bson_repo = https://github.com/comtihon/bson-erlang
  377. pkg_bson_commit = master
  378. PACKAGES += bullet
  379. pkg_bullet_name = bullet
  380. pkg_bullet_description = Simple, reliable, efficient streaming for Cowboy.
  381. pkg_bullet_homepage = http://ninenines.eu
  382. pkg_bullet_fetch = git
  383. pkg_bullet_repo = https://github.com/ninenines/bullet
  384. pkg_bullet_commit = master
  385. PACKAGES += cache
  386. pkg_cache_name = cache
  387. pkg_cache_description = Erlang in-memory cache
  388. pkg_cache_homepage = https://github.com/fogfish/cache
  389. pkg_cache_fetch = git
  390. pkg_cache_repo = https://github.com/fogfish/cache
  391. pkg_cache_commit = master
  392. PACKAGES += cake
  393. pkg_cake_name = cake
  394. pkg_cake_description = Really simple terminal colorization
  395. pkg_cake_homepage = https://github.com/darach/cake-erl
  396. pkg_cake_fetch = git
  397. pkg_cake_repo = https://github.com/darach/cake-erl
  398. pkg_cake_commit = master
  399. PACKAGES += cberl
  400. pkg_cberl_name = cberl
  401. pkg_cberl_description = NIF based Erlang bindings for Couchbase
  402. pkg_cberl_homepage = https://github.com/chitika/cberl
  403. pkg_cberl_fetch = git
  404. pkg_cberl_repo = https://github.com/chitika/cberl
  405. pkg_cberl_commit = master
  406. PACKAGES += cecho
  407. pkg_cecho_name = cecho
  408. pkg_cecho_description = An ncurses library for Erlang
  409. pkg_cecho_homepage = https://github.com/mazenharake/cecho
  410. pkg_cecho_fetch = git
  411. pkg_cecho_repo = https://github.com/mazenharake/cecho
  412. pkg_cecho_commit = master
  413. PACKAGES += cferl
  414. pkg_cferl_name = cferl
  415. pkg_cferl_description = Rackspace / Open Stack Cloud Files Erlang Client
  416. pkg_cferl_homepage = https://github.com/ddossot/cferl
  417. pkg_cferl_fetch = git
  418. pkg_cferl_repo = https://github.com/ddossot/cferl
  419. pkg_cferl_commit = master
  420. PACKAGES += chaos_monkey
  421. pkg_chaos_monkey_name = chaos_monkey
  422. pkg_chaos_monkey_description = This is The CHAOS MONKEY. It will kill your processes.
  423. pkg_chaos_monkey_homepage = https://github.com/dLuna/chaos_monkey
  424. pkg_chaos_monkey_fetch = git
  425. pkg_chaos_monkey_repo = https://github.com/dLuna/chaos_monkey
  426. pkg_chaos_monkey_commit = master
  427. PACKAGES += check_node
  428. pkg_check_node_name = check_node
  429. pkg_check_node_description = Nagios Scripts for monitoring Riak
  430. pkg_check_node_homepage = https://github.com/basho-labs/riak_nagios
  431. pkg_check_node_fetch = git
  432. pkg_check_node_repo = https://github.com/basho-labs/riak_nagios
  433. pkg_check_node_commit = master
  434. PACKAGES += chronos
  435. pkg_chronos_name = chronos
  436. pkg_chronos_description = Timer module for Erlang that makes it easy to abstract time out of the tests.
  437. pkg_chronos_homepage = https://github.com/lehoff/chronos
  438. pkg_chronos_fetch = git
  439. pkg_chronos_repo = https://github.com/lehoff/chronos
  440. pkg_chronos_commit = master
  441. PACKAGES += chumak
  442. pkg_chumak_name = chumak
  443. pkg_chumak_description = Pure Erlang implementation of ZeroMQ Message Transport Protocol.
  444. pkg_chumak_homepage = http://choven.ca
  445. pkg_chumak_fetch = git
  446. pkg_chumak_repo = https://github.com/chovencorp/chumak
  447. pkg_chumak_commit = master
  448. PACKAGES += cl
  449. pkg_cl_name = cl
  450. pkg_cl_description = OpenCL binding for Erlang
  451. pkg_cl_homepage = https://github.com/tonyrog/cl
  452. pkg_cl_fetch = git
  453. pkg_cl_repo = https://github.com/tonyrog/cl
  454. pkg_cl_commit = master
  455. PACKAGES += clique
  456. pkg_clique_name = clique
  457. pkg_clique_description = CLI Framework for Erlang
  458. pkg_clique_homepage = https://github.com/basho/clique
  459. pkg_clique_fetch = git
  460. pkg_clique_repo = https://github.com/basho/clique
  461. pkg_clique_commit = develop
  462. PACKAGES += cloudi_core
  463. pkg_cloudi_core_name = cloudi_core
  464. pkg_cloudi_core_description = CloudI internal service runtime
  465. pkg_cloudi_core_homepage = http://cloudi.org/
  466. pkg_cloudi_core_fetch = git
  467. pkg_cloudi_core_repo = https://github.com/CloudI/cloudi_core
  468. pkg_cloudi_core_commit = master
  469. PACKAGES += cloudi_service_api_requests
  470. pkg_cloudi_service_api_requests_name = cloudi_service_api_requests
  471. pkg_cloudi_service_api_requests_description = CloudI Service API requests (JSON-RPC/Erlang-term support)
  472. pkg_cloudi_service_api_requests_homepage = http://cloudi.org/
  473. pkg_cloudi_service_api_requests_fetch = git
  474. pkg_cloudi_service_api_requests_repo = https://github.com/CloudI/cloudi_service_api_requests
  475. pkg_cloudi_service_api_requests_commit = master
  476. PACKAGES += cloudi_service_db_mysql
  477. pkg_cloudi_service_db_mysql_name = cloudi_service_db_mysql
  478. pkg_cloudi_service_db_mysql_description = MySQL CloudI Service
  479. pkg_cloudi_service_db_mysql_homepage = http://cloudi.org/
  480. pkg_cloudi_service_db_mysql_fetch = git
  481. pkg_cloudi_service_db_mysql_repo = https://github.com/CloudI/cloudi_service_db_mysql
  482. pkg_cloudi_service_db_mysql_commit = master
  483. PACKAGES += cloudi_service_db_pgsql
  484. pkg_cloudi_service_db_pgsql_name = cloudi_service_db_pgsql
  485. pkg_cloudi_service_db_pgsql_description = PostgreSQL CloudI Service
  486. pkg_cloudi_service_db_pgsql_homepage = http://cloudi.org/
  487. pkg_cloudi_service_db_pgsql_fetch = git
  488. pkg_cloudi_service_db_pgsql_repo = https://github.com/CloudI/cloudi_service_db_pgsql
  489. pkg_cloudi_service_db_pgsql_commit = master
  490. PACKAGES += cloudi_service_filesystem
  491. pkg_cloudi_service_filesystem_name = cloudi_service_filesystem
  492. pkg_cloudi_service_filesystem_description = Filesystem CloudI Service
  493. pkg_cloudi_service_filesystem_homepage = http://cloudi.org/
  494. pkg_cloudi_service_filesystem_fetch = git
  495. pkg_cloudi_service_filesystem_repo = https://github.com/CloudI/cloudi_service_filesystem
  496. pkg_cloudi_service_filesystem_commit = master
  497. PACKAGES += cloudi_service_http_client
  498. pkg_cloudi_service_http_client_name = cloudi_service_http_client
  499. pkg_cloudi_service_http_client_description = HTTP client CloudI Service
  500. pkg_cloudi_service_http_client_homepage = http://cloudi.org/
  501. pkg_cloudi_service_http_client_fetch = git
  502. pkg_cloudi_service_http_client_repo = https://github.com/CloudI/cloudi_service_http_client
  503. pkg_cloudi_service_http_client_commit = master
  504. PACKAGES += cloudi_service_http_cowboy
  505. pkg_cloudi_service_http_cowboy_name = cloudi_service_http_cowboy
  506. pkg_cloudi_service_http_cowboy_description = cowboy HTTP/HTTPS CloudI Service
  507. pkg_cloudi_service_http_cowboy_homepage = http://cloudi.org/
  508. pkg_cloudi_service_http_cowboy_fetch = git
  509. pkg_cloudi_service_http_cowboy_repo = https://github.com/CloudI/cloudi_service_http_cowboy
  510. pkg_cloudi_service_http_cowboy_commit = master
  511. PACKAGES += cloudi_service_http_elli
  512. pkg_cloudi_service_http_elli_name = cloudi_service_http_elli
  513. pkg_cloudi_service_http_elli_description = elli HTTP CloudI Service
  514. pkg_cloudi_service_http_elli_homepage = http://cloudi.org/
  515. pkg_cloudi_service_http_elli_fetch = git
  516. pkg_cloudi_service_http_elli_repo = https://github.com/CloudI/cloudi_service_http_elli
  517. pkg_cloudi_service_http_elli_commit = master
  518. PACKAGES += cloudi_service_map_reduce
  519. pkg_cloudi_service_map_reduce_name = cloudi_service_map_reduce
  520. pkg_cloudi_service_map_reduce_description = Map/Reduce CloudI Service
  521. pkg_cloudi_service_map_reduce_homepage = http://cloudi.org/
  522. pkg_cloudi_service_map_reduce_fetch = git
  523. pkg_cloudi_service_map_reduce_repo = https://github.com/CloudI/cloudi_service_map_reduce
  524. pkg_cloudi_service_map_reduce_commit = master
  525. PACKAGES += cloudi_service_oauth1
  526. pkg_cloudi_service_oauth1_name = cloudi_service_oauth1
  527. pkg_cloudi_service_oauth1_description = OAuth v1.0 CloudI Service
  528. pkg_cloudi_service_oauth1_homepage = http://cloudi.org/
  529. pkg_cloudi_service_oauth1_fetch = git
  530. pkg_cloudi_service_oauth1_repo = https://github.com/CloudI/cloudi_service_oauth1
  531. pkg_cloudi_service_oauth1_commit = master
  532. PACKAGES += cloudi_service_queue
  533. pkg_cloudi_service_queue_name = cloudi_service_queue
  534. pkg_cloudi_service_queue_description = Persistent Queue Service
  535. pkg_cloudi_service_queue_homepage = http://cloudi.org/
  536. pkg_cloudi_service_queue_fetch = git
  537. pkg_cloudi_service_queue_repo = https://github.com/CloudI/cloudi_service_queue
  538. pkg_cloudi_service_queue_commit = master
  539. PACKAGES += cloudi_service_quorum
  540. pkg_cloudi_service_quorum_name = cloudi_service_quorum
  541. pkg_cloudi_service_quorum_description = CloudI Quorum Service
  542. pkg_cloudi_service_quorum_homepage = http://cloudi.org/
  543. pkg_cloudi_service_quorum_fetch = git
  544. pkg_cloudi_service_quorum_repo = https://github.com/CloudI/cloudi_service_quorum
  545. pkg_cloudi_service_quorum_commit = master
  546. PACKAGES += cloudi_service_router
  547. pkg_cloudi_service_router_name = cloudi_service_router
  548. pkg_cloudi_service_router_description = CloudI Router Service
  549. pkg_cloudi_service_router_homepage = http://cloudi.org/
  550. pkg_cloudi_service_router_fetch = git
  551. pkg_cloudi_service_router_repo = https://github.com/CloudI/cloudi_service_router
  552. pkg_cloudi_service_router_commit = master
  553. PACKAGES += cloudi_service_tcp
  554. pkg_cloudi_service_tcp_name = cloudi_service_tcp
  555. pkg_cloudi_service_tcp_description = TCP CloudI Service
  556. pkg_cloudi_service_tcp_homepage = http://cloudi.org/
  557. pkg_cloudi_service_tcp_fetch = git
  558. pkg_cloudi_service_tcp_repo = https://github.com/CloudI/cloudi_service_tcp
  559. pkg_cloudi_service_tcp_commit = master
  560. PACKAGES += cloudi_service_udp
  561. pkg_cloudi_service_udp_name = cloudi_service_udp
  562. pkg_cloudi_service_udp_description = UDP CloudI Service
  563. pkg_cloudi_service_udp_homepage = http://cloudi.org/
  564. pkg_cloudi_service_udp_fetch = git
  565. pkg_cloudi_service_udp_repo = https://github.com/CloudI/cloudi_service_udp
  566. pkg_cloudi_service_udp_commit = master
  567. PACKAGES += cloudi_service_validate
  568. pkg_cloudi_service_validate_name = cloudi_service_validate
  569. pkg_cloudi_service_validate_description = CloudI Validate Service
  570. pkg_cloudi_service_validate_homepage = http://cloudi.org/
  571. pkg_cloudi_service_validate_fetch = git
  572. pkg_cloudi_service_validate_repo = https://github.com/CloudI/cloudi_service_validate
  573. pkg_cloudi_service_validate_commit = master
  574. PACKAGES += cloudi_service_zeromq
  575. pkg_cloudi_service_zeromq_name = cloudi_service_zeromq
  576. pkg_cloudi_service_zeromq_description = ZeroMQ CloudI Service
  577. pkg_cloudi_service_zeromq_homepage = http://cloudi.org/
  578. pkg_cloudi_service_zeromq_fetch = git
  579. pkg_cloudi_service_zeromq_repo = https://github.com/CloudI/cloudi_service_zeromq
  580. pkg_cloudi_service_zeromq_commit = master
  581. PACKAGES += cluster_info
  582. pkg_cluster_info_name = cluster_info
  583. pkg_cluster_info_description = Fork of Hibari's nifty cluster_info OTP app
  584. pkg_cluster_info_homepage = https://github.com/basho/cluster_info
  585. pkg_cluster_info_fetch = git
  586. pkg_cluster_info_repo = https://github.com/basho/cluster_info
  587. pkg_cluster_info_commit = master
  588. PACKAGES += color
  589. pkg_color_name = color
  590. pkg_color_description = ANSI colors for your Erlang
  591. pkg_color_homepage = https://github.com/julianduque/erlang-color
  592. pkg_color_fetch = git
  593. pkg_color_repo = https://github.com/julianduque/erlang-color
  594. pkg_color_commit = master
  595. PACKAGES += confetti
  596. pkg_confetti_name = confetti
  597. pkg_confetti_description = Erlang configuration provider / application:get_env/2 on steroids
  598. pkg_confetti_homepage = https://github.com/jtendo/confetti
  599. pkg_confetti_fetch = git
  600. pkg_confetti_repo = https://github.com/jtendo/confetti
  601. pkg_confetti_commit = master
  602. PACKAGES += couchbeam
  603. pkg_couchbeam_name = couchbeam
  604. pkg_couchbeam_description = Apache CouchDB client in Erlang
  605. pkg_couchbeam_homepage = https://github.com/benoitc/couchbeam
  606. pkg_couchbeam_fetch = git
  607. pkg_couchbeam_repo = https://github.com/benoitc/couchbeam
  608. pkg_couchbeam_commit = master
  609. PACKAGES += covertool
  610. pkg_covertool_name = covertool
  611. pkg_covertool_description = Tool to convert Erlang cover data files into Cobertura XML reports
  612. pkg_covertool_homepage = https://github.com/idubrov/covertool
  613. pkg_covertool_fetch = git
  614. pkg_covertool_repo = https://github.com/idubrov/covertool
  615. pkg_covertool_commit = master
  616. PACKAGES += cowboy
  617. pkg_cowboy_name = cowboy
  618. pkg_cowboy_description = Small, fast and modular HTTP server.
  619. pkg_cowboy_homepage = http://ninenines.eu
  620. pkg_cowboy_fetch = git
  621. pkg_cowboy_repo = https://github.com/ninenines/cowboy
  622. pkg_cowboy_commit = 1.0.4
  623. PACKAGES += cowdb
  624. pkg_cowdb_name = cowdb
  625. pkg_cowdb_description = Pure Key/Value database library for Erlang Applications
  626. pkg_cowdb_homepage = https://github.com/refuge/cowdb
  627. pkg_cowdb_fetch = git
  628. pkg_cowdb_repo = https://github.com/refuge/cowdb
  629. pkg_cowdb_commit = master
  630. PACKAGES += cowlib
  631. pkg_cowlib_name = cowlib
  632. pkg_cowlib_description = Support library for manipulating Web protocols.
  633. pkg_cowlib_homepage = http://ninenines.eu
  634. pkg_cowlib_fetch = git
  635. pkg_cowlib_repo = https://github.com/ninenines/cowlib
  636. pkg_cowlib_commit = 1.0.2
  637. PACKAGES += cpg
  638. pkg_cpg_name = cpg
  639. pkg_cpg_description = CloudI Process Groups
  640. pkg_cpg_homepage = https://github.com/okeuday/cpg
  641. pkg_cpg_fetch = git
  642. pkg_cpg_repo = https://github.com/okeuday/cpg
  643. pkg_cpg_commit = master
  644. PACKAGES += cqerl
  645. pkg_cqerl_name = cqerl
  646. pkg_cqerl_description = Native Erlang CQL client for Cassandra
  647. pkg_cqerl_homepage = https://matehat.github.io/cqerl/
  648. pkg_cqerl_fetch = git
  649. pkg_cqerl_repo = https://github.com/matehat/cqerl
  650. pkg_cqerl_commit = master
  651. PACKAGES += cr
  652. pkg_cr_name = cr
  653. pkg_cr_description = Chain Replication
  654. pkg_cr_homepage = https://synrc.com/apps/cr/doc/cr.htm
  655. pkg_cr_fetch = git
  656. pkg_cr_repo = https://github.com/spawnproc/cr
  657. pkg_cr_commit = master
  658. PACKAGES += cuttlefish
  659. pkg_cuttlefish_name = cuttlefish
  660. pkg_cuttlefish_description = cuttlefish configuration abstraction
  661. pkg_cuttlefish_homepage = https://github.com/Kyorai/cuttlefish
  662. pkg_cuttlefish_fetch = git
  663. pkg_cuttlefish_repo = https://github.com/Kyorai/cuttlefish
  664. pkg_cuttlefish_commit = master
  665. PACKAGES += damocles
  666. pkg_damocles_name = damocles
  667. pkg_damocles_description = Erlang library for generating adversarial network conditions for QAing distributed applications/systems on a single Linux box.
  668. pkg_damocles_homepage = https://github.com/lostcolony/damocles
  669. pkg_damocles_fetch = git
  670. pkg_damocles_repo = https://github.com/lostcolony/damocles
  671. pkg_damocles_commit = master
  672. PACKAGES += debbie
  673. pkg_debbie_name = debbie
  674. pkg_debbie_description = .DEB Built In Erlang
  675. pkg_debbie_homepage = https://github.com/crownedgrouse/debbie
  676. pkg_debbie_fetch = git
  677. pkg_debbie_repo = https://github.com/crownedgrouse/debbie
  678. pkg_debbie_commit = master
  679. PACKAGES += decimal
  680. pkg_decimal_name = decimal
  681. pkg_decimal_description = An Erlang decimal arithmetic library
  682. pkg_decimal_homepage = https://github.com/egobrain/decimal
  683. pkg_decimal_fetch = git
  684. pkg_decimal_repo = https://github.com/egobrain/decimal
  685. pkg_decimal_commit = master
  686. PACKAGES += detergent
  687. pkg_detergent_name = detergent
  688. pkg_detergent_description = An emulsifying Erlang SOAP library
  689. pkg_detergent_homepage = https://github.com/devinus/detergent
  690. pkg_detergent_fetch = git
  691. pkg_detergent_repo = https://github.com/devinus/detergent
  692. pkg_detergent_commit = master
  693. PACKAGES += dh_date
  694. pkg_dh_date_name = dh_date
  695. pkg_dh_date_description = Date formatting / parsing library for erlang
  696. pkg_dh_date_homepage = https://github.com/daleharvey/dh_date
  697. pkg_dh_date_fetch = git
  698. pkg_dh_date_repo = https://github.com/daleharvey/dh_date
  699. pkg_dh_date_commit = master
  700. PACKAGES += dirbusterl
  701. pkg_dirbusterl_name = dirbusterl
  702. pkg_dirbusterl_description = DirBuster successor in Erlang
  703. pkg_dirbusterl_homepage = https://github.com/silentsignal/DirBustErl
  704. pkg_dirbusterl_fetch = git
  705. pkg_dirbusterl_repo = https://github.com/silentsignal/DirBustErl
  706. pkg_dirbusterl_commit = master
  707. PACKAGES += dispcount
  708. pkg_dispcount_name = dispcount
  709. pkg_dispcount_description = Erlang task dispatcher based on ETS counters.
  710. pkg_dispcount_homepage = https://github.com/ferd/dispcount
  711. pkg_dispcount_fetch = git
  712. pkg_dispcount_repo = https://github.com/ferd/dispcount
  713. pkg_dispcount_commit = master
  714. PACKAGES += dlhttpc
  715. pkg_dlhttpc_name = dlhttpc
  716. pkg_dlhttpc_description = dispcount-based lhttpc fork for massive amounts of requests to limited endpoints
  717. pkg_dlhttpc_homepage = https://github.com/ferd/dlhttpc
  718. pkg_dlhttpc_fetch = git
  719. pkg_dlhttpc_repo = https://github.com/ferd/dlhttpc
  720. pkg_dlhttpc_commit = master
  721. PACKAGES += dns
  722. pkg_dns_name = dns
  723. pkg_dns_description = Erlang DNS library
  724. pkg_dns_homepage = https://github.com/aetrion/dns_erlang
  725. pkg_dns_fetch = git
  726. pkg_dns_repo = https://github.com/aetrion/dns_erlang
  727. pkg_dns_commit = main
  728. PACKAGES += dynamic_compile
  729. pkg_dynamic_compile_name = dynamic_compile
  730. pkg_dynamic_compile_description = compile and load erlang modules from string input
  731. pkg_dynamic_compile_homepage = https://github.com/jkvor/dynamic_compile
  732. pkg_dynamic_compile_fetch = git
  733. pkg_dynamic_compile_repo = https://github.com/jkvor/dynamic_compile
  734. pkg_dynamic_compile_commit = master
  735. PACKAGES += e2
  736. pkg_e2_name = e2
  737. pkg_e2_description = Library to simply writing correct OTP applications.
  738. pkg_e2_homepage = http://e2project.org
  739. pkg_e2_fetch = git
  740. pkg_e2_repo = https://github.com/gar1t/e2
  741. pkg_e2_commit = master
  742. PACKAGES += eamf
  743. pkg_eamf_name = eamf
  744. pkg_eamf_description = eAMF provides Action Message Format (AMF) support for Erlang
  745. pkg_eamf_homepage = https://github.com/mrinalwadhwa/eamf
  746. pkg_eamf_fetch = git
  747. pkg_eamf_repo = https://github.com/mrinalwadhwa/eamf
  748. pkg_eamf_commit = master
  749. PACKAGES += eavro
  750. pkg_eavro_name = eavro
  751. pkg_eavro_description = Apache Avro encoder/decoder
  752. pkg_eavro_homepage = https://github.com/SIfoxDevTeam/eavro
  753. pkg_eavro_fetch = git
  754. pkg_eavro_repo = https://github.com/SIfoxDevTeam/eavro
  755. pkg_eavro_commit = master
  756. PACKAGES += ecapnp
  757. pkg_ecapnp_name = ecapnp
  758. pkg_ecapnp_description = Cap'n Proto library for Erlang
  759. pkg_ecapnp_homepage = https://github.com/kaos/ecapnp
  760. pkg_ecapnp_fetch = git
  761. pkg_ecapnp_repo = https://github.com/kaos/ecapnp
  762. pkg_ecapnp_commit = master
  763. PACKAGES += econfig
  764. pkg_econfig_name = econfig
  765. pkg_econfig_description = simple Erlang config handler using INI files
  766. pkg_econfig_homepage = https://github.com/benoitc/econfig
  767. pkg_econfig_fetch = git
  768. pkg_econfig_repo = https://github.com/benoitc/econfig
  769. pkg_econfig_commit = master
  770. PACKAGES += edate
  771. pkg_edate_name = edate
  772. pkg_edate_description = date manipulation library for erlang
  773. pkg_edate_homepage = https://github.com/dweldon/edate
  774. pkg_edate_fetch = git
  775. pkg_edate_repo = https://github.com/dweldon/edate
  776. pkg_edate_commit = master
  777. PACKAGES += edgar
  778. pkg_edgar_name = edgar
  779. pkg_edgar_description = Erlang Does GNU AR
  780. pkg_edgar_homepage = https://github.com/crownedgrouse/edgar
  781. pkg_edgar_fetch = git
  782. pkg_edgar_repo = https://github.com/crownedgrouse/edgar
  783. pkg_edgar_commit = master
  784. PACKAGES += edns
  785. pkg_edns_name = edns
  786. pkg_edns_description = Erlang/OTP DNS server
  787. pkg_edns_homepage = https://github.com/hcvst/erlang-dns
  788. pkg_edns_fetch = git
  789. pkg_edns_repo = https://github.com/hcvst/erlang-dns
  790. pkg_edns_commit = master
  791. PACKAGES += edown
  792. pkg_edown_name = edown
  793. pkg_edown_description = EDoc extension for generating Github-flavored Markdown
  794. pkg_edown_homepage = https://github.com/uwiger/edown
  795. pkg_edown_fetch = git
  796. pkg_edown_repo = https://github.com/uwiger/edown
  797. pkg_edown_commit = master
  798. PACKAGES += eep
  799. pkg_eep_name = eep
  800. pkg_eep_description = Erlang Easy Profiling (eep) application provides a way to analyze application performance and call hierarchy
  801. pkg_eep_homepage = https://github.com/virtan/eep
  802. pkg_eep_fetch = git
  803. pkg_eep_repo = https://github.com/virtan/eep
  804. pkg_eep_commit = master
  805. PACKAGES += eep_app
  806. pkg_eep_app_name = eep_app
  807. pkg_eep_app_description = Embedded Event Processing
  808. pkg_eep_app_homepage = https://github.com/darach/eep-erl
  809. pkg_eep_app_fetch = git
  810. pkg_eep_app_repo = https://github.com/darach/eep-erl
  811. pkg_eep_app_commit = master
  812. PACKAGES += efene
  813. pkg_efene_name = efene
  814. pkg_efene_description = Alternative syntax for the Erlang Programming Language focusing on simplicity, ease of use and programmer UX
  815. pkg_efene_homepage = https://github.com/efene/efene
  816. pkg_efene_fetch = git
  817. pkg_efene_repo = https://github.com/efene/efene
  818. pkg_efene_commit = master
  819. PACKAGES += egeoip
  820. pkg_egeoip_name = egeoip
  821. pkg_egeoip_description = Erlang IP Geolocation module, currently supporting the MaxMind GeoLite City Database.
  822. pkg_egeoip_homepage = https://github.com/mochi/egeoip
  823. pkg_egeoip_fetch = git
  824. pkg_egeoip_repo = https://github.com/mochi/egeoip
  825. pkg_egeoip_commit = master
  826. PACKAGES += ehsa
  827. pkg_ehsa_name = ehsa
  828. pkg_ehsa_description = Erlang HTTP server basic and digest authentication modules
  829. pkg_ehsa_homepage = https://github.com/a12n/ehsa
  830. pkg_ehsa_fetch = git
  831. pkg_ehsa_repo = https://github.com/a12n/ehsa
  832. pkg_ehsa_commit = master
  833. PACKAGES += ej
  834. pkg_ej_name = ej
  835. pkg_ej_description = Helper module for working with Erlang terms representing JSON
  836. pkg_ej_homepage = https://github.com/seth/ej
  837. pkg_ej_fetch = git
  838. pkg_ej_repo = https://github.com/seth/ej
  839. pkg_ej_commit = master
  840. PACKAGES += ejabberd
  841. pkg_ejabberd_name = ejabberd
  842. pkg_ejabberd_description = Robust, ubiquitous and massively scalable Jabber / XMPP Instant Messaging platform
  843. pkg_ejabberd_homepage = https://github.com/processone/ejabberd
  844. pkg_ejabberd_fetch = git
  845. pkg_ejabberd_repo = https://github.com/processone/ejabberd
  846. pkg_ejabberd_commit = master
  847. PACKAGES += ejwt
  848. pkg_ejwt_name = ejwt
  849. pkg_ejwt_description = erlang library for JSON Web Token
  850. pkg_ejwt_homepage = https://github.com/artefactop/ejwt
  851. pkg_ejwt_fetch = git
  852. pkg_ejwt_repo = https://github.com/artefactop/ejwt
  853. pkg_ejwt_commit = master
  854. PACKAGES += ekaf
  855. pkg_ekaf_name = ekaf
  856. pkg_ekaf_description = A minimal, high-performance Kafka client in Erlang.
  857. pkg_ekaf_homepage = https://github.com/helpshift/ekaf
  858. pkg_ekaf_fetch = git
  859. pkg_ekaf_repo = https://github.com/helpshift/ekaf
  860. pkg_ekaf_commit = master
  861. PACKAGES += elarm
  862. pkg_elarm_name = elarm
  863. pkg_elarm_description = Alarm Manager for Erlang.
  864. pkg_elarm_homepage = https://github.com/esl/elarm
  865. pkg_elarm_fetch = git
  866. pkg_elarm_repo = https://github.com/esl/elarm
  867. pkg_elarm_commit = master
  868. PACKAGES += eleveldb
  869. pkg_eleveldb_name = eleveldb
  870. pkg_eleveldb_description = Erlang LevelDB API
  871. pkg_eleveldb_homepage = https://github.com/basho/eleveldb
  872. pkg_eleveldb_fetch = git
  873. pkg_eleveldb_repo = https://github.com/basho/eleveldb
  874. pkg_eleveldb_commit = develop
  875. PACKAGES += elixir
  876. pkg_elixir_name = elixir
  877. pkg_elixir_description = Elixir is a dynamic, functional language designed for building scalable and maintainable applications
  878. pkg_elixir_homepage = https://elixir-lang.org/
  879. pkg_elixir_fetch = git
  880. pkg_elixir_repo = https://github.com/elixir-lang/elixir
  881. pkg_elixir_commit = main
  882. PACKAGES += elli
  883. pkg_elli_name = elli
  884. pkg_elli_description = Simple, robust and performant Erlang web server
  885. pkg_elli_homepage = https://github.com/elli-lib/elli
  886. pkg_elli_fetch = git
  887. pkg_elli_repo = https://github.com/elli-lib/elli
  888. pkg_elli_commit = main
  889. PACKAGES += elvis
  890. pkg_elvis_name = elvis
  891. pkg_elvis_description = Erlang Style Reviewer
  892. pkg_elvis_homepage = https://github.com/inaka/elvis
  893. pkg_elvis_fetch = git
  894. pkg_elvis_repo = https://github.com/inaka/elvis
  895. pkg_elvis_commit = master
  896. PACKAGES += emagick
  897. pkg_emagick_name = emagick
  898. pkg_emagick_description = Wrapper for Graphics/ImageMagick command line tool.
  899. pkg_emagick_homepage = https://github.com/kivra/emagick
  900. pkg_emagick_fetch = git
  901. pkg_emagick_repo = https://github.com/kivra/emagick
  902. pkg_emagick_commit = master
  903. PACKAGES += enm
  904. pkg_enm_name = enm
  905. pkg_enm_description = Erlang driver for nanomsg
  906. pkg_enm_homepage = https://github.com/basho/enm
  907. pkg_enm_fetch = git
  908. pkg_enm_repo = https://github.com/basho/enm
  909. pkg_enm_commit = master
  910. PACKAGES += entop
  911. pkg_entop_name = entop
  912. pkg_entop_description = A top-like tool for monitoring an Erlang node
  913. pkg_entop_homepage = https://github.com/mazenharake/entop
  914. pkg_entop_fetch = git
  915. pkg_entop_repo = https://github.com/mazenharake/entop
  916. pkg_entop_commit = master
  917. PACKAGES += epcap
  918. pkg_epcap_name = epcap
  919. pkg_epcap_description = Erlang packet capture interface using pcap
  920. pkg_epcap_homepage = https://github.com/msantos/epcap
  921. pkg_epcap_fetch = git
  922. pkg_epcap_repo = https://github.com/msantos/epcap
  923. pkg_epcap_commit = master
  924. PACKAGES += eper
  925. pkg_eper_name = eper
  926. pkg_eper_description = Erlang performance and debugging tools.
  927. pkg_eper_homepage = https://github.com/massemanet/eper
  928. pkg_eper_fetch = git
  929. pkg_eper_repo = https://github.com/massemanet/eper
  930. pkg_eper_commit = master
  931. PACKAGES += epgsql
  932. pkg_epgsql_name = epgsql
  933. pkg_epgsql_description = Erlang PostgreSQL client library.
  934. pkg_epgsql_homepage = https://github.com/epgsql/epgsql
  935. pkg_epgsql_fetch = git
  936. pkg_epgsql_repo = https://github.com/epgsql/epgsql
  937. pkg_epgsql_commit = master
  938. PACKAGES += episcina
  939. pkg_episcina_name = episcina
  940. pkg_episcina_description = A simple non intrusive resource pool for connections
  941. pkg_episcina_homepage = https://github.com/erlware/episcina
  942. pkg_episcina_fetch = git
  943. pkg_episcina_repo = https://github.com/erlware/episcina
  944. pkg_episcina_commit = master
  945. PACKAGES += eplot
  946. pkg_eplot_name = eplot
  947. pkg_eplot_description = A plot engine written in erlang.
  948. pkg_eplot_homepage = https://github.com/psyeugenic/eplot
  949. pkg_eplot_fetch = git
  950. pkg_eplot_repo = https://github.com/psyeugenic/eplot
  951. pkg_eplot_commit = master
  952. PACKAGES += epocxy
  953. pkg_epocxy_name = epocxy
  954. pkg_epocxy_description = Erlang Patterns of Concurrency
  955. pkg_epocxy_homepage = https://github.com/duomark/epocxy
  956. pkg_epocxy_fetch = git
  957. pkg_epocxy_repo = https://github.com/duomark/epocxy
  958. pkg_epocxy_commit = master
  959. PACKAGES += epubnub
  960. pkg_epubnub_name = epubnub
  961. pkg_epubnub_description = Erlang PubNub API
  962. pkg_epubnub_homepage = https://github.com/tsloughter/epubnub
  963. pkg_epubnub_fetch = git
  964. pkg_epubnub_repo = https://github.com/tsloughter/epubnub
  965. pkg_epubnub_commit = master
  966. PACKAGES += eqm
  967. pkg_eqm_name = eqm
  968. pkg_eqm_description = Erlang pub sub with supply-demand channels
  969. pkg_eqm_homepage = https://github.com/loucash/eqm
  970. pkg_eqm_fetch = git
  971. pkg_eqm_repo = https://github.com/loucash/eqm
  972. pkg_eqm_commit = master
  973. PACKAGES += eredis
  974. pkg_eredis_name = eredis
  975. pkg_eredis_description = Erlang Redis client
  976. pkg_eredis_homepage = https://github.com/wooga/eredis
  977. pkg_eredis_fetch = git
  978. pkg_eredis_repo = https://github.com/wooga/eredis
  979. pkg_eredis_commit = master
  980. PACKAGES += erl_streams
  981. pkg_erl_streams_name = erl_streams
  982. pkg_erl_streams_description = Streams in Erlang
  983. pkg_erl_streams_homepage = https://github.com/epappas/erl_streams
  984. pkg_erl_streams_fetch = git
  985. pkg_erl_streams_repo = https://github.com/epappas/erl_streams
  986. pkg_erl_streams_commit = master
  987. PACKAGES += erlang_localtime
  988. pkg_erlang_localtime_name = erlang_localtime
  989. pkg_erlang_localtime_description = Erlang library for conversion from one local time to another
  990. pkg_erlang_localtime_homepage = https://github.com/dmitryme/erlang_localtime
  991. pkg_erlang_localtime_fetch = git
  992. pkg_erlang_localtime_repo = https://github.com/dmitryme/erlang_localtime
  993. pkg_erlang_localtime_commit = master
  994. PACKAGES += erlang_smtp
  995. pkg_erlang_smtp_name = erlang_smtp
  996. pkg_erlang_smtp_description = Erlang SMTP and POP3 server code.
  997. pkg_erlang_smtp_homepage = https://github.com/tonyg/erlang-smtp
  998. pkg_erlang_smtp_fetch = git
  999. pkg_erlang_smtp_repo = https://github.com/tonyg/erlang-smtp
  1000. pkg_erlang_smtp_commit = master
  1001. PACKAGES += erlang_term
  1002. pkg_erlang_term_name = erlang_term
  1003. pkg_erlang_term_description = Erlang Term Info
  1004. pkg_erlang_term_homepage = https://github.com/okeuday/erlang_term
  1005. pkg_erlang_term_fetch = git
  1006. pkg_erlang_term_repo = https://github.com/okeuday/erlang_term
  1007. pkg_erlang_term_commit = master
  1008. PACKAGES += erlastic_search
  1009. pkg_erlastic_search_name = erlastic_search
  1010. pkg_erlastic_search_description = An Erlang app for communicating with Elastic Search's rest interface.
  1011. pkg_erlastic_search_homepage = https://github.com/tsloughter/erlastic_search
  1012. pkg_erlastic_search_fetch = git
  1013. pkg_erlastic_search_repo = https://github.com/tsloughter/erlastic_search
  1014. pkg_erlastic_search_commit = master
  1015. PACKAGES += erlbrake
  1016. pkg_erlbrake_name = erlbrake
  1017. pkg_erlbrake_description = Erlang Airbrake notification client
  1018. pkg_erlbrake_homepage = https://github.com/kenpratt/erlbrake
  1019. pkg_erlbrake_fetch = git
  1020. pkg_erlbrake_repo = https://github.com/kenpratt/erlbrake
  1021. pkg_erlbrake_commit = master
  1022. PACKAGES += erlcloud
  1023. pkg_erlcloud_name = erlcloud
  1024. pkg_erlcloud_description = Cloud Computing library for erlang (Amazon EC2, S3, SQS, SimpleDB, Mechanical Turk, ELB)
  1025. pkg_erlcloud_homepage = https://github.com/gleber/erlcloud
  1026. pkg_erlcloud_fetch = git
  1027. pkg_erlcloud_repo = https://github.com/gleber/erlcloud
  1028. pkg_erlcloud_commit = master
  1029. PACKAGES += erlcron
  1030. pkg_erlcron_name = erlcron
  1031. pkg_erlcron_description = Erlang cronish system
  1032. pkg_erlcron_homepage = https://github.com/erlware/erlcron
  1033. pkg_erlcron_fetch = git
  1034. pkg_erlcron_repo = https://github.com/erlware/erlcron
  1035. pkg_erlcron_commit = master
  1036. PACKAGES += erldb
  1037. pkg_erldb_name = erldb
  1038. pkg_erldb_description = ORM (Object-relational mapping) application implemented in Erlang
  1039. pkg_erldb_homepage = http://erldb.org
  1040. pkg_erldb_fetch = git
  1041. pkg_erldb_repo = https://github.com/erldb/erldb
  1042. pkg_erldb_commit = master
  1043. PACKAGES += erldis
  1044. pkg_erldis_name = erldis
  1045. pkg_erldis_description = redis erlang client library
  1046. pkg_erldis_homepage = https://github.com/cstar/erldis
  1047. pkg_erldis_fetch = git
  1048. pkg_erldis_repo = https://github.com/cstar/erldis
  1049. pkg_erldis_commit = master
  1050. PACKAGES += erldns
  1051. pkg_erldns_name = erldns
  1052. pkg_erldns_description = DNS server, in erlang.
  1053. pkg_erldns_homepage = https://github.com/aetrion/erl-dns
  1054. pkg_erldns_fetch = git
  1055. pkg_erldns_repo = https://github.com/aetrion/erl-dns
  1056. pkg_erldns_commit = main
  1057. PACKAGES += erldocker
  1058. pkg_erldocker_name = erldocker
  1059. pkg_erldocker_description = Docker Remote API client for Erlang
  1060. pkg_erldocker_homepage = https://github.com/proger/erldocker
  1061. pkg_erldocker_fetch = git
  1062. pkg_erldocker_repo = https://github.com/proger/erldocker
  1063. pkg_erldocker_commit = master
  1064. PACKAGES += erlfsmon
  1065. pkg_erlfsmon_name = erlfsmon
  1066. pkg_erlfsmon_description = Erlang filesystem event watcher for Linux and OSX
  1067. pkg_erlfsmon_homepage = https://github.com/proger/erlfsmon
  1068. pkg_erlfsmon_fetch = git
  1069. pkg_erlfsmon_repo = https://github.com/proger/erlfsmon
  1070. pkg_erlfsmon_commit = master
  1071. PACKAGES += erlgit
  1072. pkg_erlgit_name = erlgit
  1073. pkg_erlgit_description = Erlang convenience wrapper around git executable
  1074. pkg_erlgit_homepage = https://github.com/gleber/erlgit
  1075. pkg_erlgit_fetch = git
  1076. pkg_erlgit_repo = https://github.com/gleber/erlgit
  1077. pkg_erlgit_commit = master
  1078. PACKAGES += erlguten
  1079. pkg_erlguten_name = erlguten
  1080. pkg_erlguten_description = ErlGuten is a system for high-quality typesetting, written purely in Erlang.
  1081. pkg_erlguten_homepage = https://github.com/richcarl/erlguten
  1082. pkg_erlguten_fetch = git
  1083. pkg_erlguten_repo = https://github.com/richcarl/erlguten
  1084. pkg_erlguten_commit = master
  1085. PACKAGES += erlmc
  1086. pkg_erlmc_name = erlmc
  1087. pkg_erlmc_description = Erlang memcached binary protocol client
  1088. pkg_erlmc_homepage = https://github.com/jkvor/erlmc
  1089. pkg_erlmc_fetch = git
  1090. pkg_erlmc_repo = https://github.com/jkvor/erlmc
  1091. pkg_erlmc_commit = master
  1092. PACKAGES += erlmongo
  1093. pkg_erlmongo_name = erlmongo
  1094. pkg_erlmongo_description = Record based Erlang driver for MongoDB with gridfs support
  1095. pkg_erlmongo_homepage = https://github.com/SergejJurecko/erlmongo
  1096. pkg_erlmongo_fetch = git
  1097. pkg_erlmongo_repo = https://github.com/SergejJurecko/erlmongo
  1098. pkg_erlmongo_commit = master
  1099. PACKAGES += erlog
  1100. pkg_erlog_name = erlog
  1101. pkg_erlog_description = Prolog interpreter in and for Erlang
  1102. pkg_erlog_homepage = https://github.com/rvirding/erlog
  1103. pkg_erlog_fetch = git
  1104. pkg_erlog_repo = https://github.com/rvirding/erlog
  1105. pkg_erlog_commit = master
  1106. PACKAGES += erlpass
  1107. pkg_erlpass_name = erlpass
  1108. pkg_erlpass_description = A library to handle password hashing and changing in a safe manner, independent from any kind of storage whatsoever.
  1109. pkg_erlpass_homepage = https://github.com/ferd/erlpass
  1110. pkg_erlpass_fetch = git
  1111. pkg_erlpass_repo = https://github.com/ferd/erlpass
  1112. pkg_erlpass_commit = master
  1113. PACKAGES += erlsh
  1114. pkg_erlsh_name = erlsh
  1115. pkg_erlsh_description = Erlang shell tools
  1116. pkg_erlsh_homepage = https://github.com/proger/erlsh
  1117. pkg_erlsh_fetch = git
  1118. pkg_erlsh_repo = https://github.com/proger/erlsh
  1119. pkg_erlsh_commit = master
  1120. PACKAGES += erlsha2
  1121. pkg_erlsha2_name = erlsha2
  1122. pkg_erlsha2_description = SHA-224, SHA-256, SHA-384, SHA-512 implemented in Erlang NIFs.
  1123. pkg_erlsha2_homepage = https://github.com/vinoski/erlsha2
  1124. pkg_erlsha2_fetch = git
  1125. pkg_erlsha2_repo = https://github.com/vinoski/erlsha2
  1126. pkg_erlsha2_commit = master
  1127. PACKAGES += erlsom
  1128. pkg_erlsom_name = erlsom
  1129. pkg_erlsom_description = XML parser for Erlang
  1130. pkg_erlsom_homepage = https://github.com/willemdj/erlsom
  1131. pkg_erlsom_fetch = git
  1132. pkg_erlsom_repo = https://github.com/willemdj/erlsom
  1133. pkg_erlsom_commit = master
  1134. PACKAGES += erlubi
  1135. pkg_erlubi_name = erlubi
  1136. pkg_erlubi_description = Ubigraph Erlang Client (and Process Visualizer)
  1137. pkg_erlubi_homepage = https://github.com/krestenkrab/erlubi
  1138. pkg_erlubi_fetch = git
  1139. pkg_erlubi_repo = https://github.com/krestenkrab/erlubi
  1140. pkg_erlubi_commit = master
  1141. PACKAGES += erlvolt
  1142. pkg_erlvolt_name = erlvolt
  1143. pkg_erlvolt_description = VoltDB Erlang Client Driver
  1144. pkg_erlvolt_homepage = https://github.com/VoltDB/voltdb-client-erlang
  1145. pkg_erlvolt_fetch = git
  1146. pkg_erlvolt_repo = https://github.com/VoltDB/voltdb-client-erlang
  1147. pkg_erlvolt_commit = master
  1148. PACKAGES += erlware_commons
  1149. pkg_erlware_commons_name = erlware_commons
  1150. pkg_erlware_commons_description = Erlware Commons is an Erlware project focused on all aspects of reusable Erlang components.
  1151. pkg_erlware_commons_homepage = https://github.com/erlware/erlware_commons
  1152. pkg_erlware_commons_fetch = git
  1153. pkg_erlware_commons_repo = https://github.com/erlware/erlware_commons
  1154. pkg_erlware_commons_commit = master
  1155. PACKAGES += erlydtl
  1156. pkg_erlydtl_name = erlydtl
  1157. pkg_erlydtl_description = Django Template Language for Erlang.
  1158. pkg_erlydtl_homepage = https://github.com/erlydtl/erlydtl
  1159. pkg_erlydtl_fetch = git
  1160. pkg_erlydtl_repo = https://github.com/erlydtl/erlydtl
  1161. pkg_erlydtl_commit = master
  1162. PACKAGES += errd
  1163. pkg_errd_name = errd
  1164. pkg_errd_description = Erlang RRDTool library
  1165. pkg_errd_homepage = https://github.com/archaelus/errd
  1166. pkg_errd_fetch = git
  1167. pkg_errd_repo = https://github.com/archaelus/errd
  1168. pkg_errd_commit = master
  1169. PACKAGES += erserve
  1170. pkg_erserve_name = erserve
  1171. pkg_erserve_description = Erlang/Rserve communication interface
  1172. pkg_erserve_homepage = https://github.com/del/erserve
  1173. pkg_erserve_fetch = git
  1174. pkg_erserve_repo = https://github.com/del/erserve
  1175. pkg_erserve_commit = master
  1176. PACKAGES += escalus
  1177. pkg_escalus_name = escalus
  1178. pkg_escalus_description = An XMPP client library in Erlang for conveniently testing XMPP servers
  1179. pkg_escalus_homepage = https://github.com/esl/escalus
  1180. pkg_escalus_fetch = git
  1181. pkg_escalus_repo = https://github.com/esl/escalus
  1182. pkg_escalus_commit = master
  1183. PACKAGES += esh_mk
  1184. pkg_esh_mk_name = esh_mk
  1185. pkg_esh_mk_description = esh template engine plugin for erlang.mk
  1186. pkg_esh_mk_homepage = https://github.com/crownedgrouse/esh.mk
  1187. pkg_esh_mk_fetch = git
  1188. pkg_esh_mk_repo = https://github.com/crownedgrouse/esh.mk.git
  1189. pkg_esh_mk_commit = master
  1190. PACKAGES += espec
  1191. pkg_espec_name = espec
  1192. pkg_espec_description = ESpec: Behaviour driven development framework for Erlang
  1193. pkg_espec_homepage = https://github.com/lucaspiller/espec
  1194. pkg_espec_fetch = git
  1195. pkg_espec_repo = https://github.com/lucaspiller/espec
  1196. pkg_espec_commit = master
  1197. PACKAGES += estatsd
  1198. pkg_estatsd_name = estatsd
  1199. pkg_estatsd_description = Erlang stats aggregation app that periodically flushes data to graphite
  1200. pkg_estatsd_homepage = https://github.com/RJ/estatsd
  1201. pkg_estatsd_fetch = git
  1202. pkg_estatsd_repo = https://github.com/RJ/estatsd
  1203. pkg_estatsd_commit = master
  1204. PACKAGES += etap
  1205. pkg_etap_name = etap
  1206. pkg_etap_description = etap is a simple erlang testing library that provides TAP compliant output.
  1207. pkg_etap_homepage = https://github.com/ngerakines/etap
  1208. pkg_etap_fetch = git
  1209. pkg_etap_repo = https://github.com/ngerakines/etap
  1210. pkg_etap_commit = master
  1211. PACKAGES += etest
  1212. pkg_etest_name = etest
  1213. pkg_etest_description = A lightweight, convention over configuration test framework for Erlang
  1214. pkg_etest_homepage = https://github.com/wooga/etest
  1215. pkg_etest_fetch = git
  1216. pkg_etest_repo = https://github.com/wooga/etest
  1217. pkg_etest_commit = master
  1218. PACKAGES += etest_http
  1219. pkg_etest_http_name = etest_http
  1220. pkg_etest_http_description = etest Assertions around HTTP (client-side)
  1221. pkg_etest_http_homepage = https://github.com/wooga/etest_http
  1222. pkg_etest_http_fetch = git
  1223. pkg_etest_http_repo = https://github.com/wooga/etest_http
  1224. pkg_etest_http_commit = master
  1225. PACKAGES += etoml
  1226. pkg_etoml_name = etoml
  1227. pkg_etoml_description = TOML language erlang parser
  1228. pkg_etoml_homepage = https://github.com/kalta/etoml
  1229. pkg_etoml_fetch = git
  1230. pkg_etoml_repo = https://github.com/kalta/etoml
  1231. pkg_etoml_commit = master
  1232. PACKAGES += eunit
  1233. pkg_eunit_name = eunit
  1234. pkg_eunit_description = The EUnit lightweight unit testing framework for Erlang - this is the canonical development repository.
  1235. pkg_eunit_homepage = https://github.com/richcarl/eunit
  1236. pkg_eunit_fetch = git
  1237. pkg_eunit_repo = https://github.com/richcarl/eunit
  1238. pkg_eunit_commit = master
  1239. PACKAGES += eunit_formatters
  1240. pkg_eunit_formatters_name = eunit_formatters
  1241. pkg_eunit_formatters_description = Because eunit's output sucks. Let's make it better.
  1242. pkg_eunit_formatters_homepage = https://github.com/seancribbs/eunit_formatters
  1243. pkg_eunit_formatters_fetch = git
  1244. pkg_eunit_formatters_repo = https://github.com/seancribbs/eunit_formatters
  1245. pkg_eunit_formatters_commit = master
  1246. PACKAGES += euthanasia
  1247. pkg_euthanasia_name = euthanasia
  1248. pkg_euthanasia_description = Merciful killer for your Erlang processes
  1249. pkg_euthanasia_homepage = https://github.com/doubleyou/euthanasia
  1250. pkg_euthanasia_fetch = git
  1251. pkg_euthanasia_repo = https://github.com/doubleyou/euthanasia
  1252. pkg_euthanasia_commit = master
  1253. PACKAGES += evum
  1254. pkg_evum_name = evum
  1255. pkg_evum_description = Spawn Linux VMs as Erlang processes in the Erlang VM
  1256. pkg_evum_homepage = https://github.com/msantos/evum
  1257. pkg_evum_fetch = git
  1258. pkg_evum_repo = https://github.com/msantos/evum
  1259. pkg_evum_commit = master
  1260. PACKAGES += exec
  1261. pkg_exec_name = erlexec
  1262. pkg_exec_description = Execute and control OS processes from Erlang/OTP.
  1263. pkg_exec_homepage = http://saleyn.github.com/erlexec
  1264. pkg_exec_fetch = git
  1265. pkg_exec_repo = https://github.com/saleyn/erlexec
  1266. pkg_exec_commit = master
  1267. PACKAGES += exml
  1268. pkg_exml_name = exml
  1269. pkg_exml_description = XML parsing library in Erlang
  1270. pkg_exml_homepage = https://github.com/paulgray/exml
  1271. pkg_exml_fetch = git
  1272. pkg_exml_repo = https://github.com/paulgray/exml
  1273. pkg_exml_commit = master
  1274. PACKAGES += exometer
  1275. pkg_exometer_name = exometer
  1276. pkg_exometer_description = Basic measurement objects and probe behavior
  1277. pkg_exometer_homepage = https://github.com/Feuerlabs/exometer
  1278. pkg_exometer_fetch = git
  1279. pkg_exometer_repo = https://github.com/Feuerlabs/exometer
  1280. pkg_exometer_commit = master
  1281. PACKAGES += exs1024
  1282. pkg_exs1024_name = exs1024
  1283. pkg_exs1024_description = Xorshift1024star pseudo random number generator for Erlang.
  1284. pkg_exs1024_homepage = https://github.com/jj1bdx/exs1024
  1285. pkg_exs1024_fetch = git
  1286. pkg_exs1024_repo = https://github.com/jj1bdx/exs1024
  1287. pkg_exs1024_commit = master
  1288. PACKAGES += exsplus116
  1289. pkg_exsplus116_name = exsplus116
  1290. pkg_exsplus116_description = Xorshift116plus for Erlang
  1291. pkg_exsplus116_homepage = https://github.com/jj1bdx/exsplus116
  1292. pkg_exsplus116_fetch = git
  1293. pkg_exsplus116_repo = https://github.com/jj1bdx/exsplus116
  1294. pkg_exsplus116_commit = master
  1295. PACKAGES += ezmtp
  1296. pkg_ezmtp_name = ezmtp
  1297. pkg_ezmtp_description = ZMTP protocol in pure Erlang.
  1298. pkg_ezmtp_homepage = https://github.com/a13x/ezmtp
  1299. pkg_ezmtp_fetch = git
  1300. pkg_ezmtp_repo = https://github.com/a13x/ezmtp
  1301. pkg_ezmtp_commit = master
  1302. PACKAGES += fast_disk_log
  1303. pkg_fast_disk_log_name = fast_disk_log
  1304. pkg_fast_disk_log_description = Pool-based asynchronous Erlang disk logger
  1305. pkg_fast_disk_log_homepage = https://github.com/lpgauth/fast_disk_log
  1306. pkg_fast_disk_log_fetch = git
  1307. pkg_fast_disk_log_repo = https://github.com/lpgauth/fast_disk_log
  1308. pkg_fast_disk_log_commit = master
  1309. PACKAGES += feeder
  1310. pkg_feeder_name = feeder
  1311. pkg_feeder_description = Stream parse RSS and Atom formatted XML feeds.
  1312. pkg_feeder_homepage = https://github.com/michaelnisi/feeder
  1313. pkg_feeder_fetch = git
  1314. pkg_feeder_repo = https://github.com/michaelnisi/feeder
  1315. pkg_feeder_commit = master
  1316. PACKAGES += find_crate
  1317. pkg_find_crate_name = find_crate
  1318. pkg_find_crate_description = Find Rust libs and exes in Erlang application priv directory
  1319. pkg_find_crate_homepage = https://github.com/goertzenator/find_crate
  1320. pkg_find_crate_fetch = git
  1321. pkg_find_crate_repo = https://github.com/goertzenator/find_crate
  1322. pkg_find_crate_commit = master
  1323. PACKAGES += fix
  1324. pkg_fix_name = fix
  1325. pkg_fix_description = http://fixprotocol.org/ implementation.
  1326. pkg_fix_homepage = https://github.com/maxlapshin/fix
  1327. pkg_fix_fetch = git
  1328. pkg_fix_repo = https://github.com/maxlapshin/fix
  1329. pkg_fix_commit = master
  1330. PACKAGES += flower
  1331. pkg_flower_name = flower
  1332. pkg_flower_description = FlowER - a Erlang OpenFlow development platform
  1333. pkg_flower_homepage = https://github.com/travelping/flower
  1334. pkg_flower_fetch = git
  1335. pkg_flower_repo = https://github.com/travelping/flower
  1336. pkg_flower_commit = master
  1337. PACKAGES += fn
  1338. pkg_fn_name = fn
  1339. pkg_fn_description = Function utilities for Erlang
  1340. pkg_fn_homepage = https://github.com/reiddraper/fn
  1341. pkg_fn_fetch = git
  1342. pkg_fn_repo = https://github.com/reiddraper/fn
  1343. pkg_fn_commit = master
  1344. PACKAGES += folsom
  1345. pkg_folsom_name = folsom
  1346. pkg_folsom_description = Expose Erlang Events and Metrics
  1347. pkg_folsom_homepage = https://github.com/boundary/folsom
  1348. pkg_folsom_fetch = git
  1349. pkg_folsom_repo = https://github.com/boundary/folsom
  1350. pkg_folsom_commit = master
  1351. PACKAGES += folsom_cowboy
  1352. pkg_folsom_cowboy_name = folsom_cowboy
  1353. pkg_folsom_cowboy_description = A Cowboy based Folsom HTTP Wrapper.
  1354. pkg_folsom_cowboy_homepage = https://github.com/boundary/folsom_cowboy
  1355. pkg_folsom_cowboy_fetch = git
  1356. pkg_folsom_cowboy_repo = https://github.com/boundary/folsom_cowboy
  1357. pkg_folsom_cowboy_commit = master
  1358. PACKAGES += fs
  1359. pkg_fs_name = fs
  1360. pkg_fs_description = Erlang FileSystem Listener
  1361. pkg_fs_homepage = https://github.com/synrc/fs
  1362. pkg_fs_fetch = git
  1363. pkg_fs_repo = https://github.com/synrc/fs
  1364. pkg_fs_commit = master
  1365. PACKAGES += fuse
  1366. pkg_fuse_name = fuse
  1367. pkg_fuse_description = A Circuit Breaker for Erlang
  1368. pkg_fuse_homepage = https://github.com/jlouis/fuse
  1369. pkg_fuse_fetch = git
  1370. pkg_fuse_repo = https://github.com/jlouis/fuse
  1371. pkg_fuse_commit = master
  1372. PACKAGES += gcm
  1373. pkg_gcm_name = gcm
  1374. pkg_gcm_description = An Erlang application for Google Cloud Messaging
  1375. pkg_gcm_homepage = https://github.com/pdincau/gcm-erlang
  1376. pkg_gcm_fetch = git
  1377. pkg_gcm_repo = https://github.com/pdincau/gcm-erlang
  1378. pkg_gcm_commit = master
  1379. PACKAGES += gcprof
  1380. pkg_gcprof_name = gcprof
  1381. pkg_gcprof_description = Garbage Collection profiler for Erlang
  1382. pkg_gcprof_homepage = https://github.com/knutin/gcprof
  1383. pkg_gcprof_fetch = git
  1384. pkg_gcprof_repo = https://github.com/knutin/gcprof
  1385. pkg_gcprof_commit = master
  1386. PACKAGES += geas
  1387. pkg_geas_name = geas
  1388. pkg_geas_description = Guess Erlang Application Scattering
  1389. pkg_geas_homepage = https://github.com/crownedgrouse/geas
  1390. pkg_geas_fetch = git
  1391. pkg_geas_repo = https://github.com/crownedgrouse/geas
  1392. pkg_geas_commit = master
  1393. PACKAGES += geef
  1394. pkg_geef_name = geef
  1395. pkg_geef_description = Git NEEEEF (Erlang NIF)
  1396. pkg_geef_homepage = https://github.com/carlosmn/geef
  1397. pkg_geef_fetch = git
  1398. pkg_geef_repo = https://github.com/carlosmn/geef
  1399. pkg_geef_commit = master
  1400. PACKAGES += gen_coap
  1401. pkg_gen_coap_name = gen_coap
  1402. pkg_gen_coap_description = Generic Erlang CoAP Client/Server
  1403. pkg_gen_coap_homepage = https://github.com/gotthardp/gen_coap
  1404. pkg_gen_coap_fetch = git
  1405. pkg_gen_coap_repo = https://github.com/gotthardp/gen_coap
  1406. pkg_gen_coap_commit = master
  1407. PACKAGES += gen_cycle
  1408. pkg_gen_cycle_name = gen_cycle
  1409. pkg_gen_cycle_description = Simple, generic OTP behaviour for recurring tasks
  1410. pkg_gen_cycle_homepage = https://github.com/aerosol/gen_cycle
  1411. pkg_gen_cycle_fetch = git
  1412. pkg_gen_cycle_repo = https://github.com/aerosol/gen_cycle
  1413. pkg_gen_cycle_commit = develop
  1414. PACKAGES += gen_icmp
  1415. pkg_gen_icmp_name = gen_icmp
  1416. pkg_gen_icmp_description = Erlang interface to ICMP sockets
  1417. pkg_gen_icmp_homepage = https://github.com/msantos/gen_icmp
  1418. pkg_gen_icmp_fetch = git
  1419. pkg_gen_icmp_repo = https://github.com/msantos/gen_icmp
  1420. pkg_gen_icmp_commit = master
  1421. PACKAGES += gen_leader
  1422. pkg_gen_leader_name = gen_leader
  1423. pkg_gen_leader_description = leader election behavior
  1424. pkg_gen_leader_homepage = https://github.com/garret-smith/gen_leader_revival
  1425. pkg_gen_leader_fetch = git
  1426. pkg_gen_leader_repo = https://github.com/garret-smith/gen_leader_revival
  1427. pkg_gen_leader_commit = master
  1428. PACKAGES += gen_nb_server
  1429. pkg_gen_nb_server_name = gen_nb_server
  1430. pkg_gen_nb_server_description = OTP behavior for writing non-blocking servers
  1431. pkg_gen_nb_server_homepage = https://github.com/kevsmith/gen_nb_server
  1432. pkg_gen_nb_server_fetch = git
  1433. pkg_gen_nb_server_repo = https://github.com/kevsmith/gen_nb_server
  1434. pkg_gen_nb_server_commit = master
  1435. PACKAGES += gen_paxos
  1436. pkg_gen_paxos_name = gen_paxos
  1437. pkg_gen_paxos_description = An Erlang/OTP-style implementation of the PAXOS distributed consensus protocol
  1438. pkg_gen_paxos_homepage = https://github.com/gburd/gen_paxos
  1439. pkg_gen_paxos_fetch = git
  1440. pkg_gen_paxos_repo = https://github.com/gburd/gen_paxos
  1441. pkg_gen_paxos_commit = master
  1442. PACKAGES += gen_rpc
  1443. pkg_gen_rpc_name = gen_rpc
  1444. pkg_gen_rpc_description = A scalable RPC library for Erlang-VM based languages
  1445. pkg_gen_rpc_homepage = https://github.com/priestjim/gen_rpc.git
  1446. pkg_gen_rpc_fetch = git
  1447. pkg_gen_rpc_repo = https://github.com/priestjim/gen_rpc.git
  1448. pkg_gen_rpc_commit = master
  1449. PACKAGES += gen_smtp
  1450. pkg_gen_smtp_name = gen_smtp
  1451. pkg_gen_smtp_description = A generic Erlang SMTP server and client that can be extended via callback modules
  1452. pkg_gen_smtp_homepage = https://github.com/Vagabond/gen_smtp
  1453. pkg_gen_smtp_fetch = git
  1454. pkg_gen_smtp_repo = https://github.com/Vagabond/gen_smtp
  1455. pkg_gen_smtp_commit = master
  1456. PACKAGES += gen_tracker
  1457. pkg_gen_tracker_name = gen_tracker
  1458. pkg_gen_tracker_description = supervisor with ets handling of children and their metadata
  1459. pkg_gen_tracker_homepage = https://github.com/erlyvideo/gen_tracker
  1460. pkg_gen_tracker_fetch = git
  1461. pkg_gen_tracker_repo = https://github.com/erlyvideo/gen_tracker
  1462. pkg_gen_tracker_commit = master
  1463. PACKAGES += gen_unix
  1464. pkg_gen_unix_name = gen_unix
  1465. pkg_gen_unix_description = Erlang Unix socket interface
  1466. pkg_gen_unix_homepage = https://github.com/msantos/gen_unix
  1467. pkg_gen_unix_fetch = git
  1468. pkg_gen_unix_repo = https://github.com/msantos/gen_unix
  1469. pkg_gen_unix_commit = master
  1470. PACKAGES += geode
  1471. pkg_geode_name = geode
  1472. pkg_geode_description = geohash/proximity lookup in pure, uncut erlang.
  1473. pkg_geode_homepage = https://github.com/bradfordw/geode
  1474. pkg_geode_fetch = git
  1475. pkg_geode_repo = https://github.com/bradfordw/geode
  1476. pkg_geode_commit = master
  1477. PACKAGES += getopt
  1478. pkg_getopt_name = getopt
  1479. pkg_getopt_description = Module to parse command line arguments using the GNU getopt syntax
  1480. pkg_getopt_homepage = https://github.com/jcomellas/getopt
  1481. pkg_getopt_fetch = git
  1482. pkg_getopt_repo = https://github.com/jcomellas/getopt
  1483. pkg_getopt_commit = master
  1484. PACKAGES += gettext
  1485. pkg_gettext_name = gettext
  1486. pkg_gettext_description = Erlang internationalization library.
  1487. pkg_gettext_homepage = https://github.com/etnt/gettext
  1488. pkg_gettext_fetch = git
  1489. pkg_gettext_repo = https://github.com/etnt/gettext
  1490. pkg_gettext_commit = master
  1491. PACKAGES += giallo
  1492. pkg_giallo_name = giallo
  1493. pkg_giallo_description = Small and flexible web framework on top of Cowboy
  1494. pkg_giallo_homepage = https://github.com/kivra/giallo
  1495. pkg_giallo_fetch = git
  1496. pkg_giallo_repo = https://github.com/kivra/giallo
  1497. pkg_giallo_commit = master
  1498. PACKAGES += gin
  1499. pkg_gin_name = gin
  1500. pkg_gin_description = The guards and for Erlang parse_transform
  1501. pkg_gin_homepage = https://github.com/mad-cocktail/gin
  1502. pkg_gin_fetch = git
  1503. pkg_gin_repo = https://github.com/mad-cocktail/gin
  1504. pkg_gin_commit = master
  1505. PACKAGES += gitty
  1506. pkg_gitty_name = gitty
  1507. pkg_gitty_description = Git access in erlang
  1508. pkg_gitty_homepage = https://github.com/maxlapshin/gitty
  1509. pkg_gitty_fetch = git
  1510. pkg_gitty_repo = https://github.com/maxlapshin/gitty
  1511. pkg_gitty_commit = master
  1512. PACKAGES += gpb
  1513. pkg_gpb_name = gpb
  1514. pkg_gpb_description = A Google Protobuf implementation for Erlang
  1515. pkg_gpb_homepage = https://github.com/tomas-abrahamsson/gpb
  1516. pkg_gpb_fetch = git
  1517. pkg_gpb_repo = https://github.com/tomas-abrahamsson/gpb
  1518. pkg_gpb_commit = master
  1519. PACKAGES += gproc
  1520. pkg_gproc_name = gproc
  1521. pkg_gproc_description = Extended process registry for Erlang
  1522. pkg_gproc_homepage = https://github.com/uwiger/gproc
  1523. pkg_gproc_fetch = git
  1524. pkg_gproc_repo = https://github.com/uwiger/gproc
  1525. pkg_gproc_commit = master
  1526. PACKAGES += grapherl
  1527. pkg_grapherl_name = grapherl
  1528. pkg_grapherl_description = Create graphs of Erlang systems and programs
  1529. pkg_grapherl_homepage = https://github.com/eproxus/grapherl
  1530. pkg_grapherl_fetch = git
  1531. pkg_grapherl_repo = https://github.com/eproxus/grapherl
  1532. pkg_grapherl_commit = master
  1533. PACKAGES += grpc
  1534. pkg_grpc_name = grpc
  1535. pkg_grpc_description = gRPC server in Erlang
  1536. pkg_grpc_homepage = https://github.com/Bluehouse-Technology/grpc
  1537. pkg_grpc_fetch = git
  1538. pkg_grpc_repo = https://github.com/Bluehouse-Technology/grpc
  1539. pkg_grpc_commit = master
  1540. PACKAGES += grpc_client
  1541. pkg_grpc_client_name = grpc_client
  1542. pkg_grpc_client_description = gRPC client in Erlang
  1543. pkg_grpc_client_homepage = https://github.com/Bluehouse-Technology/grpc_client
  1544. pkg_grpc_client_fetch = git
  1545. pkg_grpc_client_repo = https://github.com/Bluehouse-Technology/grpc_client
  1546. pkg_grpc_client_commit = master
  1547. PACKAGES += gun
  1548. pkg_gun_name = gun
  1549. pkg_gun_description = Asynchronous SPDY, HTTP and Websocket client written in Erlang.
  1550. pkg_gun_homepage = http//ninenines.eu
  1551. pkg_gun_fetch = git
  1552. pkg_gun_repo = https://github.com/ninenines/gun
  1553. pkg_gun_commit = master
  1554. PACKAGES += hackney
  1555. pkg_hackney_name = hackney
  1556. pkg_hackney_description = simple HTTP client in Erlang
  1557. pkg_hackney_homepage = https://github.com/benoitc/hackney
  1558. pkg_hackney_fetch = git
  1559. pkg_hackney_repo = https://github.com/benoitc/hackney
  1560. pkg_hackney_commit = master
  1561. PACKAGES += hamcrest
  1562. pkg_hamcrest_name = hamcrest
  1563. pkg_hamcrest_description = Erlang port of Hamcrest
  1564. pkg_hamcrest_homepage = https://github.com/hyperthunk/hamcrest-erlang
  1565. pkg_hamcrest_fetch = git
  1566. pkg_hamcrest_repo = https://github.com/hyperthunk/hamcrest-erlang
  1567. pkg_hamcrest_commit = master
  1568. PACKAGES += hottub
  1569. pkg_hottub_name = hottub
  1570. pkg_hottub_description = Permanent Erlang Worker Pool
  1571. pkg_hottub_homepage = https://github.com/bfrog/hottub
  1572. pkg_hottub_fetch = git
  1573. pkg_hottub_repo = https://github.com/bfrog/hottub
  1574. pkg_hottub_commit = master
  1575. PACKAGES += hpack
  1576. pkg_hpack_name = hpack
  1577. pkg_hpack_description = HPACK Implementation for Erlang
  1578. pkg_hpack_homepage = https://github.com/joedevivo/hpack
  1579. pkg_hpack_fetch = git
  1580. pkg_hpack_repo = https://github.com/joedevivo/hpack
  1581. pkg_hpack_commit = master
  1582. PACKAGES += hyper
  1583. pkg_hyper_name = hyper
  1584. pkg_hyper_description = Erlang implementation of HyperLogLog
  1585. pkg_hyper_homepage = https://github.com/GameAnalytics/hyper
  1586. pkg_hyper_fetch = git
  1587. pkg_hyper_repo = https://github.com/GameAnalytics/hyper
  1588. pkg_hyper_commit = master
  1589. PACKAGES += i18n
  1590. pkg_i18n_name = i18n
  1591. pkg_i18n_description = International components for unicode from Erlang (unicode, date, string, number, format, locale, localization, transliteration, icu4e)
  1592. pkg_i18n_homepage = https://github.com/erlang-unicode/i18n
  1593. pkg_i18n_fetch = git
  1594. pkg_i18n_repo = https://github.com/erlang-unicode/i18n
  1595. pkg_i18n_commit = master
  1596. PACKAGES += ibrowse
  1597. pkg_ibrowse_name = ibrowse
  1598. pkg_ibrowse_description = Erlang HTTP client
  1599. pkg_ibrowse_homepage = https://github.com/cmullaparthi/ibrowse
  1600. pkg_ibrowse_fetch = git
  1601. pkg_ibrowse_repo = https://github.com/cmullaparthi/ibrowse
  1602. pkg_ibrowse_commit = master
  1603. PACKAGES += idna
  1604. pkg_idna_name = idna
  1605. pkg_idna_description = Erlang IDNA lib
  1606. pkg_idna_homepage = https://github.com/benoitc/erlang-idna
  1607. pkg_idna_fetch = git
  1608. pkg_idna_repo = https://github.com/benoitc/erlang-idna
  1609. pkg_idna_commit = master
  1610. PACKAGES += irc_lib
  1611. pkg_irc_lib_name = irc_lib
  1612. pkg_irc_lib_description = Erlang irc client library
  1613. pkg_irc_lib_homepage = https://github.com/OtpChatBot/irc_lib
  1614. pkg_irc_lib_fetch = git
  1615. pkg_irc_lib_repo = https://github.com/OtpChatBot/irc_lib
  1616. pkg_irc_lib_commit = master
  1617. PACKAGES += ircd
  1618. pkg_ircd_name = ircd
  1619. pkg_ircd_description = A pluggable IRC daemon application/library for Erlang.
  1620. pkg_ircd_homepage = https://github.com/tonyg/erlang-ircd
  1621. pkg_ircd_fetch = git
  1622. pkg_ircd_repo = https://github.com/tonyg/erlang-ircd
  1623. pkg_ircd_commit = master
  1624. PACKAGES += iris
  1625. pkg_iris_name = iris
  1626. pkg_iris_description = Iris Erlang binding
  1627. pkg_iris_homepage = https://github.com/project-iris/iris-erl
  1628. pkg_iris_fetch = git
  1629. pkg_iris_repo = https://github.com/project-iris/iris-erl
  1630. pkg_iris_commit = master
  1631. PACKAGES += iso8601
  1632. pkg_iso8601_name = iso8601
  1633. pkg_iso8601_description = Erlang ISO 8601 date formatter/parser
  1634. pkg_iso8601_homepage = https://github.com/seansawyer/erlang_iso8601
  1635. pkg_iso8601_fetch = git
  1636. pkg_iso8601_repo = https://github.com/seansawyer/erlang_iso8601
  1637. pkg_iso8601_commit = master
  1638. PACKAGES += jamdb_sybase
  1639. pkg_jamdb_sybase_name = jamdb_sybase
  1640. pkg_jamdb_sybase_description = Erlang driver for SAP Sybase ASE
  1641. pkg_jamdb_sybase_homepage = https://github.com/erlangbureau/jamdb_sybase
  1642. pkg_jamdb_sybase_fetch = git
  1643. pkg_jamdb_sybase_repo = https://github.com/erlangbureau/jamdb_sybase
  1644. pkg_jamdb_sybase_commit = master
  1645. PACKAGES += jesse
  1646. pkg_jesse_name = jesse
  1647. pkg_jesse_description = jesse (JSon Schema Erlang) is an implementation of a json schema validator for Erlang.
  1648. pkg_jesse_homepage = https://github.com/for-GET/jesse
  1649. pkg_jesse_fetch = git
  1650. pkg_jesse_repo = https://github.com/for-GET/jesse
  1651. pkg_jesse_commit = master
  1652. PACKAGES += jiffy
  1653. pkg_jiffy_name = jiffy
  1654. pkg_jiffy_description = JSON NIFs for Erlang.
  1655. pkg_jiffy_homepage = https://github.com/davisp/jiffy
  1656. pkg_jiffy_fetch = git
  1657. pkg_jiffy_repo = https://github.com/davisp/jiffy
  1658. pkg_jiffy_commit = master
  1659. PACKAGES += jiffy_v
  1660. pkg_jiffy_v_name = jiffy_v
  1661. pkg_jiffy_v_description = JSON validation utility
  1662. pkg_jiffy_v_homepage = https://github.com/shizzard/jiffy-v
  1663. pkg_jiffy_v_fetch = git
  1664. pkg_jiffy_v_repo = https://github.com/shizzard/jiffy-v
  1665. pkg_jiffy_v_commit = master
  1666. PACKAGES += jobs
  1667. pkg_jobs_name = jobs
  1668. pkg_jobs_description = Job scheduler for load regulation
  1669. pkg_jobs_homepage = https://github.com/uwiger/jobs
  1670. pkg_jobs_fetch = git
  1671. pkg_jobs_repo = https://github.com/uwiger/jobs
  1672. pkg_jobs_commit = master
  1673. PACKAGES += joxa
  1674. pkg_joxa_name = joxa
  1675. pkg_joxa_description = A Modern Lisp for the Erlang VM
  1676. pkg_joxa_homepage = https://github.com/joxa/joxa
  1677. pkg_joxa_fetch = git
  1678. pkg_joxa_repo = https://github.com/joxa/joxa
  1679. pkg_joxa_commit = master
  1680. PACKAGES += json_rec
  1681. pkg_json_rec_name = json_rec
  1682. pkg_json_rec_description = JSON to erlang record
  1683. pkg_json_rec_homepage = https://github.com/justinkirby/json_rec
  1684. pkg_json_rec_fetch = git
  1685. pkg_json_rec_repo = https://github.com/justinkirby/json_rec
  1686. pkg_json_rec_commit = master
  1687. PACKAGES += jsone
  1688. pkg_jsone_name = jsone
  1689. pkg_jsone_description = An Erlang library for encoding, decoding JSON data.
  1690. pkg_jsone_homepage = https://github.com/sile/jsone.git
  1691. pkg_jsone_fetch = git
  1692. pkg_jsone_repo = https://github.com/sile/jsone.git
  1693. pkg_jsone_commit = master
  1694. PACKAGES += jsonpath
  1695. pkg_jsonpath_name = jsonpath
  1696. pkg_jsonpath_description = Fast Erlang JSON data retrieval and updates via javascript-like notation
  1697. pkg_jsonpath_homepage = https://github.com/GeneStevens/jsonpath
  1698. pkg_jsonpath_fetch = git
  1699. pkg_jsonpath_repo = https://github.com/GeneStevens/jsonpath
  1700. pkg_jsonpath_commit = master
  1701. PACKAGES += jsonx
  1702. pkg_jsonx_name = jsonx
  1703. pkg_jsonx_description = JSONX is an Erlang library for efficient decode and encode JSON, written in C.
  1704. pkg_jsonx_homepage = https://github.com/iskra/jsonx
  1705. pkg_jsonx_fetch = git
  1706. pkg_jsonx_repo = https://github.com/iskra/jsonx
  1707. pkg_jsonx_commit = master
  1708. PACKAGES += jsx
  1709. pkg_jsx_name = jsx
  1710. pkg_jsx_description = An Erlang application for consuming, producing and manipulating JSON.
  1711. pkg_jsx_homepage = https://github.com/talentdeficit/jsx
  1712. pkg_jsx_fetch = git
  1713. pkg_jsx_repo = https://github.com/talentdeficit/jsx
  1714. pkg_jsx_commit = main
  1715. PACKAGES += kafka_protocol
  1716. pkg_kafka_protocol_name = kafka_protocol
  1717. pkg_kafka_protocol_description = Kafka protocol Erlang library
  1718. pkg_kafka_protocol_homepage = https://github.com/kafka4beam/kafka_protocol
  1719. pkg_kafka_protocol_fetch = git
  1720. pkg_kafka_protocol_repo = https://github.com/kafka4beam/kafka_protocol
  1721. pkg_kafka_protocol_commit = master
  1722. PACKAGES += kai
  1723. pkg_kai_name = kai
  1724. pkg_kai_description = DHT storage by Takeshi Inoue
  1725. pkg_kai_homepage = https://github.com/synrc/kai
  1726. pkg_kai_fetch = git
  1727. pkg_kai_repo = https://github.com/synrc/kai
  1728. pkg_kai_commit = master
  1729. PACKAGES += katja
  1730. pkg_katja_name = katja
  1731. pkg_katja_description = A simple Riemann client written in Erlang.
  1732. pkg_katja_homepage = https://github.com/nifoc/katja
  1733. pkg_katja_fetch = git
  1734. pkg_katja_repo = https://github.com/nifoc/katja
  1735. pkg_katja_commit = master
  1736. PACKAGES += key2value
  1737. pkg_key2value_name = key2value
  1738. pkg_key2value_description = Erlang 2-way map
  1739. pkg_key2value_homepage = https://github.com/okeuday/key2value
  1740. pkg_key2value_fetch = git
  1741. pkg_key2value_repo = https://github.com/okeuday/key2value
  1742. pkg_key2value_commit = master
  1743. PACKAGES += keys1value
  1744. pkg_keys1value_name = keys1value
  1745. pkg_keys1value_description = Erlang set associative map for key lists
  1746. pkg_keys1value_homepage = https://github.com/okeuday/keys1value
  1747. pkg_keys1value_fetch = git
  1748. pkg_keys1value_repo = https://github.com/okeuday/keys1value
  1749. pkg_keys1value_commit = master
  1750. PACKAGES += kinetic
  1751. pkg_kinetic_name = kinetic
  1752. pkg_kinetic_description = Erlang Kinesis Client
  1753. pkg_kinetic_homepage = https://github.com/AdRoll/kinetic
  1754. pkg_kinetic_fetch = git
  1755. pkg_kinetic_repo = https://github.com/AdRoll/kinetic
  1756. pkg_kinetic_commit = main
  1757. PACKAGES += kjell
  1758. pkg_kjell_name = kjell
  1759. pkg_kjell_description = Erlang Shell
  1760. pkg_kjell_homepage = https://github.com/karlll/kjell
  1761. pkg_kjell_fetch = git
  1762. pkg_kjell_repo = https://github.com/karlll/kjell
  1763. pkg_kjell_commit = master
  1764. PACKAGES += kraken
  1765. pkg_kraken_name = kraken
  1766. pkg_kraken_description = Distributed Pubsub Server for Realtime Apps
  1767. pkg_kraken_homepage = https://github.com/Asana/kraken
  1768. pkg_kraken_fetch = git
  1769. pkg_kraken_repo = https://github.com/Asana/kraken
  1770. pkg_kraken_commit = master
  1771. PACKAGES += kucumberl
  1772. pkg_kucumberl_name = kucumberl
  1773. pkg_kucumberl_description = A pure-erlang, open-source, implementation of Cucumber
  1774. pkg_kucumberl_homepage = https://github.com/openshine/kucumberl
  1775. pkg_kucumberl_fetch = git
  1776. pkg_kucumberl_repo = https://github.com/openshine/kucumberl
  1777. pkg_kucumberl_commit = master
  1778. PACKAGES += kvc
  1779. pkg_kvc_name = kvc
  1780. pkg_kvc_description = KVC - Key Value Coding for Erlang data structures
  1781. pkg_kvc_homepage = https://github.com/etrepum/kvc
  1782. pkg_kvc_fetch = git
  1783. pkg_kvc_repo = https://github.com/etrepum/kvc
  1784. pkg_kvc_commit = master
  1785. PACKAGES += kvlists
  1786. pkg_kvlists_name = kvlists
  1787. pkg_kvlists_description = Lists of key-value pairs (decoded JSON) in Erlang
  1788. pkg_kvlists_homepage = https://github.com/jcomellas/kvlists
  1789. pkg_kvlists_fetch = git
  1790. pkg_kvlists_repo = https://github.com/jcomellas/kvlists
  1791. pkg_kvlists_commit = master
  1792. PACKAGES += kvs
  1793. pkg_kvs_name = kvs
  1794. pkg_kvs_description = Container and Iterator
  1795. pkg_kvs_homepage = https://github.com/synrc/kvs
  1796. pkg_kvs_fetch = git
  1797. pkg_kvs_repo = https://github.com/synrc/kvs
  1798. pkg_kvs_commit = master
  1799. PACKAGES += lager
  1800. pkg_lager_name = lager
  1801. pkg_lager_description = A logging framework for Erlang/OTP.
  1802. pkg_lager_homepage = https://github.com/erlang-lager/lager
  1803. pkg_lager_fetch = git
  1804. pkg_lager_repo = https://github.com/erlang-lager/lager
  1805. pkg_lager_commit = master
  1806. PACKAGES += lager_syslog
  1807. pkg_lager_syslog_name = lager_syslog
  1808. pkg_lager_syslog_description = Syslog backend for lager
  1809. pkg_lager_syslog_homepage = https://github.com/erlang-lager/lager_syslog
  1810. pkg_lager_syslog_fetch = git
  1811. pkg_lager_syslog_repo = https://github.com/erlang-lager/lager_syslog
  1812. pkg_lager_syslog_commit = master
  1813. PACKAGES += lasse
  1814. pkg_lasse_name = lasse
  1815. pkg_lasse_description = SSE handler for Cowboy
  1816. pkg_lasse_homepage = https://github.com/inaka/lasse
  1817. pkg_lasse_fetch = git
  1818. pkg_lasse_repo = https://github.com/inaka/lasse
  1819. pkg_lasse_commit = master
  1820. PACKAGES += ldap
  1821. pkg_ldap_name = ldap
  1822. pkg_ldap_description = LDAP server written in Erlang
  1823. pkg_ldap_homepage = https://github.com/spawnproc/ldap
  1824. pkg_ldap_fetch = git
  1825. pkg_ldap_repo = https://github.com/spawnproc/ldap
  1826. pkg_ldap_commit = master
  1827. PACKAGES += lfe
  1828. pkg_lfe_name = lfe
  1829. pkg_lfe_description = Lisp Flavoured Erlang (LFE)
  1830. pkg_lfe_homepage = https://github.com/rvirding/lfe
  1831. pkg_lfe_fetch = git
  1832. pkg_lfe_repo = https://github.com/rvirding/lfe
  1833. pkg_lfe_commit = master
  1834. PACKAGES += live
  1835. pkg_live_name = live
  1836. pkg_live_description = Automated module and configuration reloader.
  1837. pkg_live_homepage = http://ninenines.eu
  1838. pkg_live_fetch = git
  1839. pkg_live_repo = https://github.com/ninenines/live
  1840. pkg_live_commit = master
  1841. PACKAGES += locker
  1842. pkg_locker_name = locker
  1843. pkg_locker_description = Atomic distributed 'check and set' for short-lived keys
  1844. pkg_locker_homepage = https://github.com/wooga/locker
  1845. pkg_locker_fetch = git
  1846. pkg_locker_repo = https://github.com/wooga/locker
  1847. pkg_locker_commit = master
  1848. PACKAGES += locks
  1849. pkg_locks_name = locks
  1850. pkg_locks_description = A scalable, deadlock-resolving resource locker
  1851. pkg_locks_homepage = https://github.com/uwiger/locks
  1852. pkg_locks_fetch = git
  1853. pkg_locks_repo = https://github.com/uwiger/locks
  1854. pkg_locks_commit = master
  1855. PACKAGES += log4erl
  1856. pkg_log4erl_name = log4erl
  1857. pkg_log4erl_description = A logger for erlang in the spirit of Log4J.
  1858. pkg_log4erl_homepage = https://github.com/ahmednawras/log4erl
  1859. pkg_log4erl_fetch = git
  1860. pkg_log4erl_repo = https://github.com/ahmednawras/log4erl
  1861. pkg_log4erl_commit = master
  1862. PACKAGES += lol
  1863. pkg_lol_name = lol
  1864. pkg_lol_description = Lisp on erLang, and programming is fun again
  1865. pkg_lol_homepage = https://github.com/b0oh/lol
  1866. pkg_lol_fetch = git
  1867. pkg_lol_repo = https://github.com/b0oh/lol
  1868. pkg_lol_commit = master
  1869. PACKAGES += lucid
  1870. pkg_lucid_name = lucid
  1871. pkg_lucid_description = HTTP/2 server written in Erlang
  1872. pkg_lucid_homepage = https://github.com/tatsuhiro-t/lucid
  1873. pkg_lucid_fetch = git
  1874. pkg_lucid_repo = https://github.com/tatsuhiro-t/lucid
  1875. pkg_lucid_commit = master
  1876. PACKAGES += luerl
  1877. pkg_luerl_name = luerl
  1878. pkg_luerl_description = Lua in Erlang
  1879. pkg_luerl_homepage = https://github.com/rvirding/luerl
  1880. pkg_luerl_fetch = git
  1881. pkg_luerl_repo = https://github.com/rvirding/luerl
  1882. pkg_luerl_commit = develop
  1883. PACKAGES += lux
  1884. pkg_lux_name = lux
  1885. pkg_lux_description = Lux (LUcid eXpect scripting) simplifies test automation and provides an Expect-style execution of commands
  1886. pkg_lux_homepage = https://github.com/hawk/lux
  1887. pkg_lux_fetch = git
  1888. pkg_lux_repo = https://github.com/hawk/lux
  1889. pkg_lux_commit = master
  1890. PACKAGES += mad
  1891. pkg_mad_name = mad
  1892. pkg_mad_description = Small and Fast Rebar Replacement
  1893. pkg_mad_homepage = https://github.com/synrc/mad
  1894. pkg_mad_fetch = git
  1895. pkg_mad_repo = https://github.com/synrc/mad
  1896. pkg_mad_commit = master
  1897. PACKAGES += marina
  1898. pkg_marina_name = marina
  1899. pkg_marina_description = Non-blocking Erlang Cassandra CQL3 client
  1900. pkg_marina_homepage = https://github.com/lpgauth/marina
  1901. pkg_marina_fetch = git
  1902. pkg_marina_repo = https://github.com/lpgauth/marina
  1903. pkg_marina_commit = master
  1904. PACKAGES += mavg
  1905. pkg_mavg_name = mavg
  1906. pkg_mavg_description = Erlang :: Exponential moving average library
  1907. pkg_mavg_homepage = https://github.com/EchoTeam/mavg
  1908. pkg_mavg_fetch = git
  1909. pkg_mavg_repo = https://github.com/EchoTeam/mavg
  1910. pkg_mavg_commit = master
  1911. PACKAGES += meck
  1912. pkg_meck_name = meck
  1913. pkg_meck_description = A mocking library for Erlang
  1914. pkg_meck_homepage = https://github.com/eproxus/meck
  1915. pkg_meck_fetch = git
  1916. pkg_meck_repo = https://github.com/eproxus/meck
  1917. pkg_meck_commit = master
  1918. PACKAGES += mekao
  1919. pkg_mekao_name = mekao
  1920. pkg_mekao_description = SQL constructor
  1921. pkg_mekao_homepage = https://github.com/ddosia/mekao
  1922. pkg_mekao_fetch = git
  1923. pkg_mekao_repo = https://github.com/ddosia/mekao
  1924. pkg_mekao_commit = master
  1925. PACKAGES += merl
  1926. pkg_merl_name = merl
  1927. pkg_merl_description = Metaprogramming in Erlang
  1928. pkg_merl_homepage = https://github.com/richcarl/merl
  1929. pkg_merl_fetch = git
  1930. pkg_merl_repo = https://github.com/richcarl/merl
  1931. pkg_merl_commit = master
  1932. PACKAGES += mimerl
  1933. pkg_mimerl_name = mimerl
  1934. pkg_mimerl_description = library to handle mimetypes
  1935. pkg_mimerl_homepage = https://github.com/benoitc/mimerl
  1936. pkg_mimerl_fetch = git
  1937. pkg_mimerl_repo = https://github.com/benoitc/mimerl
  1938. pkg_mimerl_commit = master
  1939. PACKAGES += mimetypes
  1940. pkg_mimetypes_name = mimetypes
  1941. pkg_mimetypes_description = Erlang MIME types library
  1942. pkg_mimetypes_homepage = https://github.com/spawngrid/mimetypes
  1943. pkg_mimetypes_fetch = git
  1944. pkg_mimetypes_repo = https://github.com/spawngrid/mimetypes
  1945. pkg_mimetypes_commit = master
  1946. PACKAGES += mixer
  1947. pkg_mixer_name = mixer
  1948. pkg_mixer_description = Mix in functions from other modules
  1949. pkg_mixer_homepage = https://github.com/chef/mixer
  1950. pkg_mixer_fetch = git
  1951. pkg_mixer_repo = https://github.com/chef/mixer
  1952. pkg_mixer_commit = main
  1953. PACKAGES += mochiweb
  1954. pkg_mochiweb_name = mochiweb
  1955. pkg_mochiweb_description = MochiWeb is an Erlang library for building lightweight HTTP servers.
  1956. pkg_mochiweb_homepage = https://github.com/mochi/mochiweb
  1957. pkg_mochiweb_fetch = git
  1958. pkg_mochiweb_repo = https://github.com/mochi/mochiweb
  1959. pkg_mochiweb_commit = main
  1960. PACKAGES += mochiweb_xpath
  1961. pkg_mochiweb_xpath_name = mochiweb_xpath
  1962. pkg_mochiweb_xpath_description = XPath support for mochiweb's html parser
  1963. pkg_mochiweb_xpath_homepage = https://github.com/retnuh/mochiweb_xpath
  1964. pkg_mochiweb_xpath_fetch = git
  1965. pkg_mochiweb_xpath_repo = https://github.com/retnuh/mochiweb_xpath
  1966. pkg_mochiweb_xpath_commit = master
  1967. PACKAGES += mockgyver
  1968. pkg_mockgyver_name = mockgyver
  1969. pkg_mockgyver_description = A mocking library for Erlang
  1970. pkg_mockgyver_homepage = https://github.com/klajo/mockgyver
  1971. pkg_mockgyver_fetch = git
  1972. pkg_mockgyver_repo = https://github.com/klajo/mockgyver
  1973. pkg_mockgyver_commit = master
  1974. PACKAGES += modlib
  1975. pkg_modlib_name = modlib
  1976. pkg_modlib_description = Web framework based on Erlang's inets httpd
  1977. pkg_modlib_homepage = https://github.com/gar1t/modlib
  1978. pkg_modlib_fetch = git
  1979. pkg_modlib_repo = https://github.com/gar1t/modlib
  1980. pkg_modlib_commit = master
  1981. PACKAGES += mongodb
  1982. pkg_mongodb_name = mongodb
  1983. pkg_mongodb_description = MongoDB driver for Erlang
  1984. pkg_mongodb_homepage = https://github.com/comtihon/mongodb-erlang
  1985. pkg_mongodb_fetch = git
  1986. pkg_mongodb_repo = https://github.com/comtihon/mongodb-erlang
  1987. pkg_mongodb_commit = master
  1988. PACKAGES += mongooseim
  1989. pkg_mongooseim_name = mongooseim
  1990. pkg_mongooseim_description = Jabber / XMPP server with focus on performance and scalability, by Erlang Solutions
  1991. pkg_mongooseim_homepage = https://www.erlang-solutions.com/products/mongooseim-massively-scalable-ejabberd-platform
  1992. pkg_mongooseim_fetch = git
  1993. pkg_mongooseim_repo = https://github.com/esl/MongooseIM
  1994. pkg_mongooseim_commit = master
  1995. PACKAGES += moyo
  1996. pkg_moyo_name = moyo
  1997. pkg_moyo_description = Erlang utility functions library
  1998. pkg_moyo_homepage = https://github.com/dwango/moyo
  1999. pkg_moyo_fetch = git
  2000. pkg_moyo_repo = https://github.com/dwango/moyo
  2001. pkg_moyo_commit = master
  2002. PACKAGES += msgpack
  2003. pkg_msgpack_name = msgpack
  2004. pkg_msgpack_description = MessagePack (de)serializer implementation for Erlang
  2005. pkg_msgpack_homepage = https://github.com/msgpack/msgpack-erlang
  2006. pkg_msgpack_fetch = git
  2007. pkg_msgpack_repo = https://github.com/msgpack/msgpack-erlang
  2008. pkg_msgpack_commit = master
  2009. PACKAGES += mu2
  2010. pkg_mu2_name = mu2
  2011. pkg_mu2_description = Erlang mutation testing tool
  2012. pkg_mu2_homepage = https://github.com/ramsay-t/mu2
  2013. pkg_mu2_fetch = git
  2014. pkg_mu2_repo = https://github.com/ramsay-t/mu2
  2015. pkg_mu2_commit = master
  2016. PACKAGES += mustache
  2017. pkg_mustache_name = mustache
  2018. pkg_mustache_description = Mustache template engine for Erlang.
  2019. pkg_mustache_homepage = https://github.com/mojombo/mustache.erl
  2020. pkg_mustache_fetch = git
  2021. pkg_mustache_repo = https://github.com/mojombo/mustache.erl
  2022. pkg_mustache_commit = master
  2023. PACKAGES += myproto
  2024. pkg_myproto_name = myproto
  2025. pkg_myproto_description = MySQL Server Protocol in Erlang
  2026. pkg_myproto_homepage = https://github.com/altenwald/myproto
  2027. pkg_myproto_fetch = git
  2028. pkg_myproto_repo = https://github.com/altenwald/myproto
  2029. pkg_myproto_commit = master
  2030. PACKAGES += mysql
  2031. pkg_mysql_name = mysql
  2032. pkg_mysql_description = MySQL client library for Erlang/OTP
  2033. pkg_mysql_homepage = https://github.com/mysql-otp/mysql-otp
  2034. pkg_mysql_fetch = git
  2035. pkg_mysql_repo = https://github.com/mysql-otp/mysql-otp
  2036. pkg_mysql_commit = 1.7.0
  2037. PACKAGES += n2o
  2038. pkg_n2o_name = n2o
  2039. pkg_n2o_description = WebSocket Application Server
  2040. pkg_n2o_homepage = https://github.com/5HT/n2o
  2041. pkg_n2o_fetch = git
  2042. pkg_n2o_repo = https://github.com/5HT/n2o
  2043. pkg_n2o_commit = master
  2044. PACKAGES += nat_upnp
  2045. pkg_nat_upnp_name = nat_upnp
  2046. pkg_nat_upnp_description = Erlang library to map your internal port to an external using UNP IGD
  2047. pkg_nat_upnp_homepage = https://github.com/benoitc/nat_upnp
  2048. pkg_nat_upnp_fetch = git
  2049. pkg_nat_upnp_repo = https://github.com/benoitc/nat_upnp
  2050. pkg_nat_upnp_commit = master
  2051. PACKAGES += neo4j
  2052. pkg_neo4j_name = neo4j
  2053. pkg_neo4j_description = Erlang client library for Neo4J.
  2054. pkg_neo4j_homepage = https://github.com/dmitriid/neo4j-erlang
  2055. pkg_neo4j_fetch = git
  2056. pkg_neo4j_repo = https://github.com/dmitriid/neo4j-erlang
  2057. pkg_neo4j_commit = master
  2058. PACKAGES += neotoma
  2059. pkg_neotoma_name = neotoma
  2060. pkg_neotoma_description = Erlang library and packrat parser-generator for parsing expression grammars.
  2061. pkg_neotoma_homepage = https://github.com/seancribbs/neotoma
  2062. pkg_neotoma_fetch = git
  2063. pkg_neotoma_repo = https://github.com/seancribbs/neotoma
  2064. pkg_neotoma_commit = master
  2065. PACKAGES += nifty
  2066. pkg_nifty_name = nifty
  2067. pkg_nifty_description = Erlang NIF wrapper generator
  2068. pkg_nifty_homepage = https://github.com/parapluu/nifty
  2069. pkg_nifty_fetch = git
  2070. pkg_nifty_repo = https://github.com/parapluu/nifty
  2071. pkg_nifty_commit = master
  2072. PACKAGES += nitrogen_core
  2073. pkg_nitrogen_core_name = nitrogen_core
  2074. pkg_nitrogen_core_description = The core Nitrogen library.
  2075. pkg_nitrogen_core_homepage = http://nitrogenproject.com/
  2076. pkg_nitrogen_core_fetch = git
  2077. pkg_nitrogen_core_repo = https://github.com/nitrogen/nitrogen_core
  2078. pkg_nitrogen_core_commit = master
  2079. PACKAGES += nkpacket
  2080. pkg_nkpacket_name = nkpacket
  2081. pkg_nkpacket_description = Generic Erlang transport layer
  2082. pkg_nkpacket_homepage = https://github.com/Nekso/nkpacket
  2083. pkg_nkpacket_fetch = git
  2084. pkg_nkpacket_repo = https://github.com/Nekso/nkpacket
  2085. pkg_nkpacket_commit = master
  2086. PACKAGES += nksip
  2087. pkg_nksip_name = nksip
  2088. pkg_nksip_description = Erlang SIP application server
  2089. pkg_nksip_homepage = https://github.com/kalta/nksip
  2090. pkg_nksip_fetch = git
  2091. pkg_nksip_repo = https://github.com/kalta/nksip
  2092. pkg_nksip_commit = master
  2093. PACKAGES += nodefinder
  2094. pkg_nodefinder_name = nodefinder
  2095. pkg_nodefinder_description = automatic node discovery via UDP multicast
  2096. pkg_nodefinder_homepage = https://github.com/erlanger/nodefinder
  2097. pkg_nodefinder_fetch = git
  2098. pkg_nodefinder_repo = https://github.com/okeuday/nodefinder
  2099. pkg_nodefinder_commit = master
  2100. PACKAGES += nprocreg
  2101. pkg_nprocreg_name = nprocreg
  2102. pkg_nprocreg_description = Minimal Distributed Erlang Process Registry
  2103. pkg_nprocreg_homepage = http://nitrogenproject.com/
  2104. pkg_nprocreg_fetch = git
  2105. pkg_nprocreg_repo = https://github.com/nitrogen/nprocreg
  2106. pkg_nprocreg_commit = master
  2107. PACKAGES += oauth
  2108. pkg_oauth_name = oauth
  2109. pkg_oauth_description = An Erlang OAuth 1.0 implementation
  2110. pkg_oauth_homepage = https://github.com/tim/erlang-oauth
  2111. pkg_oauth_fetch = git
  2112. pkg_oauth_repo = https://github.com/tim/erlang-oauth
  2113. pkg_oauth_commit = main
  2114. PACKAGES += oauth2
  2115. pkg_oauth2_name = oauth2
  2116. pkg_oauth2_description = Erlang Oauth2 implementation
  2117. pkg_oauth2_homepage = https://github.com/kivra/oauth2
  2118. pkg_oauth2_fetch = git
  2119. pkg_oauth2_repo = https://github.com/kivra/oauth2
  2120. pkg_oauth2_commit = master
  2121. PACKAGES += observer_cli
  2122. pkg_observer_cli_name = observer_cli
  2123. pkg_observer_cli_description = Visualize Erlang/Elixir Nodes On The Command Line
  2124. pkg_observer_cli_homepage = http://zhongwencool.github.io/observer_cli
  2125. pkg_observer_cli_fetch = git
  2126. pkg_observer_cli_repo = https://github.com/zhongwencool/observer_cli
  2127. pkg_observer_cli_commit = master
  2128. PACKAGES += octopus
  2129. pkg_octopus_name = octopus
  2130. pkg_octopus_description = Small and flexible pool manager written in Erlang
  2131. pkg_octopus_homepage = https://github.com/erlangbureau/octopus
  2132. pkg_octopus_fetch = git
  2133. pkg_octopus_repo = https://github.com/erlangbureau/octopus
  2134. pkg_octopus_commit = master
  2135. PACKAGES += openflow
  2136. pkg_openflow_name = openflow
  2137. pkg_openflow_description = An OpenFlow controller written in pure erlang
  2138. pkg_openflow_homepage = https://github.com/renatoaguiar/erlang-openflow
  2139. pkg_openflow_fetch = git
  2140. pkg_openflow_repo = https://github.com/renatoaguiar/erlang-openflow
  2141. pkg_openflow_commit = master
  2142. PACKAGES += openid
  2143. pkg_openid_name = openid
  2144. pkg_openid_description = Erlang OpenID
  2145. pkg_openid_homepage = https://github.com/brendonh/erl_openid
  2146. pkg_openid_fetch = git
  2147. pkg_openid_repo = https://github.com/brendonh/erl_openid
  2148. pkg_openid_commit = master
  2149. PACKAGES += openpoker
  2150. pkg_openpoker_name = openpoker
  2151. pkg_openpoker_description = Genesis Texas hold'em Game Server
  2152. pkg_openpoker_homepage = https://github.com/hpyhacking/openpoker
  2153. pkg_openpoker_fetch = git
  2154. pkg_openpoker_repo = https://github.com/hpyhacking/openpoker
  2155. pkg_openpoker_commit = master
  2156. PACKAGES += otpbp
  2157. pkg_otpbp_name = otpbp
  2158. pkg_otpbp_description = Parse transformer for use new OTP functions in old Erlang/OTP releases (R15, R16, 17, 18, 19)
  2159. pkg_otpbp_homepage = https://github.com/Ledest/otpbp
  2160. pkg_otpbp_fetch = git
  2161. pkg_otpbp_repo = https://github.com/Ledest/otpbp
  2162. pkg_otpbp_commit = master
  2163. PACKAGES += pal
  2164. pkg_pal_name = pal
  2165. pkg_pal_description = Pragmatic Authentication Library
  2166. pkg_pal_homepage = https://github.com/manifest/pal
  2167. pkg_pal_fetch = git
  2168. pkg_pal_repo = https://github.com/manifest/pal
  2169. pkg_pal_commit = master
  2170. PACKAGES += parse_trans
  2171. pkg_parse_trans_name = parse_trans
  2172. pkg_parse_trans_description = Parse transform utilities for Erlang
  2173. pkg_parse_trans_homepage = https://github.com/uwiger/parse_trans
  2174. pkg_parse_trans_fetch = git
  2175. pkg_parse_trans_repo = https://github.com/uwiger/parse_trans
  2176. pkg_parse_trans_commit = master
  2177. PACKAGES += parsexml
  2178. pkg_parsexml_name = parsexml
  2179. pkg_parsexml_description = Simple DOM XML parser with convenient and very simple API
  2180. pkg_parsexml_homepage = https://github.com/maxlapshin/parsexml
  2181. pkg_parsexml_fetch = git
  2182. pkg_parsexml_repo = https://github.com/maxlapshin/parsexml
  2183. pkg_parsexml_commit = master
  2184. PACKAGES += partisan
  2185. pkg_partisan_name = partisan
  2186. pkg_partisan_description = High-performance, high-scalability distributed computing with Erlang and Elixir.
  2187. pkg_partisan_homepage = http://partisan.cloud
  2188. pkg_partisan_fetch = git
  2189. pkg_partisan_repo = https://github.com/lasp-lang/partisan
  2190. pkg_partisan_commit = master
  2191. PACKAGES += pegjs
  2192. pkg_pegjs_name = pegjs
  2193. pkg_pegjs_description = An implementation of PEG.js grammar for Erlang.
  2194. pkg_pegjs_homepage = https://github.com/dmitriid/pegjs
  2195. pkg_pegjs_fetch = git
  2196. pkg_pegjs_repo = https://github.com/dmitriid/pegjs
  2197. pkg_pegjs_commit = master
  2198. PACKAGES += percept2
  2199. pkg_percept2_name = percept2
  2200. pkg_percept2_description = Concurrent profiling tool for Erlang
  2201. pkg_percept2_homepage = https://github.com/huiqing/percept2
  2202. pkg_percept2_fetch = git
  2203. pkg_percept2_repo = https://github.com/huiqing/percept2
  2204. pkg_percept2_commit = master
  2205. PACKAGES += pgo
  2206. pkg_pgo_name = pgo
  2207. pkg_pgo_description = Erlang Postgres client and connection pool
  2208. pkg_pgo_homepage = https://github.com/erleans/pgo.git
  2209. pkg_pgo_fetch = git
  2210. pkg_pgo_repo = https://github.com/erleans/pgo.git
  2211. pkg_pgo_commit = main
  2212. PACKAGES += pgsql
  2213. pkg_pgsql_name = pgsql
  2214. pkg_pgsql_description = Erlang PostgreSQL driver
  2215. pkg_pgsql_homepage = https://github.com/semiocast/pgsql
  2216. pkg_pgsql_fetch = git
  2217. pkg_pgsql_repo = https://github.com/semiocast/pgsql
  2218. pkg_pgsql_commit = master
  2219. PACKAGES += pkgx
  2220. pkg_pkgx_name = pkgx
  2221. pkg_pkgx_description = Build .deb packages from Erlang releases
  2222. pkg_pkgx_homepage = https://github.com/arjan/pkgx
  2223. pkg_pkgx_fetch = git
  2224. pkg_pkgx_repo = https://github.com/arjan/pkgx
  2225. pkg_pkgx_commit = master
  2226. PACKAGES += pkt
  2227. pkg_pkt_name = pkt
  2228. pkg_pkt_description = Erlang network protocol library
  2229. pkg_pkt_homepage = https://github.com/msantos/pkt
  2230. pkg_pkt_fetch = git
  2231. pkg_pkt_repo = https://github.com/msantos/pkt
  2232. pkg_pkt_commit = master
  2233. PACKAGES += plain_fsm
  2234. pkg_plain_fsm_name = plain_fsm
  2235. pkg_plain_fsm_description = A behaviour/support library for writing plain Erlang FSMs.
  2236. pkg_plain_fsm_homepage = https://github.com/uwiger/plain_fsm
  2237. pkg_plain_fsm_fetch = git
  2238. pkg_plain_fsm_repo = https://github.com/uwiger/plain_fsm
  2239. pkg_plain_fsm_commit = master
  2240. PACKAGES += pmod_transform
  2241. pkg_pmod_transform_name = pmod_transform
  2242. pkg_pmod_transform_description = Parse transform for parameterized modules
  2243. pkg_pmod_transform_homepage = https://github.com/erlang/pmod_transform
  2244. pkg_pmod_transform_fetch = git
  2245. pkg_pmod_transform_repo = https://github.com/erlang/pmod_transform
  2246. pkg_pmod_transform_commit = master
  2247. PACKAGES += pobox
  2248. pkg_pobox_name = pobox
  2249. pkg_pobox_description = External buffer processes to protect against mailbox overflow in Erlang
  2250. pkg_pobox_homepage = https://github.com/ferd/pobox
  2251. pkg_pobox_fetch = git
  2252. pkg_pobox_repo = https://github.com/ferd/pobox
  2253. pkg_pobox_commit = master
  2254. PACKAGES += ponos
  2255. pkg_ponos_name = ponos
  2256. pkg_ponos_description = ponos is a simple yet powerful load generator written in erlang
  2257. pkg_ponos_homepage = https://github.com/klarna/ponos
  2258. pkg_ponos_fetch = git
  2259. pkg_ponos_repo = https://github.com/klarna/ponos
  2260. pkg_ponos_commit = master
  2261. PACKAGES += poolboy
  2262. pkg_poolboy_name = poolboy
  2263. pkg_poolboy_description = A hunky Erlang worker pool factory
  2264. pkg_poolboy_homepage = https://github.com/devinus/poolboy
  2265. pkg_poolboy_fetch = git
  2266. pkg_poolboy_repo = https://github.com/devinus/poolboy
  2267. pkg_poolboy_commit = master
  2268. PACKAGES += pooler
  2269. pkg_pooler_name = pooler
  2270. pkg_pooler_description = An OTP Process Pool Application
  2271. pkg_pooler_homepage = https://github.com/seth/pooler
  2272. pkg_pooler_fetch = git
  2273. pkg_pooler_repo = https://github.com/seth/pooler
  2274. pkg_pooler_commit = master
  2275. PACKAGES += pqueue
  2276. pkg_pqueue_name = pqueue
  2277. pkg_pqueue_description = Erlang Priority Queues
  2278. pkg_pqueue_homepage = https://github.com/okeuday/pqueue
  2279. pkg_pqueue_fetch = git
  2280. pkg_pqueue_repo = https://github.com/okeuday/pqueue
  2281. pkg_pqueue_commit = master
  2282. PACKAGES += procket
  2283. pkg_procket_name = procket
  2284. pkg_procket_description = Erlang interface to low level socket operations
  2285. pkg_procket_homepage = http://blog.listincomprehension.com/search/label/procket
  2286. pkg_procket_fetch = git
  2287. pkg_procket_repo = https://github.com/msantos/procket
  2288. pkg_procket_commit = master
  2289. PACKAGES += prometheus
  2290. pkg_prometheus_name = prometheus
  2291. pkg_prometheus_description = Prometheus.io client in Erlang
  2292. pkg_prometheus_homepage = https://github.com/deadtrickster/prometheus.erl
  2293. pkg_prometheus_fetch = git
  2294. pkg_prometheus_repo = https://github.com/deadtrickster/prometheus.erl
  2295. pkg_prometheus_commit = master
  2296. PACKAGES += prop
  2297. pkg_prop_name = prop
  2298. pkg_prop_description = An Erlang code scaffolding and generator system.
  2299. pkg_prop_homepage = https://github.com/nuex/prop
  2300. pkg_prop_fetch = git
  2301. pkg_prop_repo = https://github.com/nuex/prop
  2302. pkg_prop_commit = master
  2303. PACKAGES += proper
  2304. pkg_proper_name = proper
  2305. pkg_proper_description = PropEr: a QuickCheck-inspired property-based testing tool for Erlang.
  2306. pkg_proper_homepage = http://proper.softlab.ntua.gr
  2307. pkg_proper_fetch = git
  2308. pkg_proper_repo = https://github.com/manopapad/proper
  2309. pkg_proper_commit = master
  2310. PACKAGES += props
  2311. pkg_props_name = props
  2312. pkg_props_description = Property structure library
  2313. pkg_props_homepage = https://github.com/greyarea/props
  2314. pkg_props_fetch = git
  2315. pkg_props_repo = https://github.com/greyarea/props
  2316. pkg_props_commit = master
  2317. PACKAGES += protobuffs
  2318. pkg_protobuffs_name = protobuffs
  2319. pkg_protobuffs_description = An implementation of Google's Protocol Buffers for Erlang, based on ngerakines/erlang_protobuffs.
  2320. pkg_protobuffs_homepage = https://github.com/basho/erlang_protobuffs
  2321. pkg_protobuffs_fetch = git
  2322. pkg_protobuffs_repo = https://github.com/basho/erlang_protobuffs
  2323. pkg_protobuffs_commit = master
  2324. PACKAGES += psycho
  2325. pkg_psycho_name = psycho
  2326. pkg_psycho_description = HTTP server that provides a WSGI-like interface for applications and middleware.
  2327. pkg_psycho_homepage = https://github.com/gar1t/psycho
  2328. pkg_psycho_fetch = git
  2329. pkg_psycho_repo = https://github.com/gar1t/psycho
  2330. pkg_psycho_commit = master
  2331. PACKAGES += purity
  2332. pkg_purity_name = purity
  2333. pkg_purity_description = A side-effect analyzer for Erlang
  2334. pkg_purity_homepage = https://github.com/mpitid/purity
  2335. pkg_purity_fetch = git
  2336. pkg_purity_repo = https://github.com/mpitid/purity
  2337. pkg_purity_commit = master
  2338. PACKAGES += qdate
  2339. pkg_qdate_name = qdate
  2340. pkg_qdate_description = Date, time, and timezone parsing, formatting, and conversion for Erlang.
  2341. pkg_qdate_homepage = https://github.com/choptastic/qdate
  2342. pkg_qdate_fetch = git
  2343. pkg_qdate_repo = https://github.com/choptastic/qdate
  2344. pkg_qdate_commit = master
  2345. PACKAGES += qrcode
  2346. pkg_qrcode_name = qrcode
  2347. pkg_qrcode_description = QR Code encoder in Erlang
  2348. pkg_qrcode_homepage = https://github.com/komone/qrcode
  2349. pkg_qrcode_fetch = git
  2350. pkg_qrcode_repo = https://github.com/komone/qrcode
  2351. pkg_qrcode_commit = master
  2352. PACKAGES += quest
  2353. pkg_quest_name = quest
  2354. pkg_quest_description = Learn Erlang through this set of challenges. An interactive system for getting to know Erlang.
  2355. pkg_quest_homepage = https://github.com/eriksoe/ErlangQuest
  2356. pkg_quest_fetch = git
  2357. pkg_quest_repo = https://github.com/eriksoe/ErlangQuest
  2358. pkg_quest_commit = master
  2359. PACKAGES += quickrand
  2360. pkg_quickrand_name = quickrand
  2361. pkg_quickrand_description = Quick Erlang Random Number Generation
  2362. pkg_quickrand_homepage = https://github.com/okeuday/quickrand
  2363. pkg_quickrand_fetch = git
  2364. pkg_quickrand_repo = https://github.com/okeuday/quickrand
  2365. pkg_quickrand_commit = master
  2366. PACKAGES += rabbit_exchange_type_riak
  2367. pkg_rabbit_exchange_type_riak_name = rabbit_exchange_type_riak
  2368. pkg_rabbit_exchange_type_riak_description = Custom RabbitMQ exchange type for sticking messages in Riak
  2369. pkg_rabbit_exchange_type_riak_homepage = https://github.com/jbrisbin/riak-exchange
  2370. pkg_rabbit_exchange_type_riak_fetch = git
  2371. pkg_rabbit_exchange_type_riak_repo = https://github.com/jbrisbin/riak-exchange
  2372. pkg_rabbit_exchange_type_riak_commit = master
  2373. PACKAGES += rack
  2374. pkg_rack_name = rack
  2375. pkg_rack_description = Rack handler for erlang
  2376. pkg_rack_homepage = https://github.com/erlyvideo/rack
  2377. pkg_rack_fetch = git
  2378. pkg_rack_repo = https://github.com/erlyvideo/rack
  2379. pkg_rack_commit = master
  2380. PACKAGES += radierl
  2381. pkg_radierl_name = radierl
  2382. pkg_radierl_description = RADIUS protocol stack implemented in Erlang.
  2383. pkg_radierl_homepage = https://github.com/vances/radierl
  2384. pkg_radierl_fetch = git
  2385. pkg_radierl_repo = https://github.com/vances/radierl
  2386. pkg_radierl_commit = master
  2387. PACKAGES += ranch
  2388. pkg_ranch_name = ranch
  2389. pkg_ranch_description = Socket acceptor pool for TCP protocols.
  2390. pkg_ranch_homepage = http://ninenines.eu
  2391. pkg_ranch_fetch = git
  2392. pkg_ranch_repo = https://github.com/ninenines/ranch
  2393. pkg_ranch_commit = 1.2.1
  2394. PACKAGES += rbeacon
  2395. pkg_rbeacon_name = rbeacon
  2396. pkg_rbeacon_description = LAN discovery and presence in Erlang.
  2397. pkg_rbeacon_homepage = https://github.com/refuge/rbeacon
  2398. pkg_rbeacon_fetch = git
  2399. pkg_rbeacon_repo = https://github.com/refuge/rbeacon
  2400. pkg_rbeacon_commit = master
  2401. PACKAGES += re2
  2402. pkg_re2_name = re2
  2403. pkg_re2_description = Erlang NIF bindings for RE2 regex library
  2404. pkg_re2_homepage = https://github.com/dukesoferl/re2
  2405. pkg_re2_fetch = git
  2406. pkg_re2_repo = https://github.com/dukesoferl/re2
  2407. pkg_re2_commit = master
  2408. PACKAGES += rebus
  2409. pkg_rebus_name = rebus
  2410. pkg_rebus_description = A stupid simple, internal, pub/sub event bus written in- and for Erlang.
  2411. pkg_rebus_homepage = https://github.com/olle/rebus
  2412. pkg_rebus_fetch = git
  2413. pkg_rebus_repo = https://github.com/olle/rebus
  2414. pkg_rebus_commit = master
  2415. PACKAGES += rec2json
  2416. pkg_rec2json_name = rec2json
  2417. pkg_rec2json_description = Compile erlang record definitions into modules to convert them to/from json easily.
  2418. pkg_rec2json_homepage = https://github.com/lordnull/rec2json
  2419. pkg_rec2json_fetch = git
  2420. pkg_rec2json_repo = https://github.com/lordnull/rec2json
  2421. pkg_rec2json_commit = master
  2422. PACKAGES += recon
  2423. pkg_recon_name = recon
  2424. pkg_recon_description = Collection of functions and scripts to debug Erlang in production.
  2425. pkg_recon_homepage = https://github.com/ferd/recon
  2426. pkg_recon_fetch = git
  2427. pkg_recon_repo = https://github.com/ferd/recon
  2428. pkg_recon_commit = master
  2429. PACKAGES += record_info
  2430. pkg_record_info_name = record_info
  2431. pkg_record_info_description = Convert between record and proplist
  2432. pkg_record_info_homepage = https://github.com/bipthelin/erlang-record_info
  2433. pkg_record_info_fetch = git
  2434. pkg_record_info_repo = https://github.com/bipthelin/erlang-record_info
  2435. pkg_record_info_commit = master
  2436. PACKAGES += redgrid
  2437. pkg_redgrid_name = redgrid
  2438. pkg_redgrid_description = automatic Erlang node discovery via redis
  2439. pkg_redgrid_homepage = https://github.com/jkvor/redgrid
  2440. pkg_redgrid_fetch = git
  2441. pkg_redgrid_repo = https://github.com/jkvor/redgrid
  2442. pkg_redgrid_commit = master
  2443. PACKAGES += redo
  2444. pkg_redo_name = redo
  2445. pkg_redo_description = pipelined erlang redis client
  2446. pkg_redo_homepage = https://github.com/jkvor/redo
  2447. pkg_redo_fetch = git
  2448. pkg_redo_repo = https://github.com/jkvor/redo
  2449. pkg_redo_commit = master
  2450. PACKAGES += reload_mk
  2451. pkg_reload_mk_name = reload_mk
  2452. pkg_reload_mk_description = Live reload plugin for erlang.mk.
  2453. pkg_reload_mk_homepage = https://github.com/bullno1/reload.mk
  2454. pkg_reload_mk_fetch = git
  2455. pkg_reload_mk_repo = https://github.com/bullno1/reload.mk
  2456. pkg_reload_mk_commit = master
  2457. PACKAGES += reltool_util
  2458. pkg_reltool_util_name = reltool_util
  2459. pkg_reltool_util_description = Erlang reltool utility functionality application
  2460. pkg_reltool_util_homepage = https://github.com/okeuday/reltool_util
  2461. pkg_reltool_util_fetch = git
  2462. pkg_reltool_util_repo = https://github.com/okeuday/reltool_util
  2463. pkg_reltool_util_commit = master
  2464. PACKAGES += relx
  2465. pkg_relx_name = relx
  2466. pkg_relx_description = Sane, simple release creation for Erlang
  2467. pkg_relx_homepage = https://github.com/erlware/relx
  2468. pkg_relx_fetch = git
  2469. pkg_relx_repo = https://github.com/erlware/relx
  2470. pkg_relx_commit = main
  2471. PACKAGES += resource_discovery
  2472. pkg_resource_discovery_name = resource_discovery
  2473. pkg_resource_discovery_description = An application used to dynamically discover resources present in an Erlang node cluster.
  2474. pkg_resource_discovery_homepage = http://erlware.org/
  2475. pkg_resource_discovery_fetch = git
  2476. pkg_resource_discovery_repo = https://github.com/erlware/resource_discovery
  2477. pkg_resource_discovery_commit = master
  2478. PACKAGES += restc
  2479. pkg_restc_name = restc
  2480. pkg_restc_description = Erlang Rest Client
  2481. pkg_restc_homepage = https://github.com/kivra/restclient
  2482. pkg_restc_fetch = git
  2483. pkg_restc_repo = https://github.com/kivra/restclient
  2484. pkg_restc_commit = master
  2485. PACKAGES += rfc4627_jsonrpc
  2486. pkg_rfc4627_jsonrpc_name = rfc4627_jsonrpc
  2487. pkg_rfc4627_jsonrpc_description = Erlang RFC4627 (JSON) codec and JSON-RPC server implementation.
  2488. pkg_rfc4627_jsonrpc_homepage = https://github.com/tonyg/erlang-rfc4627
  2489. pkg_rfc4627_jsonrpc_fetch = git
  2490. pkg_rfc4627_jsonrpc_repo = https://github.com/tonyg/erlang-rfc4627
  2491. pkg_rfc4627_jsonrpc_commit = master
  2492. PACKAGES += riak_core
  2493. pkg_riak_core_name = riak_core
  2494. pkg_riak_core_description = Distributed systems infrastructure used by Riak.
  2495. pkg_riak_core_homepage = https://github.com/basho/riak_core
  2496. pkg_riak_core_fetch = git
  2497. pkg_riak_core_repo = https://github.com/basho/riak_core
  2498. pkg_riak_core_commit = develop
  2499. PACKAGES += riak_dt
  2500. pkg_riak_dt_name = riak_dt
  2501. pkg_riak_dt_description = Convergent replicated datatypes in Erlang
  2502. pkg_riak_dt_homepage = https://github.com/basho/riak_dt
  2503. pkg_riak_dt_fetch = git
  2504. pkg_riak_dt_repo = https://github.com/basho/riak_dt
  2505. pkg_riak_dt_commit = master
  2506. PACKAGES += riak_ensemble
  2507. pkg_riak_ensemble_name = riak_ensemble
  2508. pkg_riak_ensemble_description = Multi-Paxos framework in Erlang
  2509. pkg_riak_ensemble_homepage = https://github.com/basho/riak_ensemble
  2510. pkg_riak_ensemble_fetch = git
  2511. pkg_riak_ensemble_repo = https://github.com/basho/riak_ensemble
  2512. pkg_riak_ensemble_commit = develop
  2513. PACKAGES += riak_kv
  2514. pkg_riak_kv_name = riak_kv
  2515. pkg_riak_kv_description = Riak Key/Value Store
  2516. pkg_riak_kv_homepage = https://github.com/basho/riak_kv
  2517. pkg_riak_kv_fetch = git
  2518. pkg_riak_kv_repo = https://github.com/basho/riak_kv
  2519. pkg_riak_kv_commit = develop
  2520. PACKAGES += riak_pipe
  2521. pkg_riak_pipe_name = riak_pipe
  2522. pkg_riak_pipe_description = Riak Pipelines
  2523. pkg_riak_pipe_homepage = https://github.com/basho/riak_pipe
  2524. pkg_riak_pipe_fetch = git
  2525. pkg_riak_pipe_repo = https://github.com/basho/riak_pipe
  2526. pkg_riak_pipe_commit = develop
  2527. PACKAGES += riak_sysmon
  2528. pkg_riak_sysmon_name = riak_sysmon
  2529. pkg_riak_sysmon_description = Simple OTP app for managing Erlang VM system_monitor event messages
  2530. pkg_riak_sysmon_homepage = https://github.com/basho/riak_sysmon
  2531. pkg_riak_sysmon_fetch = git
  2532. pkg_riak_sysmon_repo = https://github.com/basho/riak_sysmon
  2533. pkg_riak_sysmon_commit = master
  2534. PACKAGES += riakc
  2535. pkg_riakc_name = riakc
  2536. pkg_riakc_description = Erlang clients for Riak.
  2537. pkg_riakc_homepage = https://github.com/basho/riak-erlang-client
  2538. pkg_riakc_fetch = git
  2539. pkg_riakc_repo = https://github.com/basho/riak-erlang-client
  2540. pkg_riakc_commit = master
  2541. PACKAGES += rlimit
  2542. pkg_rlimit_name = rlimit
  2543. pkg_rlimit_description = Magnus Klaar's rate limiter code from etorrent
  2544. pkg_rlimit_homepage = https://github.com/jlouis/rlimit
  2545. pkg_rlimit_fetch = git
  2546. pkg_rlimit_repo = https://github.com/jlouis/rlimit
  2547. pkg_rlimit_commit = master
  2548. PACKAGES += rust_mk
  2549. pkg_rust_mk_name = rust_mk
  2550. pkg_rust_mk_description = Build Rust crates in an Erlang application
  2551. pkg_rust_mk_homepage = https://github.com/goertzenator/rust.mk
  2552. pkg_rust_mk_fetch = git
  2553. pkg_rust_mk_repo = https://github.com/goertzenator/rust.mk
  2554. pkg_rust_mk_commit = master
  2555. PACKAGES += safetyvalve
  2556. pkg_safetyvalve_name = safetyvalve
  2557. pkg_safetyvalve_description = A safety valve for your erlang node
  2558. pkg_safetyvalve_homepage = https://github.com/jlouis/safetyvalve
  2559. pkg_safetyvalve_fetch = git
  2560. pkg_safetyvalve_repo = https://github.com/jlouis/safetyvalve
  2561. pkg_safetyvalve_commit = master
  2562. PACKAGES += seestar
  2563. pkg_seestar_name = seestar
  2564. pkg_seestar_description = The Erlang client for Cassandra 1.2+ binary protocol
  2565. pkg_seestar_homepage = https://github.com/iamaleksey/seestar
  2566. pkg_seestar_fetch = git
  2567. pkg_seestar_repo = https://github.com/iamaleksey/seestar
  2568. pkg_seestar_commit = master
  2569. PACKAGES += setup
  2570. pkg_setup_name = setup
  2571. pkg_setup_description = Generic setup utility for Erlang-based systems
  2572. pkg_setup_homepage = https://github.com/uwiger/setup
  2573. pkg_setup_fetch = git
  2574. pkg_setup_repo = https://github.com/uwiger/setup
  2575. pkg_setup_commit = master
  2576. PACKAGES += sext
  2577. pkg_sext_name = sext
  2578. pkg_sext_description = Sortable Erlang Term Serialization
  2579. pkg_sext_homepage = https://github.com/uwiger/sext
  2580. pkg_sext_fetch = git
  2581. pkg_sext_repo = https://github.com/uwiger/sext
  2582. pkg_sext_commit = master
  2583. PACKAGES += sfmt
  2584. pkg_sfmt_name = sfmt
  2585. pkg_sfmt_description = SFMT pseudo random number generator for Erlang.
  2586. pkg_sfmt_homepage = https://github.com/jj1bdx/sfmt-erlang
  2587. pkg_sfmt_fetch = git
  2588. pkg_sfmt_repo = https://github.com/jj1bdx/sfmt-erlang
  2589. pkg_sfmt_commit = master
  2590. PACKAGES += sgte
  2591. pkg_sgte_name = sgte
  2592. pkg_sgte_description = A simple Erlang Template Engine
  2593. pkg_sgte_homepage = https://github.com/filippo/sgte
  2594. pkg_sgte_fetch = git
  2595. pkg_sgte_repo = https://github.com/filippo/sgte
  2596. pkg_sgte_commit = master
  2597. PACKAGES += sheriff
  2598. pkg_sheriff_name = sheriff
  2599. pkg_sheriff_description = Parse transform for type based validation.
  2600. pkg_sheriff_homepage = http://ninenines.eu
  2601. pkg_sheriff_fetch = git
  2602. pkg_sheriff_repo = https://github.com/extend/sheriff
  2603. pkg_sheriff_commit = master
  2604. PACKAGES += shotgun
  2605. pkg_shotgun_name = shotgun
  2606. pkg_shotgun_description = better than just a gun
  2607. pkg_shotgun_homepage = https://github.com/inaka/shotgun
  2608. pkg_shotgun_fetch = git
  2609. pkg_shotgun_repo = https://github.com/inaka/shotgun
  2610. pkg_shotgun_commit = master
  2611. PACKAGES += sidejob
  2612. pkg_sidejob_name = sidejob
  2613. pkg_sidejob_description = Parallel worker and capacity limiting library for Erlang
  2614. pkg_sidejob_homepage = https://github.com/basho/sidejob
  2615. pkg_sidejob_fetch = git
  2616. pkg_sidejob_repo = https://github.com/basho/sidejob
  2617. pkg_sidejob_commit = develop
  2618. PACKAGES += sieve
  2619. pkg_sieve_name = sieve
  2620. pkg_sieve_description = sieve is a simple TCP routing proxy (layer 7) in erlang
  2621. pkg_sieve_homepage = https://github.com/benoitc/sieve
  2622. pkg_sieve_fetch = git
  2623. pkg_sieve_repo = https://github.com/benoitc/sieve
  2624. pkg_sieve_commit = master
  2625. PACKAGES += simhash
  2626. pkg_simhash_name = simhash
  2627. pkg_simhash_description = Simhashing for Erlang -- hashing algorithm to find near-duplicates in binary data.
  2628. pkg_simhash_homepage = https://github.com/ferd/simhash
  2629. pkg_simhash_fetch = git
  2630. pkg_simhash_repo = https://github.com/ferd/simhash
  2631. pkg_simhash_commit = master
  2632. PACKAGES += simple_bridge
  2633. pkg_simple_bridge_name = simple_bridge
  2634. pkg_simple_bridge_description = A simple, standardized interface library to Erlang HTTP Servers.
  2635. pkg_simple_bridge_homepage = https://github.com/nitrogen/simple_bridge
  2636. pkg_simple_bridge_fetch = git
  2637. pkg_simple_bridge_repo = https://github.com/nitrogen/simple_bridge
  2638. pkg_simple_bridge_commit = master
  2639. PACKAGES += simple_oauth2
  2640. pkg_simple_oauth2_name = simple_oauth2
  2641. pkg_simple_oauth2_description = Simple erlang OAuth2 client module for any http server framework (Google, Facebook, Yandex, Vkontakte are preconfigured)
  2642. pkg_simple_oauth2_homepage = https://github.com/virtan/simple_oauth2
  2643. pkg_simple_oauth2_fetch = git
  2644. pkg_simple_oauth2_repo = https://github.com/virtan/simple_oauth2
  2645. pkg_simple_oauth2_commit = master
  2646. PACKAGES += skel
  2647. pkg_skel_name = skel
  2648. pkg_skel_description = A Streaming Process-based Skeleton Library for Erlang
  2649. pkg_skel_homepage = https://github.com/ParaPhrase/skel
  2650. pkg_skel_fetch = git
  2651. pkg_skel_repo = https://github.com/ParaPhrase/skel
  2652. pkg_skel_commit = master
  2653. PACKAGES += slack
  2654. pkg_slack_name = slack
  2655. pkg_slack_description = Minimal slack notification OTP library.
  2656. pkg_slack_homepage = https://github.com/DonBranson/slack
  2657. pkg_slack_fetch = git
  2658. pkg_slack_repo = https://github.com/DonBranson/slack.git
  2659. pkg_slack_commit = master
  2660. PACKAGES += snappyer
  2661. pkg_snappyer_name = snappyer
  2662. pkg_snappyer_description = Snappy as nif for Erlang
  2663. pkg_snappyer_homepage = https://github.com/zmstone/snappyer
  2664. pkg_snappyer_fetch = git
  2665. pkg_snappyer_repo = https://github.com/zmstone/snappyer.git
  2666. pkg_snappyer_commit = master
  2667. PACKAGES += social
  2668. pkg_social_name = social
  2669. pkg_social_description = Cowboy handler for social login via OAuth2 providers
  2670. pkg_social_homepage = https://github.com/dvv/social
  2671. pkg_social_fetch = git
  2672. pkg_social_repo = https://github.com/dvv/social
  2673. pkg_social_commit = master
  2674. PACKAGES += sqerl
  2675. pkg_sqerl_name = sqerl
  2676. pkg_sqerl_description = An Erlang-flavoured SQL DSL
  2677. pkg_sqerl_homepage = https://github.com/hairyhum/sqerl
  2678. pkg_sqerl_fetch = git
  2679. pkg_sqerl_repo = https://github.com/hairyhum/sqerl
  2680. pkg_sqerl_commit = master
  2681. PACKAGES += srly
  2682. pkg_srly_name = srly
  2683. pkg_srly_description = Native Erlang Unix serial interface
  2684. pkg_srly_homepage = https://github.com/msantos/srly
  2685. pkg_srly_fetch = git
  2686. pkg_srly_repo = https://github.com/msantos/srly
  2687. pkg_srly_commit = master
  2688. PACKAGES += sshrpc
  2689. pkg_sshrpc_name = sshrpc
  2690. pkg_sshrpc_description = Erlang SSH RPC module (experimental)
  2691. pkg_sshrpc_homepage = https://github.com/jj1bdx/sshrpc
  2692. pkg_sshrpc_fetch = git
  2693. pkg_sshrpc_repo = https://github.com/jj1bdx/sshrpc
  2694. pkg_sshrpc_commit = master
  2695. PACKAGES += stable
  2696. pkg_stable_name = stable
  2697. pkg_stable_description = Library of assorted helpers for Cowboy web server.
  2698. pkg_stable_homepage = https://github.com/dvv/stable
  2699. pkg_stable_fetch = git
  2700. pkg_stable_repo = https://github.com/dvv/stable
  2701. pkg_stable_commit = master
  2702. PACKAGES += statebox
  2703. pkg_statebox_name = statebox
  2704. pkg_statebox_description = Erlang state monad with merge/conflict-resolution capabilities. Useful for Riak.
  2705. pkg_statebox_homepage = https://github.com/mochi/statebox
  2706. pkg_statebox_fetch = git
  2707. pkg_statebox_repo = https://github.com/mochi/statebox
  2708. pkg_statebox_commit = master
  2709. PACKAGES += statman
  2710. pkg_statman_name = statman
  2711. pkg_statman_description = Efficiently collect massive volumes of metrics inside the Erlang VM
  2712. pkg_statman_homepage = https://github.com/knutin/statman
  2713. pkg_statman_fetch = git
  2714. pkg_statman_repo = https://github.com/knutin/statman
  2715. pkg_statman_commit = master
  2716. PACKAGES += statsderl
  2717. pkg_statsderl_name = statsderl
  2718. pkg_statsderl_description = StatsD client (erlang)
  2719. pkg_statsderl_homepage = https://github.com/lpgauth/statsderl
  2720. pkg_statsderl_fetch = git
  2721. pkg_statsderl_repo = https://github.com/lpgauth/statsderl
  2722. pkg_statsderl_commit = master
  2723. PACKAGES += stdinout_pool
  2724. pkg_stdinout_pool_name = stdinout_pool
  2725. pkg_stdinout_pool_description = stdinout_pool : stuff goes in, stuff goes out. there's never any miscommunication.
  2726. pkg_stdinout_pool_homepage = https://github.com/mattsta/erlang-stdinout-pool
  2727. pkg_stdinout_pool_fetch = git
  2728. pkg_stdinout_pool_repo = https://github.com/mattsta/erlang-stdinout-pool
  2729. pkg_stdinout_pool_commit = master
  2730. PACKAGES += stockdb
  2731. pkg_stockdb_name = stockdb
  2732. pkg_stockdb_description = Database for storing Stock Exchange quotes in erlang
  2733. pkg_stockdb_homepage = https://github.com/maxlapshin/stockdb
  2734. pkg_stockdb_fetch = git
  2735. pkg_stockdb_repo = https://github.com/maxlapshin/stockdb
  2736. pkg_stockdb_commit = master
  2737. PACKAGES += subproc
  2738. pkg_subproc_name = subproc
  2739. pkg_subproc_description = unix subprocess manager with {active,once|false} modes
  2740. pkg_subproc_homepage = http://dozzie.jarowit.net/trac/wiki/subproc
  2741. pkg_subproc_fetch = git
  2742. pkg_subproc_repo = https://github.com/dozzie/subproc
  2743. pkg_subproc_commit = v0.1.0
  2744. PACKAGES += supervisor3
  2745. pkg_supervisor3_name = supervisor3
  2746. pkg_supervisor3_description = OTP supervisor with additional strategies
  2747. pkg_supervisor3_homepage = https://github.com/klarna/supervisor3
  2748. pkg_supervisor3_fetch = git
  2749. pkg_supervisor3_repo = https://github.com/klarna/supervisor3.git
  2750. pkg_supervisor3_commit = master
  2751. PACKAGES += swab
  2752. pkg_swab_name = swab
  2753. pkg_swab_description = General purpose buffer handling module
  2754. pkg_swab_homepage = https://github.com/crownedgrouse/swab
  2755. pkg_swab_fetch = git
  2756. pkg_swab_repo = https://github.com/crownedgrouse/swab
  2757. pkg_swab_commit = master
  2758. PACKAGES += swarm
  2759. pkg_swarm_name = swarm
  2760. pkg_swarm_description = Fast and simple acceptor pool for Erlang
  2761. pkg_swarm_homepage = https://github.com/jeremey/swarm
  2762. pkg_swarm_fetch = git
  2763. pkg_swarm_repo = https://github.com/jeremey/swarm
  2764. pkg_swarm_commit = master
  2765. PACKAGES += switchboard
  2766. pkg_switchboard_name = switchboard
  2767. pkg_switchboard_description = A framework for processing email using worker plugins.
  2768. pkg_switchboard_homepage = https://github.com/thusfresh/switchboard
  2769. pkg_switchboard_fetch = git
  2770. pkg_switchboard_repo = https://github.com/thusfresh/switchboard
  2771. pkg_switchboard_commit = master
  2772. PACKAGES += syn
  2773. pkg_syn_name = syn
  2774. pkg_syn_description = A global Process Registry and Process Group manager for Erlang.
  2775. pkg_syn_homepage = https://github.com/ostinelli/syn
  2776. pkg_syn_fetch = git
  2777. pkg_syn_repo = https://github.com/ostinelli/syn
  2778. pkg_syn_commit = master
  2779. PACKAGES += sync
  2780. pkg_sync_name = sync
  2781. pkg_sync_description = On-the-fly recompiling and reloading in Erlang.
  2782. pkg_sync_homepage = https://github.com/rustyio/sync
  2783. pkg_sync_fetch = git
  2784. pkg_sync_repo = https://github.com/rustyio/sync
  2785. pkg_sync_commit = master
  2786. PACKAGES += syntaxerl
  2787. pkg_syntaxerl_name = syntaxerl
  2788. pkg_syntaxerl_description = Syntax checker for Erlang
  2789. pkg_syntaxerl_homepage = https://github.com/ten0s/syntaxerl
  2790. pkg_syntaxerl_fetch = git
  2791. pkg_syntaxerl_repo = https://github.com/ten0s/syntaxerl
  2792. pkg_syntaxerl_commit = master
  2793. PACKAGES += syslog
  2794. pkg_syslog_name = syslog
  2795. pkg_syslog_description = Erlang port driver for interacting with syslog via syslog(3)
  2796. pkg_syslog_homepage = https://github.com/Vagabond/erlang-syslog
  2797. pkg_syslog_fetch = git
  2798. pkg_syslog_repo = https://github.com/Vagabond/erlang-syslog
  2799. pkg_syslog_commit = master
  2800. PACKAGES += taskforce
  2801. pkg_taskforce_name = taskforce
  2802. pkg_taskforce_description = Erlang worker pools for controlled parallelisation of arbitrary tasks.
  2803. pkg_taskforce_homepage = https://github.com/g-andrade/taskforce
  2804. pkg_taskforce_fetch = git
  2805. pkg_taskforce_repo = https://github.com/g-andrade/taskforce
  2806. pkg_taskforce_commit = master
  2807. PACKAGES += tddreloader
  2808. pkg_tddreloader_name = tddreloader
  2809. pkg_tddreloader_description = Shell utility for recompiling, reloading, and testing code as it changes
  2810. pkg_tddreloader_homepage = https://github.com/version2beta/tddreloader
  2811. pkg_tddreloader_fetch = git
  2812. pkg_tddreloader_repo = https://github.com/version2beta/tddreloader
  2813. pkg_tddreloader_commit = master
  2814. PACKAGES += tempo
  2815. pkg_tempo_name = tempo
  2816. pkg_tempo_description = NIF-based date and time parsing and formatting for Erlang.
  2817. pkg_tempo_homepage = https://github.com/selectel/tempo
  2818. pkg_tempo_fetch = git
  2819. pkg_tempo_repo = https://github.com/selectel/tempo
  2820. pkg_tempo_commit = master
  2821. PACKAGES += tinymq
  2822. pkg_tinymq_name = tinymq
  2823. pkg_tinymq_description = TinyMQ - a diminutive, in-memory message queue
  2824. pkg_tinymq_homepage = https://github.com/ChicagoBoss/tinymq
  2825. pkg_tinymq_fetch = git
  2826. pkg_tinymq_repo = https://github.com/ChicagoBoss/tinymq
  2827. pkg_tinymq_commit = master
  2828. PACKAGES += tinymt
  2829. pkg_tinymt_name = tinymt
  2830. pkg_tinymt_description = TinyMT pseudo random number generator for Erlang.
  2831. pkg_tinymt_homepage = https://github.com/jj1bdx/tinymt-erlang
  2832. pkg_tinymt_fetch = git
  2833. pkg_tinymt_repo = https://github.com/jj1bdx/tinymt-erlang
  2834. pkg_tinymt_commit = master
  2835. PACKAGES += tirerl
  2836. pkg_tirerl_name = tirerl
  2837. pkg_tirerl_description = Erlang interface to Elastic Search
  2838. pkg_tirerl_homepage = https://github.com/inaka/tirerl
  2839. pkg_tirerl_fetch = git
  2840. pkg_tirerl_repo = https://github.com/inaka/tirerl
  2841. pkg_tirerl_commit = master
  2842. PACKAGES += toml
  2843. pkg_toml_name = toml
  2844. pkg_toml_description = TOML (0.4.0) config parser
  2845. pkg_toml_homepage = http://dozzie.jarowit.net/trac/wiki/TOML
  2846. pkg_toml_fetch = git
  2847. pkg_toml_repo = https://github.com/dozzie/toml
  2848. pkg_toml_commit = v0.2.0
  2849. PACKAGES += traffic_tools
  2850. pkg_traffic_tools_name = traffic_tools
  2851. pkg_traffic_tools_description = Simple traffic limiting library
  2852. pkg_traffic_tools_homepage = https://github.com/systra/traffic_tools
  2853. pkg_traffic_tools_fetch = git
  2854. pkg_traffic_tools_repo = https://github.com/systra/traffic_tools
  2855. pkg_traffic_tools_commit = master
  2856. PACKAGES += trails
  2857. pkg_trails_name = trails
  2858. pkg_trails_description = A couple of improvements over Cowboy Routes
  2859. pkg_trails_homepage = http://inaka.github.io/cowboy-trails/
  2860. pkg_trails_fetch = git
  2861. pkg_trails_repo = https://github.com/inaka/cowboy-trails
  2862. pkg_trails_commit = master
  2863. PACKAGES += trane
  2864. pkg_trane_name = trane
  2865. pkg_trane_description = SAX style broken HTML parser in Erlang
  2866. pkg_trane_homepage = https://github.com/massemanet/trane
  2867. pkg_trane_fetch = git
  2868. pkg_trane_repo = https://github.com/massemanet/trane
  2869. pkg_trane_commit = master
  2870. PACKAGES += trie
  2871. pkg_trie_name = trie
  2872. pkg_trie_description = Erlang Trie Implementation
  2873. pkg_trie_homepage = https://github.com/okeuday/trie
  2874. pkg_trie_fetch = git
  2875. pkg_trie_repo = https://github.com/okeuday/trie
  2876. pkg_trie_commit = master
  2877. PACKAGES += triq
  2878. pkg_triq_name = triq
  2879. pkg_triq_description = Trifork QuickCheck
  2880. pkg_triq_homepage = https://triq.gitlab.io
  2881. pkg_triq_fetch = git
  2882. pkg_triq_repo = https://gitlab.com/triq/triq.git
  2883. pkg_triq_commit = master
  2884. PACKAGES += tunctl
  2885. pkg_tunctl_name = tunctl
  2886. pkg_tunctl_description = Erlang TUN/TAP interface
  2887. pkg_tunctl_homepage = https://github.com/msantos/tunctl
  2888. pkg_tunctl_fetch = git
  2889. pkg_tunctl_repo = https://github.com/msantos/tunctl
  2890. pkg_tunctl_commit = master
  2891. PACKAGES += unicorn
  2892. pkg_unicorn_name = unicorn
  2893. pkg_unicorn_description = Generic configuration server
  2894. pkg_unicorn_homepage = https://github.com/shizzard/unicorn
  2895. pkg_unicorn_fetch = git
  2896. pkg_unicorn_repo = https://github.com/shizzard/unicorn
  2897. pkg_unicorn_commit = master
  2898. PACKAGES += unsplit
  2899. pkg_unsplit_name = unsplit
  2900. pkg_unsplit_description = Resolves conflicts in Mnesia after network splits
  2901. pkg_unsplit_homepage = https://github.com/uwiger/unsplit
  2902. pkg_unsplit_fetch = git
  2903. pkg_unsplit_repo = https://github.com/uwiger/unsplit
  2904. pkg_unsplit_commit = master
  2905. PACKAGES += uuid
  2906. pkg_uuid_name = uuid
  2907. pkg_uuid_description = Erlang UUID Implementation
  2908. pkg_uuid_homepage = https://github.com/okeuday/uuid
  2909. pkg_uuid_fetch = git
  2910. pkg_uuid_repo = https://github.com/okeuday/uuid
  2911. pkg_uuid_commit = master
  2912. PACKAGES += ux
  2913. pkg_ux_name = ux
  2914. pkg_ux_description = Unicode eXtention for Erlang (Strings, Collation)
  2915. pkg_ux_homepage = https://github.com/erlang-unicode/ux
  2916. pkg_ux_fetch = git
  2917. pkg_ux_repo = https://github.com/erlang-unicode/ux
  2918. pkg_ux_commit = master
  2919. PACKAGES += verx
  2920. pkg_verx_name = verx
  2921. pkg_verx_description = Erlang implementation of the libvirtd remote protocol
  2922. pkg_verx_homepage = https://github.com/msantos/verx
  2923. pkg_verx_fetch = git
  2924. pkg_verx_repo = https://github.com/msantos/verx
  2925. pkg_verx_commit = master
  2926. PACKAGES += vmq_bridge
  2927. pkg_vmq_bridge_name = vmq_bridge
  2928. pkg_vmq_bridge_description = Component of VerneMQ: A distributed MQTT message broker
  2929. pkg_vmq_bridge_homepage = https://verne.mq/
  2930. pkg_vmq_bridge_fetch = git
  2931. pkg_vmq_bridge_repo = https://github.com/erlio/vmq_bridge
  2932. pkg_vmq_bridge_commit = master
  2933. PACKAGES += vmstats
  2934. pkg_vmstats_name = vmstats
  2935. pkg_vmstats_description = tiny Erlang app that works in conjunction with statsderl in order to generate information on the Erlang VM for graphite logs.
  2936. pkg_vmstats_homepage = https://github.com/ferd/vmstats
  2937. pkg_vmstats_fetch = git
  2938. pkg_vmstats_repo = https://github.com/ferd/vmstats
  2939. pkg_vmstats_commit = master
  2940. PACKAGES += walrus
  2941. pkg_walrus_name = walrus
  2942. pkg_walrus_description = Walrus - Mustache-like Templating
  2943. pkg_walrus_homepage = https://github.com/devinus/walrus
  2944. pkg_walrus_fetch = git
  2945. pkg_walrus_repo = https://github.com/devinus/walrus
  2946. pkg_walrus_commit = master
  2947. PACKAGES += webmachine
  2948. pkg_webmachine_name = webmachine
  2949. pkg_webmachine_description = A REST-based system for building web applications.
  2950. pkg_webmachine_homepage = https://github.com/basho/webmachine
  2951. pkg_webmachine_fetch = git
  2952. pkg_webmachine_repo = https://github.com/basho/webmachine
  2953. pkg_webmachine_commit = master
  2954. PACKAGES += websocket_client
  2955. pkg_websocket_client_name = websocket_client
  2956. pkg_websocket_client_description = Erlang websocket client (ws and wss supported)
  2957. pkg_websocket_client_homepage = https://github.com/jeremyong/websocket_client
  2958. pkg_websocket_client_fetch = git
  2959. pkg_websocket_client_repo = https://github.com/jeremyong/websocket_client
  2960. pkg_websocket_client_commit = master
  2961. PACKAGES += worker_pool
  2962. pkg_worker_pool_name = worker_pool
  2963. pkg_worker_pool_description = a simple erlang worker pool
  2964. pkg_worker_pool_homepage = https://github.com/inaka/worker_pool
  2965. pkg_worker_pool_fetch = git
  2966. pkg_worker_pool_repo = https://github.com/inaka/worker_pool
  2967. pkg_worker_pool_commit = main
  2968. PACKAGES += wrangler
  2969. pkg_wrangler_name = wrangler
  2970. pkg_wrangler_description = Import of the Wrangler svn repository.
  2971. pkg_wrangler_homepage = http://www.cs.kent.ac.uk/projects/wrangler/Home.html
  2972. pkg_wrangler_fetch = git
  2973. pkg_wrangler_repo = https://github.com/RefactoringTools/wrangler
  2974. pkg_wrangler_commit = master
  2975. PACKAGES += wsock
  2976. pkg_wsock_name = wsock
  2977. pkg_wsock_description = Erlang library to build WebSocket clients and servers
  2978. pkg_wsock_homepage = https://github.com/madtrick/wsock
  2979. pkg_wsock_fetch = git
  2980. pkg_wsock_repo = https://github.com/madtrick/wsock
  2981. pkg_wsock_commit = master
  2982. PACKAGES += xhttpc
  2983. pkg_xhttpc_name = xhttpc
  2984. pkg_xhttpc_description = Extensible HTTP Client for Erlang
  2985. pkg_xhttpc_homepage = https://github.com/seriyps/xhttpc
  2986. pkg_xhttpc_fetch = git
  2987. pkg_xhttpc_repo = https://github.com/seriyps/xhttpc
  2988. pkg_xhttpc_commit = master
  2989. PACKAGES += xref_runner
  2990. pkg_xref_runner_name = xref_runner
  2991. pkg_xref_runner_description = Erlang Xref Runner (inspired in rebar xref)
  2992. pkg_xref_runner_homepage = https://github.com/inaka/xref_runner
  2993. pkg_xref_runner_fetch = git
  2994. pkg_xref_runner_repo = https://github.com/inaka/xref_runner
  2995. pkg_xref_runner_commit = master
  2996. PACKAGES += yamerl
  2997. pkg_yamerl_name = yamerl
  2998. pkg_yamerl_description = YAML 1.2 parser in pure Erlang
  2999. pkg_yamerl_homepage = https://github.com/yakaz/yamerl
  3000. pkg_yamerl_fetch = git
  3001. pkg_yamerl_repo = https://github.com/yakaz/yamerl
  3002. pkg_yamerl_commit = master
  3003. PACKAGES += yamler
  3004. pkg_yamler_name = yamler
  3005. pkg_yamler_description = libyaml-based yaml loader for Erlang
  3006. pkg_yamler_homepage = https://github.com/goertzenator/yamler
  3007. pkg_yamler_fetch = git
  3008. pkg_yamler_repo = https://github.com/goertzenator/yamler
  3009. pkg_yamler_commit = master
  3010. PACKAGES += yaws
  3011. pkg_yaws_name = yaws
  3012. pkg_yaws_description = Yaws webserver
  3013. pkg_yaws_homepage = http://yaws.hyber.org
  3014. pkg_yaws_fetch = git
  3015. pkg_yaws_repo = https://github.com/klacke/yaws
  3016. pkg_yaws_commit = master
  3017. PACKAGES += zippers
  3018. pkg_zippers_name = zippers
  3019. pkg_zippers_description = A library for functional zipper data structures in Erlang. Read more on zippers
  3020. pkg_zippers_homepage = https://github.com/ferd/zippers
  3021. pkg_zippers_fetch = git
  3022. pkg_zippers_repo = https://github.com/ferd/zippers
  3023. pkg_zippers_commit = master
  3024. PACKAGES += zlists
  3025. pkg_zlists_name = zlists
  3026. pkg_zlists_description = Erlang lazy lists library.
  3027. pkg_zlists_homepage = https://github.com/vjache/erlang-zlists
  3028. pkg_zlists_fetch = git
  3029. pkg_zlists_repo = https://github.com/vjache/erlang-zlists
  3030. pkg_zlists_commit = master
  3031. PACKAGES += zucchini
  3032. pkg_zucchini_name = zucchini
  3033. pkg_zucchini_description = An Erlang INI parser
  3034. pkg_zucchini_homepage = https://github.com/devinus/zucchini
  3035. pkg_zucchini_fetch = git
  3036. pkg_zucchini_repo = https://github.com/devinus/zucchini
  3037. pkg_zucchini_commit = master
  3038. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  3039. # This file is part of erlang.mk and subject to the terms of the ISC License.
  3040. .PHONY: search
  3041. define pkg_print
  3042. $(verbose) printf "%s\n" \
  3043. $(if $(call core_eq,$(1),$(pkg_$(1)_name)),,"Pkg name: $(1)") \
  3044. "App name: $(pkg_$(1)_name)" \
  3045. "Description: $(pkg_$(1)_description)" \
  3046. "Home page: $(pkg_$(1)_homepage)" \
  3047. "Fetch with: $(pkg_$(1)_fetch)" \
  3048. "Repository: $(pkg_$(1)_repo)" \
  3049. "Commit: $(pkg_$(1)_commit)" \
  3050. ""
  3051. endef
  3052. search:
  3053. ifdef q
  3054. $(foreach p,$(PACKAGES), \
  3055. $(if $(findstring $(call core_lc,$(q)),$(call core_lc,$(pkg_$(p)_name) $(pkg_$(p)_description))), \
  3056. $(call pkg_print,$(p))))
  3057. else
  3058. $(foreach p,$(PACKAGES),$(call pkg_print,$(p)))
  3059. endif
  3060. # Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
  3061. # This file is part of erlang.mk and subject to the terms of the ISC License.
  3062. .PHONY: distclean-deps clean-tmp-deps.log
  3063. # Configuration.
  3064. ifdef OTP_DEPS
  3065. $(warning The variable OTP_DEPS is deprecated in favor of LOCAL_DEPS.)
  3066. endif
  3067. IGNORE_DEPS ?=
  3068. export IGNORE_DEPS
  3069. APPS_DIR ?= $(CURDIR)/apps
  3070. export APPS_DIR
  3071. DEPS_DIR ?= $(CURDIR)/deps
  3072. export DEPS_DIR
  3073. REBAR_DEPS_DIR = $(DEPS_DIR)
  3074. export REBAR_DEPS_DIR
  3075. REBAR3_GIT ?= https://github.com/erlang/rebar3
  3076. REBAR3_COMMIT ?= 3f563feaf1091a1980241adefa83a32dd2eebf7c # 3.20.0
  3077. CACHE_DEPS ?= 0
  3078. CACHE_DIR ?= $(if $(XDG_CACHE_HOME),$(XDG_CACHE_HOME),$(HOME)/.cache)/erlang.mk
  3079. export CACHE_DIR
  3080. # External "early" plugins (see core/plugins.mk for regular plugins).
  3081. # They both use the core_dep_plugin macro.
  3082. define core_dep_plugin
  3083. ifeq ($(2),$(PROJECT))
  3084. -include $$(patsubst $(PROJECT)/%,%,$(1))
  3085. else
  3086. -include $(DEPS_DIR)/$(1)
  3087. $(DEPS_DIR)/$(1): $(DEPS_DIR)/$(2) ;
  3088. endif
  3089. endef
  3090. DEP_EARLY_PLUGINS ?=
  3091. $(foreach p,$(DEP_EARLY_PLUGINS),\
  3092. $(eval $(if $(findstring /,$p),\
  3093. $(call core_dep_plugin,$p,$(firstword $(subst /, ,$p))),\
  3094. $(call core_dep_plugin,$p/early-plugins.mk,$p))))
  3095. # Query functions.
  3096. query_fetch_method = $(if $(dep_$(1)),$(call _qfm_dep,$(word 1,$(dep_$(1)))),$(call _qfm_pkg,$(1)))
  3097. _qfm_dep = $(if $(dep_fetch_$(1)),$(1),$(if $(IS_DEP),legacy,fail))
  3098. _qfm_pkg = $(if $(pkg_$(1)_fetch),$(pkg_$(1)_fetch),fail)
  3099. query_name = $(if $(dep_$(1)),$(1),$(if $(pkg_$(1)_name),$(pkg_$(1)_name),$(1)))
  3100. query_repo = $(call _qr,$(1),$(call query_fetch_method,$(1)))
  3101. _qr = $(if $(query_repo_$(2)),$(call query_repo_$(2),$(1)),$(call dep_repo,$(1)))
  3102. query_repo_default = $(if $(dep_$(1)),$(word 2,$(dep_$(1))),$(pkg_$(1)_repo))
  3103. query_repo_git = $(patsubst git://github.com/%,https://github.com/%,$(call query_repo_default,$(1)))
  3104. query_repo_git-subfolder = $(call query_repo_git,$(1))
  3105. query_repo_git-submodule = -
  3106. query_repo_hg = $(call query_repo_default,$(1))
  3107. query_repo_svn = $(call query_repo_default,$(1))
  3108. query_repo_cp = $(call query_repo_default,$(1))
  3109. query_repo_ln = $(call query_repo_default,$(1))
  3110. query_repo_hex = https://hex.pm/packages/$(if $(word 3,$(dep_$(1))),$(word 3,$(dep_$(1))),$(1))
  3111. query_repo_fail = -
  3112. query_repo_legacy = -
  3113. query_version = $(call _qv,$(1),$(call query_fetch_method,$(1)))
  3114. _qv = $(if $(query_version_$(2)),$(call query_version_$(2),$(1)),$(call dep_commit,$(1)))
  3115. query_version_default = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(word 3,$(dep_$(1))),$(pkg_$(1)_commit)))
  3116. query_version_git = $(call query_version_default,$(1))
  3117. query_version_git-subfolder = $(call query_version_git,$(1))
  3118. query_version_git-submodule = -
  3119. query_version_hg = $(call query_version_default,$(1))
  3120. query_version_svn = -
  3121. query_version_cp = -
  3122. query_version_ln = -
  3123. query_version_hex = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(word 2,$(dep_$(1))),$(pkg_$(1)_commit)))
  3124. query_version_fail = -
  3125. query_version_legacy = -
  3126. query_extra = $(call _qe,$(1),$(call query_fetch_method,$(1)))
  3127. _qe = $(if $(query_extra_$(2)),$(call query_extra_$(2),$(1)),-)
  3128. query_extra_git = -
  3129. query_extra_git-subfolder = $(if $(dep_$(1)),subfolder=$(word 4,$(dep_$(1))),-)
  3130. query_extra_git-submodule = -
  3131. query_extra_hg = -
  3132. query_extra_svn = -
  3133. query_extra_cp = -
  3134. query_extra_ln = -
  3135. query_extra_hex = $(if $(dep_$(1)),package-name=$(word 3,$(dep_$(1))),-)
  3136. query_extra_fail = -
  3137. query_extra_legacy = -
  3138. query_absolute_path = $(addprefix $(DEPS_DIR)/,$(call query_name,$(1)))
  3139. # Deprecated legacy query functions.
  3140. dep_fetch = $(call query_fetch_method,$(1))
  3141. dep_name = $(call query_name,$(1))
  3142. dep_repo = $(call query_repo_git,$(1))
  3143. dep_commit = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(if $(filter hex,$(word 1,$(dep_$(1)))),$(word 2,$(dep_$(1))),$(word 3,$(dep_$(1)))),$(pkg_$(1)_commit)))
  3144. LOCAL_DEPS_DIRS = $(foreach a,$(LOCAL_DEPS),$(if $(wildcard $(APPS_DIR)/$(a)),$(APPS_DIR)/$(a)))
  3145. ALL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(foreach dep,$(filter-out $(IGNORE_DEPS),$(BUILD_DEPS) $(DEPS)),$(call dep_name,$(dep))))
  3146. # When we are calling an app directly we don't want to include it here
  3147. # otherwise it'll be treated both as an apps and a top-level project.
  3148. ALL_APPS_DIRS = $(if $(wildcard $(APPS_DIR)/),$(filter-out $(APPS_DIR),$(shell find $(APPS_DIR) -maxdepth 1 -type d)))
  3149. ifdef ROOT_DIR
  3150. ifndef IS_APP
  3151. ALL_APPS_DIRS := $(filter-out $(APPS_DIR)/$(notdir $(CURDIR)),$(ALL_APPS_DIRS))
  3152. endif
  3153. endif
  3154. ifeq ($(filter $(APPS_DIR) $(DEPS_DIR),$(subst :, ,$(ERL_LIBS))),)
  3155. ifeq ($(ERL_LIBS),)
  3156. ERL_LIBS = $(APPS_DIR):$(DEPS_DIR)
  3157. else
  3158. ERL_LIBS := $(ERL_LIBS):$(APPS_DIR):$(DEPS_DIR)
  3159. endif
  3160. endif
  3161. export ERL_LIBS
  3162. export NO_AUTOPATCH
  3163. # Verbosity.
  3164. dep_verbose_0 = @echo " DEP $1 ($(call dep_commit,$1))";
  3165. dep_verbose_2 = set -x;
  3166. dep_verbose = $(dep_verbose_$(V))
  3167. # Optimization: don't recompile deps unless truly necessary.
  3168. ifndef IS_DEP
  3169. ifneq ($(MAKELEVEL),0)
  3170. $(shell rm -f ebin/dep_built)
  3171. endif
  3172. endif
  3173. # Core targets.
  3174. ALL_APPS_DIRS_TO_BUILD = $(if $(LOCAL_DEPS_DIRS)$(IS_APP),$(LOCAL_DEPS_DIRS),$(ALL_APPS_DIRS))
  3175. apps:: $(ALL_APPS_DIRS) clean-tmp-deps.log | $(ERLANG_MK_TMP)
  3176. # Create ebin directory for all apps to make sure Erlang recognizes them
  3177. # as proper OTP applications when using -include_lib. This is a temporary
  3178. # fix, a proper fix would be to compile apps/* in the right order.
  3179. ifndef IS_APP
  3180. ifneq ($(ALL_APPS_DIRS),)
  3181. $(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \
  3182. mkdir -p $$dep/ebin; \
  3183. done
  3184. endif
  3185. endif
  3186. # At the toplevel: if LOCAL_DEPS is defined with at least one local app, only
  3187. # compile that list of apps. Otherwise, compile everything.
  3188. # Within an app: compile all LOCAL_DEPS that are (uncompiled) local apps.
  3189. ifneq ($(ALL_APPS_DIRS_TO_BUILD),)
  3190. $(verbose) set -e; for dep in $(ALL_APPS_DIRS_TO_BUILD); do \
  3191. if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/apps.log; then \
  3192. :; \
  3193. else \
  3194. echo $$dep >> $(ERLANG_MK_TMP)/apps.log; \
  3195. $(MAKE) -C $$dep $(if $(IS_TEST),test-build-app) IS_APP=1; \
  3196. fi \
  3197. done
  3198. endif
  3199. clean-tmp-deps.log:
  3200. ifeq ($(IS_APP)$(IS_DEP),)
  3201. $(verbose) rm -f $(ERLANG_MK_TMP)/apps.log $(ERLANG_MK_TMP)/deps.log
  3202. endif
  3203. # Erlang.mk does not rebuild dependencies after they were compiled
  3204. # once. If a developer is working on the top-level project and some
  3205. # dependencies at the same time, he may want to change this behavior.
  3206. # There are two solutions:
  3207. # 1. Set `FULL=1` so that all dependencies are visited and
  3208. # recursively recompiled if necessary.
  3209. # 2. Set `FORCE_REBUILD=` to the specific list of dependencies that
  3210. # should be recompiled (instead of the whole set).
  3211. FORCE_REBUILD ?=
  3212. ifeq ($(origin FULL),undefined)
  3213. ifneq ($(strip $(force_rebuild_dep)$(FORCE_REBUILD)),)
  3214. define force_rebuild_dep
  3215. echo "$(FORCE_REBUILD)" | grep -qw "$$(basename "$1")"
  3216. endef
  3217. endif
  3218. endif
  3219. ifneq ($(SKIP_DEPS),)
  3220. deps::
  3221. else
  3222. deps:: $(ALL_DEPS_DIRS) apps clean-tmp-deps.log | $(ERLANG_MK_TMP)
  3223. ifneq ($(ALL_DEPS_DIRS),)
  3224. $(verbose) set -e; for dep in $(ALL_DEPS_DIRS); do \
  3225. if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/deps.log; then \
  3226. :; \
  3227. else \
  3228. echo $$dep >> $(ERLANG_MK_TMP)/deps.log; \
  3229. if [ -z "$(strip $(FULL))" ] $(if $(force_rebuild_dep),&& ! ($(call force_rebuild_dep,$$dep)),) && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \
  3230. :; \
  3231. elif [ "$$dep" = "$(DEPS_DIR)/hut" -a "$(HUT_PATCH)" ]; then \
  3232. $(MAKE) -C $$dep app IS_DEP=1; \
  3233. if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \
  3234. elif [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ]; then \
  3235. $(MAKE) -C $$dep IS_DEP=1; \
  3236. if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \
  3237. else \
  3238. echo "Error: No Makefile to build dependency $$dep." >&2; \
  3239. exit 2; \
  3240. fi \
  3241. fi \
  3242. done
  3243. endif
  3244. endif
  3245. # Deps related targets.
  3246. # @todo rename GNUmakefile and makefile into Makefile first, if they exist
  3247. # While Makefile file could be GNUmakefile or makefile,
  3248. # in practice only Makefile is needed so far.
  3249. define dep_autopatch
  3250. if [ -f $(DEPS_DIR)/$(1)/erlang.mk ]; then \
  3251. rm -rf $(DEPS_DIR)/$1/ebin/; \
  3252. $(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \
  3253. $(call dep_autopatch_erlang_mk,$(1)); \
  3254. elif [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \
  3255. if [ -f $(DEPS_DIR)/$1/rebar.lock ]; then \
  3256. $(call dep_autopatch2,$1); \
  3257. elif [ 0 != `grep -c "include ../\w*\.mk" $(DEPS_DIR)/$(1)/Makefile` ]; then \
  3258. $(call dep_autopatch2,$(1)); \
  3259. elif [ 0 != `grep -ci "^[^#].*rebar" $(DEPS_DIR)/$(1)/Makefile` ]; then \
  3260. $(call dep_autopatch2,$(1)); \
  3261. elif [ -n "`find $(DEPS_DIR)/$(1)/ -type f -name \*.mk -not -name erlang.mk -exec grep -i "^[^#].*rebar" '{}' \;`" ]; then \
  3262. $(call dep_autopatch2,$(1)); \
  3263. fi \
  3264. else \
  3265. if [ ! -d $(DEPS_DIR)/$(1)/src/ ]; then \
  3266. $(call dep_autopatch_noop,$(1)); \
  3267. else \
  3268. $(call dep_autopatch2,$(1)); \
  3269. fi \
  3270. fi
  3271. endef
  3272. define dep_autopatch2
  3273. ! test -f $(DEPS_DIR)/$1/ebin/$1.app || \
  3274. mv -n $(DEPS_DIR)/$1/ebin/$1.app $(DEPS_DIR)/$1/src/$1.app.src; \
  3275. rm -f $(DEPS_DIR)/$1/ebin/$1.app; \
  3276. if [ -f $(DEPS_DIR)/$1/src/$1.app.src.script ]; then \
  3277. $(call erlang,$(call dep_autopatch_appsrc_script.erl,$(1))); \
  3278. fi; \
  3279. $(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \
  3280. if [ -f $(DEPS_DIR)/$(1)/rebar -o -f $(DEPS_DIR)/$(1)/rebar.config -o -f $(DEPS_DIR)/$(1)/rebar.config.script -o -f $(DEPS_DIR)/$1/rebar.lock ]; then \
  3281. $(call dep_autopatch_fetch_rebar); \
  3282. $(call dep_autopatch_rebar,$(1)); \
  3283. else \
  3284. $(call dep_autopatch_gen,$(1)); \
  3285. fi
  3286. endef
  3287. define dep_autopatch_noop
  3288. printf "noop:\n" > $(DEPS_DIR)/$(1)/Makefile
  3289. endef
  3290. # Replace "include erlang.mk" with a line that will load the parent Erlang.mk
  3291. # if given. Do it for all 3 possible Makefile file names.
  3292. ifeq ($(NO_AUTOPATCH_ERLANG_MK),)
  3293. define dep_autopatch_erlang_mk
  3294. for f in Makefile makefile GNUmakefile; do \
  3295. if [ -f $(DEPS_DIR)/$1/$$f ]; then \
  3296. sed -i.bak s/'include *erlang.mk'/'include $$(if $$(ERLANG_MK_FILENAME),$$(ERLANG_MK_FILENAME),erlang.mk)'/ $(DEPS_DIR)/$1/$$f; \
  3297. fi \
  3298. done
  3299. endef
  3300. else
  3301. define dep_autopatch_erlang_mk
  3302. :
  3303. endef
  3304. endif
  3305. define dep_autopatch_gen
  3306. printf "%s\n" \
  3307. "ERLC_OPTS = +debug_info" \
  3308. "include ../../erlang.mk" > $(DEPS_DIR)/$(1)/Makefile
  3309. endef
  3310. # We use flock/lockf when available to avoid concurrency issues.
  3311. define dep_autopatch_fetch_rebar
  3312. if command -v flock >/dev/null; then \
  3313. flock $(ERLANG_MK_TMP)/rebar.lock sh -c "$(call dep_autopatch_fetch_rebar2)"; \
  3314. elif command -v lockf >/dev/null; then \
  3315. lockf $(ERLANG_MK_TMP)/rebar.lock sh -c "$(call dep_autopatch_fetch_rebar2)"; \
  3316. else \
  3317. $(call dep_autopatch_fetch_rebar2); \
  3318. fi
  3319. endef
  3320. define dep_autopatch_fetch_rebar2
  3321. if [ ! -d $(ERLANG_MK_TMP)/rebar3 ]; then \
  3322. git clone -q -n -- $(REBAR3_GIT) $(ERLANG_MK_TMP)/rebar3; \
  3323. cd $(ERLANG_MK_TMP)/rebar3; \
  3324. git checkout -q $(REBAR3_COMMIT); \
  3325. ./bootstrap; \
  3326. cd -; \
  3327. fi
  3328. endef
  3329. define dep_autopatch_rebar
  3330. if [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \
  3331. mv $(DEPS_DIR)/$(1)/Makefile $(DEPS_DIR)/$(1)/Makefile.orig.mk; \
  3332. fi; \
  3333. $(call erlang,$(call dep_autopatch_rebar.erl,$(1))); \
  3334. rm -f $(DEPS_DIR)/$(1)/ebin/$(1).app
  3335. endef
  3336. define dep_autopatch_rebar.erl
  3337. application:load(rebar),
  3338. application:set_env(rebar, log_level, debug),
  3339. {module, rebar3} = c:l(rebar3),
  3340. Conf1 = case file:consult("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config)") of
  3341. {ok, Conf0} -> Conf0;
  3342. _ -> []
  3343. end,
  3344. {Conf, OsEnv} = fun() ->
  3345. case filelib:is_file("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)") of
  3346. false -> {Conf1, []};
  3347. true ->
  3348. Bindings0 = erl_eval:new_bindings(),
  3349. Bindings1 = erl_eval:add_binding('CONFIG', Conf1, Bindings0),
  3350. Bindings = erl_eval:add_binding('SCRIPT', "$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)", Bindings1),
  3351. Before = os:getenv(),
  3352. {ok, Conf2} = file:script("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)", Bindings),
  3353. {Conf2, lists:foldl(fun(E, Acc) -> lists:delete(E, Acc) end, os:getenv(), Before)}
  3354. end
  3355. end(),
  3356. Write = fun (Text) ->
  3357. file:write_file("$(call core_native_path,$(DEPS_DIR)/$1/Makefile)", Text, [append])
  3358. end,
  3359. Escape = fun (Text) ->
  3360. re:replace(Text, "\\\\$$", "\$$$$", [global, {return, list}])
  3361. end,
  3362. Write("IGNORE_DEPS += edown eper eunit_formatters meck node_package "
  3363. "rebar_lock_deps_plugin rebar_vsn_plugin reltool_util\n"),
  3364. Write("C_SRC_DIR = /path/do/not/exist\n"),
  3365. Write("C_SRC_TYPE = rebar\n"),
  3366. Write("DRV_CFLAGS = -fPIC\nexport DRV_CFLAGS\n"),
  3367. Write(["ERLANG_ARCH = ", rebar_utils:wordsize(), "\nexport ERLANG_ARCH\n"]),
  3368. ToList = fun
  3369. (V) when is_atom(V) -> atom_to_list(V);
  3370. (V) when is_list(V) -> "'\\"" ++ V ++ "\\"'"
  3371. end,
  3372. fun() ->
  3373. Write("ERLC_OPTS = +debug_info\n"),
  3374. case lists:keyfind(erl_opts, 1, Conf) of
  3375. false -> ok;
  3376. {_, ErlOpts} ->
  3377. lists:foreach(fun
  3378. ({d, D}) ->
  3379. Write("ERLC_OPTS += -D" ++ ToList(D) ++ "=1\n");
  3380. ({d, DKey, DVal}) ->
  3381. Write("ERLC_OPTS += -D" ++ ToList(DKey) ++ "=" ++ ToList(DVal) ++ "\n");
  3382. ({i, I}) ->
  3383. Write(["ERLC_OPTS += -I ", I, "\n"]);
  3384. ({platform_define, Regex, D}) ->
  3385. case rebar_utils:is_arch(Regex) of
  3386. true -> Write("ERLC_OPTS += -D" ++ ToList(D) ++ "=1\n");
  3387. false -> ok
  3388. end;
  3389. ({parse_transform, PT}) ->
  3390. Write("ERLC_OPTS += +'{parse_transform, " ++ ToList(PT) ++ "}'\n");
  3391. (_) -> ok
  3392. end, ErlOpts)
  3393. end,
  3394. Write("\n")
  3395. end(),
  3396. GetHexVsn2 = fun(N, NP) ->
  3397. case file:consult("$(call core_native_path,$(DEPS_DIR)/$1/rebar.lock)") of
  3398. {ok, Lock} ->
  3399. io:format("~p~n", [Lock]),
  3400. LockPkgs = case lists:keyfind("1.2.0", 1, Lock) of
  3401. {_, LP} ->
  3402. LP;
  3403. _ ->
  3404. case lists:keyfind("1.1.0", 1, Lock) of
  3405. {_, LP} ->
  3406. LP;
  3407. _ ->
  3408. false
  3409. end
  3410. end,
  3411. if
  3412. is_list(LockPkgs) ->
  3413. io:format("~p~n", [LockPkgs]),
  3414. case lists:keyfind(atom_to_binary(N, latin1), 1, LockPkgs) of
  3415. {_, {pkg, _, Vsn}, _} ->
  3416. io:format("~p~n", [Vsn]),
  3417. {N, {hex, NP, binary_to_list(Vsn)}};
  3418. _ ->
  3419. false
  3420. end;
  3421. true ->
  3422. false
  3423. end;
  3424. _ ->
  3425. false
  3426. end
  3427. end,
  3428. GetHexVsn3Common = fun(N, NP, S0) ->
  3429. case GetHexVsn2(N, NP) of
  3430. false ->
  3431. S2 = case S0 of
  3432. " " ++ S1 -> S1;
  3433. _ -> S0
  3434. end,
  3435. S = case length([ok || $$. <- S2]) of
  3436. 0 -> S2 ++ ".0.0";
  3437. 1 -> S2 ++ ".0";
  3438. _ -> S2
  3439. end,
  3440. {N, {hex, NP, S}};
  3441. NameSource ->
  3442. NameSource
  3443. end
  3444. end,
  3445. GetHexVsn3 = fun
  3446. (N, NP, "~>" ++ S0) ->
  3447. GetHexVsn3Common(N, NP, S0);
  3448. (N, NP, ">=" ++ S0) ->
  3449. GetHexVsn3Common(N, NP, S0);
  3450. (N, NP, S) -> {N, {hex, NP, S}}
  3451. end,
  3452. fun() ->
  3453. File = case lists:keyfind(deps, 1, Conf) of
  3454. false -> [];
  3455. {_, Deps} ->
  3456. [begin case case Dep of
  3457. N when is_atom(N) -> GetHexVsn2(N, N);
  3458. {N, S} when is_atom(N), is_list(S) -> GetHexVsn3(N, N, S);
  3459. {N, {pkg, NP}} when is_atom(N) -> GetHexVsn2(N, NP);
  3460. {N, S, {pkg, NP}} -> GetHexVsn3(N, NP, S);
  3461. {N, S} when is_tuple(S) -> {N, S};
  3462. {N, _, S} -> {N, S};
  3463. {N, _, S, _} -> {N, S};
  3464. _ -> false
  3465. end of
  3466. false -> ok;
  3467. {Name, Source} ->
  3468. {Method, Repo, Commit} = case Source of
  3469. {hex, NPV, V} -> {hex, V, NPV};
  3470. {git, R} -> {git, R, master};
  3471. {M, R, {branch, C}} -> {M, R, C};
  3472. {M, R, {ref, C}} -> {M, R, C};
  3473. {M, R, {tag, C}} -> {M, R, C};
  3474. {M, R, C} -> {M, R, C}
  3475. end,
  3476. Write(io_lib:format("DEPS += ~s\ndep_~s = ~s ~s ~s~n", [Name, Name, Method, Repo, Commit]))
  3477. end end || Dep <- Deps]
  3478. end
  3479. end(),
  3480. fun() ->
  3481. case lists:keyfind(erl_first_files, 1, Conf) of
  3482. false -> ok;
  3483. {_, Files0} ->
  3484. Files = [begin
  3485. hd(filelib:wildcard("$(call core_native_path,$(DEPS_DIR)/$1/src/)**/" ++ filename:rootname(F) ++ ".*rl"))
  3486. end || "src/" ++ F <- Files0],
  3487. Names = [[" ", case lists:reverse(F) of
  3488. "lre." ++ Elif -> lists:reverse(Elif);
  3489. "lrx." ++ Elif -> lists:reverse(Elif);
  3490. "lry." ++ Elif -> lists:reverse(Elif);
  3491. Elif -> lists:reverse(Elif)
  3492. end] || "$(call core_native_path,$(DEPS_DIR)/$1/src/)" ++ F <- Files],
  3493. Write(io_lib:format("COMPILE_FIRST +=~s\n", [Names]))
  3494. end
  3495. end(),
  3496. Write("\n\nrebar_dep: preprocess pre-deps deps pre-app app\n"),
  3497. Write("\npreprocess::\n"),
  3498. Write("\npre-deps::\n"),
  3499. Write("\npre-app::\n"),
  3500. PatchHook = fun(Cmd) ->
  3501. Cmd2 = re:replace(Cmd, "^([g]?make)(.*)( -C.*)", "\\\\1\\\\3\\\\2", [{return, list}]),
  3502. case Cmd2 of
  3503. "make -C" ++ Cmd1 -> "$$\(MAKE) -C" ++ Escape(Cmd1);
  3504. "gmake -C" ++ Cmd1 -> "$$\(MAKE) -C" ++ Escape(Cmd1);
  3505. "make " ++ Cmd1 -> "$$\(MAKE) -f Makefile.orig.mk " ++ Escape(Cmd1);
  3506. "gmake " ++ Cmd1 -> "$$\(MAKE) -f Makefile.orig.mk " ++ Escape(Cmd1);
  3507. _ -> Escape(Cmd)
  3508. end
  3509. end,
  3510. fun() ->
  3511. case lists:keyfind(pre_hooks, 1, Conf) of
  3512. false -> ok;
  3513. {_, Hooks} ->
  3514. [case H of
  3515. {'get-deps', Cmd} ->
  3516. Write("\npre-deps::\n\t" ++ PatchHook(Cmd) ++ "\n");
  3517. {compile, Cmd} ->
  3518. Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");
  3519. {{pc, compile}, Cmd} ->
  3520. Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");
  3521. {Regex, compile, Cmd} ->
  3522. case rebar_utils:is_arch(Regex) of
  3523. true -> Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");
  3524. false -> ok
  3525. end;
  3526. _ -> ok
  3527. end || H <- Hooks]
  3528. end
  3529. end(),
  3530. ShellToMk = fun(V0) ->
  3531. V1 = re:replace(V0, "[$$][(]", "$$\(shell ", [global]),
  3532. V = re:replace(V1, "([$$])(?![(])(\\\\w*)", "\\\\1(\\\\2)", [global]),
  3533. re:replace(V, "-Werror\\\\b", "", [{return, list}, global])
  3534. end,
  3535. PortSpecs = fun() ->
  3536. case lists:keyfind(port_specs, 1, Conf) of
  3537. false ->
  3538. case filelib:is_dir("$(call core_native_path,$(DEPS_DIR)/$1/c_src)") of
  3539. false -> [];
  3540. true ->
  3541. [{"priv/" ++ proplists:get_value(so_name, Conf, "$(1)_drv.so"),
  3542. proplists:get_value(port_sources, Conf, ["c_src/*.c"]), []}]
  3543. end;
  3544. {_, Specs} ->
  3545. lists:flatten([case S of
  3546. {Output, Input} -> {ShellToMk(Output), Input, []};
  3547. {Regex, Output, Input} ->
  3548. case rebar_utils:is_arch(Regex) of
  3549. true -> {ShellToMk(Output), Input, []};
  3550. false -> []
  3551. end;
  3552. {Regex, Output, Input, [{env, Env}]} ->
  3553. case rebar_utils:is_arch(Regex) of
  3554. true -> {ShellToMk(Output), Input, Env};
  3555. false -> []
  3556. end
  3557. end || S <- Specs])
  3558. end
  3559. end(),
  3560. PortSpecWrite = fun (Text) ->
  3561. file:write_file("$(call core_native_path,$(DEPS_DIR)/$1/c_src/Makefile.erlang.mk)", Text, [append])
  3562. end,
  3563. case PortSpecs of
  3564. [] -> ok;
  3565. _ ->
  3566. Write("\npre-app::\n\t@$$\(MAKE) --no-print-directory -f c_src/Makefile.erlang.mk\n"),
  3567. PortSpecWrite(io_lib:format("ERL_CFLAGS ?= -finline-functions -Wall -fPIC -I \\"~s/erts-~s/include\\" -I \\"~s\\"\n",
  3568. [code:root_dir(), erlang:system_info(version), code:lib_dir(erl_interface, include)])),
  3569. PortSpecWrite(io_lib:format("ERL_LDFLAGS ?= -L \\"~s\\" -lei\n",
  3570. [code:lib_dir(erl_interface, lib)])),
  3571. [PortSpecWrite(["\n", E, "\n"]) || E <- OsEnv],
  3572. FilterEnv = fun(Env) ->
  3573. lists:flatten([case E of
  3574. {_, _} -> E;
  3575. {Regex, K, V} ->
  3576. case rebar_utils:is_arch(Regex) of
  3577. true -> {K, V};
  3578. false -> []
  3579. end
  3580. end || E <- Env])
  3581. end,
  3582. MergeEnv = fun(Env) ->
  3583. lists:foldl(fun ({K, V}, Acc) ->
  3584. case lists:keyfind(K, 1, Acc) of
  3585. false -> [{K, rebar_utils:expand_env_variable(V, K, "")}|Acc];
  3586. {_, V0} -> [{K, rebar_utils:expand_env_variable(V, K, V0)}|Acc]
  3587. end
  3588. end, [], Env)
  3589. end,
  3590. PortEnv = case lists:keyfind(port_env, 1, Conf) of
  3591. false -> [];
  3592. {_, PortEnv0} -> FilterEnv(PortEnv0)
  3593. end,
  3594. PortSpec = fun ({Output, Input0, Env}) ->
  3595. filelib:ensure_dir("$(call core_native_path,$(DEPS_DIR)/$1/)" ++ Output),
  3596. Input = [[" ", I] || I <- Input0],
  3597. PortSpecWrite([
  3598. [["\n", K, " = ", ShellToMk(V)] || {K, V} <- lists:reverse(MergeEnv(PortEnv))],
  3599. case $(PLATFORM) of
  3600. darwin -> "\n\nLDFLAGS += -flat_namespace -undefined suppress";
  3601. _ -> ""
  3602. end,
  3603. "\n\nall:: ", Output, "\n\t@:\n\n",
  3604. "%.o: %.c\n\t$$\(CC) -c -o $$\@ $$\< $$\(CFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n",
  3605. "%.o: %.C\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n",
  3606. "%.o: %.cc\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n",
  3607. "%.o: %.cpp\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n",
  3608. [[Output, ": ", K, " += ", ShellToMk(V), "\n"] || {K, V} <- lists:reverse(MergeEnv(FilterEnv(Env)))],
  3609. Output, ": $$\(foreach ext,.c .C .cc .cpp,",
  3610. "$$\(patsubst %$$\(ext),%.o,$$\(filter %$$\(ext),$$\(wildcard", Input, "))))\n",
  3611. "\t$$\(CC) -o $$\@ $$\? $$\(LDFLAGS) $$\(ERL_LDFLAGS) $$\(DRV_LDFLAGS) $$\(LDLIBS) $$\(EXE_LDFLAGS)",
  3612. case {filename:extension(Output), $(PLATFORM)} of
  3613. {[], _} -> "\n";
  3614. {".so", darwin} -> " -shared\n";
  3615. {".dylib", darwin} -> " -shared\n";
  3616. {_, darwin} -> "\n";
  3617. _ -> " -shared\n"
  3618. end])
  3619. end,
  3620. [PortSpec(S) || S <- PortSpecs]
  3621. end,
  3622. fun() ->
  3623. case lists:keyfind(plugins, 1, Conf) of
  3624. false -> ok;
  3625. {_, Plugins0} ->
  3626. Plugins = [P || P <- Plugins0, is_tuple(P)],
  3627. case lists:keyfind('lfe-compile', 1, Plugins) of
  3628. false -> ok;
  3629. _ -> Write("\nBUILD_DEPS = lfe lfe.mk\ndep_lfe.mk = git https://github.com/ninenines/lfe.mk master\nDEP_PLUGINS = lfe.mk\n")
  3630. end
  3631. end
  3632. end(),
  3633. Write("\ninclude $$\(if $$\(ERLANG_MK_FILENAME),$$\(ERLANG_MK_FILENAME),erlang.mk)"),
  3634. RunPlugin = fun(Plugin, Step) ->
  3635. case erlang:function_exported(Plugin, Step, 2) of
  3636. false -> ok;
  3637. true ->
  3638. c:cd("$(call core_native_path,$(DEPS_DIR)/$1/)"),
  3639. Ret = Plugin:Step({config, "", Conf, dict:new(), dict:new(), dict:new(),
  3640. dict:store(base_dir, "", dict:new())}, undefined),
  3641. io:format("rebar plugin ~p step ~p ret ~p~n", [Plugin, Step, Ret])
  3642. end
  3643. end,
  3644. fun() ->
  3645. case lists:keyfind(plugins, 1, Conf) of
  3646. false -> ok;
  3647. {_, Plugins0} ->
  3648. Plugins = [P || P <- Plugins0, is_atom(P)],
  3649. [begin
  3650. case lists:keyfind(deps, 1, Conf) of
  3651. false -> ok;
  3652. {_, Deps} ->
  3653. case lists:keyfind(P, 1, Deps) of
  3654. false -> ok;
  3655. _ ->
  3656. Path = "$(call core_native_path,$(DEPS_DIR)/)" ++ atom_to_list(P),
  3657. io:format("~s", [os:cmd("$(MAKE) -C $(call core_native_path,$(DEPS_DIR)/$1) " ++ Path)]),
  3658. io:format("~s", [os:cmd("$(MAKE) -C " ++ Path ++ " IS_DEP=1")]),
  3659. code:add_patha(Path ++ "/ebin")
  3660. end
  3661. end
  3662. end || P <- Plugins],
  3663. [case code:load_file(P) of
  3664. {module, P} -> ok;
  3665. _ ->
  3666. case lists:keyfind(plugin_dir, 1, Conf) of
  3667. false -> ok;
  3668. {_, PluginsDir} ->
  3669. ErlFile = "$(call core_native_path,$(DEPS_DIR)/$1/)" ++ PluginsDir ++ "/" ++ atom_to_list(P) ++ ".erl",
  3670. {ok, P, Bin} = compile:file(ErlFile, [binary]),
  3671. {module, P} = code:load_binary(P, ErlFile, Bin)
  3672. end
  3673. end || P <- Plugins],
  3674. [RunPlugin(P, preprocess) || P <- Plugins],
  3675. [RunPlugin(P, pre_compile) || P <- Plugins],
  3676. [RunPlugin(P, compile) || P <- Plugins]
  3677. end
  3678. end(),
  3679. halt()
  3680. endef
  3681. define dep_autopatch_appsrc_script.erl
  3682. AppSrc = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",
  3683. AppSrcScript = AppSrc ++ ".script",
  3684. Conf1 = case file:consult(AppSrc) of
  3685. {ok, Conf0} -> Conf0;
  3686. {error, enoent} -> []
  3687. end,
  3688. Bindings0 = erl_eval:new_bindings(),
  3689. Bindings1 = erl_eval:add_binding('CONFIG', Conf1, Bindings0),
  3690. Bindings = erl_eval:add_binding('SCRIPT', AppSrcScript, Bindings1),
  3691. Conf = case file:script(AppSrcScript, Bindings) of
  3692. {ok, [C]} -> C;
  3693. {ok, C} -> C
  3694. end,
  3695. ok = file:write_file(AppSrc, io_lib:format("~p.~n", [Conf])),
  3696. halt()
  3697. endef
  3698. define dep_autopatch_appsrc.erl
  3699. AppSrcOut = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",
  3700. AppSrcIn = case filelib:is_regular(AppSrcOut) of false -> "$(call core_native_path,$(DEPS_DIR)/$1/ebin/$1.app)"; true -> AppSrcOut end,
  3701. case filelib:is_regular(AppSrcIn) of
  3702. false -> ok;
  3703. true ->
  3704. {ok, [{application, $(1), L0}]} = file:consult(AppSrcIn),
  3705. L1 = lists:keystore(modules, 1, L0, {modules, []}),
  3706. L2 = case lists:keyfind(vsn, 1, L1) of
  3707. {_, git} -> lists:keyreplace(vsn, 1, L1, {vsn, lists:droplast(os:cmd("git -C $(DEPS_DIR)/$1 describe --dirty --tags --always"))});
  3708. {_, {cmd, _}} -> lists:keyreplace(vsn, 1, L1, {vsn, "cmd"});
  3709. _ -> L1
  3710. end,
  3711. L3 = case lists:keyfind(registered, 1, L2) of false -> [{registered, []}|L2]; _ -> L2 end,
  3712. ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L3}])),
  3713. case AppSrcOut of AppSrcIn -> ok; _ -> ok = file:delete(AppSrcIn) end
  3714. end,
  3715. halt()
  3716. endef
  3717. ifeq ($(CACHE_DEPS),1)
  3718. define dep_cache_fetch_git
  3719. mkdir -p $(CACHE_DIR)/git; \
  3720. if test -d "$(join $(CACHE_DIR)/git/,$(call dep_name,$1))"; then \
  3721. cd $(join $(CACHE_DIR)/git/,$(call dep_name,$1)); \
  3722. if ! git checkout -q $(call dep_commit,$1); then \
  3723. git remote set-url origin $(call dep_repo,$1) && \
  3724. git pull --all && \
  3725. git cat-file -e $(call dep_commit,$1) 2>/dev/null; \
  3726. fi; \
  3727. else \
  3728. git clone -q -n -- $(call dep_repo,$1) $(join $(CACHE_DIR)/git/,$(call dep_name,$1)); \
  3729. fi; \
  3730. git clone -q --branch $(call dep_commit,$1) --single-branch -- $(join $(CACHE_DIR)/git/,$(call dep_name,$1)) $2
  3731. endef
  3732. define dep_fetch_git
  3733. $(call dep_cache_fetch_git,$1,$(DEPS_DIR)/$(call dep_name,$1));
  3734. endef
  3735. define dep_fetch_git-subfolder
  3736. mkdir -p $(ERLANG_MK_TMP)/git-subfolder; \
  3737. $(call dep_cache_fetch_git,$1,$(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)); \
  3738. ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$1)) \
  3739. $(DEPS_DIR)/$(call dep_name,$1);
  3740. endef
  3741. else
  3742. define dep_fetch_git
  3743. git clone -q -n -- $(call dep_repo,$1) $(DEPS_DIR)/$(call dep_name,$1); \
  3744. cd $(DEPS_DIR)/$(call dep_name,$1) && git checkout -q $(call dep_commit,$1);
  3745. endef
  3746. define dep_fetch_git-subfolder
  3747. mkdir -p $(ERLANG_MK_TMP)/git-subfolder; \
  3748. git clone -q -n -- $(call dep_repo,$1) \
  3749. $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1); \
  3750. cd $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1) \
  3751. && git checkout -q $(call dep_commit,$1); \
  3752. ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$1)) \
  3753. $(DEPS_DIR)/$(call dep_name,$1);
  3754. endef
  3755. endif
  3756. define dep_fetch_git-submodule
  3757. git submodule update --init -- $(DEPS_DIR)/$1;
  3758. endef
  3759. define dep_fetch_hg
  3760. hg clone -q -U $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1)); \
  3761. cd $(DEPS_DIR)/$(call dep_name,$(1)) && hg update -q $(call dep_commit,$(1));
  3762. endef
  3763. define dep_fetch_svn
  3764. svn checkout -q $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));
  3765. endef
  3766. define dep_fetch_cp
  3767. cp -R $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));
  3768. endef
  3769. define dep_fetch_ln
  3770. ln -s $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));
  3771. endef
  3772. ifeq ($(CACHE_DEPS),1)
  3773. # Hex only has a package version. No need to look in the Erlang.mk packages.
  3774. define dep_fetch_hex
  3775. mkdir -p $(CACHE_DIR)/hex $(DEPS_DIR)/$1; \
  3776. $(eval hex_tar_name=$(if $(word 3,$(dep_$1)),$(word 3,$(dep_$1)),$1)-$(strip $(word 2,$(dep_$1))).tar) \
  3777. $(if $(wildcard $(CACHE_DIR)/hex/$(hex_tar_name)),,$(call core_http_get,$(CACHE_DIR)/hex/$(hex_tar_name),\
  3778. https://repo.hex.pm/tarballs/$(hex_tar_name);)) \
  3779. tar -xOf $(CACHE_DIR)/hex/$(hex_tar_name) contents.tar.gz | tar -C $(DEPS_DIR)/$1 -xzf -;
  3780. endef
  3781. else
  3782. # Hex only has a package version. No need to look in the Erlang.mk packages.
  3783. define dep_fetch_hex
  3784. mkdir -p $(ERLANG_MK_TMP)/hex $(DEPS_DIR)/$1; \
  3785. $(call core_http_get,$(ERLANG_MK_TMP)/hex/$1.tar,\
  3786. https://repo.hex.pm/tarballs/$(if $(word 3,$(dep_$1)),$(word 3,$(dep_$1)),$1)-$(strip $(word 2,$(dep_$1))).tar); \
  3787. tar -xOf $(ERLANG_MK_TMP)/hex/$1.tar contents.tar.gz | tar -C $(DEPS_DIR)/$1 -xzf -;
  3788. endef
  3789. endif
  3790. define dep_fetch_fail
  3791. echo "Error: Unknown or invalid dependency: $(1)." >&2; \
  3792. exit 78;
  3793. endef
  3794. # Kept for compatibility purposes with older Erlang.mk configuration.
  3795. define dep_fetch_legacy
  3796. $(warning WARNING: '$(1)' dependency configuration uses deprecated format.) \
  3797. git clone -q -n -- $(word 1,$(dep_$(1))) $(DEPS_DIR)/$(1); \
  3798. cd $(DEPS_DIR)/$(1) && git checkout -q $(if $(word 2,$(dep_$(1))),$(word 2,$(dep_$(1))),master);
  3799. endef
  3800. define dep_target
  3801. $(DEPS_DIR)/$(call dep_name,$1): | $(ERLANG_MK_TMP)
  3802. $(eval DEP_NAME := $(call dep_name,$1))
  3803. $(eval DEP_STR := $(if $(filter $1,$(DEP_NAME)),$1,"$1 ($(DEP_NAME))"))
  3804. $(verbose) if test -d $(APPS_DIR)/$(DEP_NAME); then \
  3805. echo "Error: Dependency" $(DEP_STR) "conflicts with application found in $(APPS_DIR)/$(DEP_NAME)." >&2; \
  3806. exit 17; \
  3807. fi
  3808. $(verbose) mkdir -p $(DEPS_DIR)
  3809. $(dep_verbose) $(call dep_fetch_$(strip $(call dep_fetch,$(1))),$(1))
  3810. $(verbose) if [ -f $(DEPS_DIR)/$(1)/configure.ac -o -f $(DEPS_DIR)/$(1)/configure.in ] \
  3811. && [ ! -f $(DEPS_DIR)/$(1)/configure ]; then \
  3812. echo " AUTO " $(DEP_STR); \
  3813. cd $(DEPS_DIR)/$(1) && autoreconf -Wall -vif -I m4; \
  3814. fi
  3815. - $(verbose) if [ -f $(DEPS_DIR)/$(DEP_NAME)/configure ]; then \
  3816. echo " CONF " $(DEP_STR); \
  3817. cd $(DEPS_DIR)/$(DEP_NAME) && ./configure; \
  3818. fi
  3819. ifeq ($(filter $(1),$(NO_AUTOPATCH)),)
  3820. $(verbose) $$(MAKE) --no-print-directory autopatch-$(DEP_NAME)
  3821. endif
  3822. .PHONY: autopatch-$(call dep_name,$1)
  3823. autopatch-$(call dep_name,$1)::
  3824. $(verbose) if [ "$1" = "elixir" -a "$(ELIXIR_PATCH)" ]; then \
  3825. ln -s lib/elixir/ebin $(DEPS_DIR)/elixir/; \
  3826. else \
  3827. $$(call dep_autopatch,$(call dep_name,$1)) \
  3828. fi
  3829. endef
  3830. $(foreach dep,$(BUILD_DEPS) $(DEPS),$(eval $(call dep_target,$(dep))))
  3831. ifndef IS_APP
  3832. clean:: clean-apps
  3833. clean-apps:
  3834. $(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \
  3835. $(MAKE) -C $$dep clean IS_APP=1; \
  3836. done
  3837. distclean:: distclean-apps
  3838. distclean-apps:
  3839. $(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \
  3840. $(MAKE) -C $$dep distclean IS_APP=1; \
  3841. done
  3842. endif
  3843. ifndef SKIP_DEPS
  3844. distclean:: distclean-deps
  3845. distclean-deps:
  3846. $(gen_verbose) rm -rf $(DEPS_DIR)
  3847. endif
  3848. ifeq ($(CACHE_DEPS),1)
  3849. cacheclean:: cacheclean-git cacheclean-hex
  3850. cacheclean-git:
  3851. $(gen_verbose) rm -rf $(CACHE_DIR)/git
  3852. cacheclean-hex:
  3853. $(gen_verbose) rm -rf $(CACHE_DIR)/hex
  3854. endif
  3855. # Forward-declare variables used in core/deps-tools.mk. This is required
  3856. # in case plugins use them.
  3857. ERLANG_MK_RECURSIVE_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-deps-list.log
  3858. ERLANG_MK_RECURSIVE_DOC_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-doc-deps-list.log
  3859. ERLANG_MK_RECURSIVE_REL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-rel-deps-list.log
  3860. ERLANG_MK_RECURSIVE_TEST_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-test-deps-list.log
  3861. ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-shell-deps-list.log
  3862. ERLANG_MK_QUERY_DEPS_FILE = $(ERLANG_MK_TMP)/query-deps.log
  3863. ERLANG_MK_QUERY_DOC_DEPS_FILE = $(ERLANG_MK_TMP)/query-doc-deps.log
  3864. ERLANG_MK_QUERY_REL_DEPS_FILE = $(ERLANG_MK_TMP)/query-rel-deps.log
  3865. ERLANG_MK_QUERY_TEST_DEPS_FILE = $(ERLANG_MK_TMP)/query-test-deps.log
  3866. ERLANG_MK_QUERY_SHELL_DEPS_FILE = $(ERLANG_MK_TMP)/query-shell-deps.log
  3867. # Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
  3868. # This file is part of erlang.mk and subject to the terms of the ISC License.
  3869. .PHONY: clean-app
  3870. # Configuration.
  3871. ERLC_OPTS ?= -Werror +debug_info +warn_export_vars +warn_shadow_vars \
  3872. +warn_obsolete_guard # +bin_opt_info +warn_export_all +warn_missing_spec
  3873. COMPILE_FIRST ?=
  3874. COMPILE_FIRST_PATHS = $(addprefix src/,$(addsuffix .erl,$(COMPILE_FIRST)))
  3875. ERLC_EXCLUDE ?=
  3876. ERLC_EXCLUDE_PATHS = $(addprefix src/,$(addsuffix .erl,$(ERLC_EXCLUDE)))
  3877. ERLC_ASN1_OPTS ?=
  3878. ERLC_MIB_OPTS ?=
  3879. COMPILE_MIB_FIRST ?=
  3880. COMPILE_MIB_FIRST_PATHS = $(addprefix mibs/,$(addsuffix .mib,$(COMPILE_MIB_FIRST)))
  3881. # Verbosity.
  3882. app_verbose_0 = @echo " APP " $(PROJECT);
  3883. app_verbose_2 = set -x;
  3884. app_verbose = $(app_verbose_$(V))
  3885. appsrc_verbose_0 = @echo " APP " $(PROJECT).app.src;
  3886. appsrc_verbose_2 = set -x;
  3887. appsrc_verbose = $(appsrc_verbose_$(V))
  3888. makedep_verbose_0 = @echo " DEPEND" $(PROJECT).d;
  3889. makedep_verbose_2 = set -x;
  3890. makedep_verbose = $(makedep_verbose_$(V))
  3891. erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\
  3892. $(filter %.erl %.core,$(?F)));
  3893. erlc_verbose_2 = set -x;
  3894. erlc_verbose = $(erlc_verbose_$(V))
  3895. xyrl_verbose_0 = @echo " XYRL " $(filter %.xrl %.yrl,$(?F));
  3896. xyrl_verbose_2 = set -x;
  3897. xyrl_verbose = $(xyrl_verbose_$(V))
  3898. asn1_verbose_0 = @echo " ASN1 " $(filter %.asn1,$(?F));
  3899. asn1_verbose_2 = set -x;
  3900. asn1_verbose = $(asn1_verbose_$(V))
  3901. mib_verbose_0 = @echo " MIB " $(filter %.bin %.mib,$(?F));
  3902. mib_verbose_2 = set -x;
  3903. mib_verbose = $(mib_verbose_$(V))
  3904. ifneq ($(wildcard src/),)
  3905. # Targets.
  3906. app:: $(if $(wildcard ebin/test),clean) deps
  3907. $(verbose) $(MAKE) --no-print-directory $(PROJECT).d
  3908. $(verbose) $(MAKE) --no-print-directory app-build
  3909. ifeq ($(wildcard src/$(PROJECT_MOD).erl),)
  3910. define app_file
  3911. {application, '$(PROJECT)', [
  3912. {description, "$(PROJECT_DESCRIPTION)"},
  3913. {vsn, "$(PROJECT_VERSION)"},$(if $(IS_DEP),
  3914. {id$(comma)$(space)"$(1)"}$(comma))
  3915. {modules, [$(call comma_list,$(2))]},
  3916. {registered, []},
  3917. {applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(OPTIONAL_DEPS) $(foreach dep,$(DEPS),$(call dep_name,$(dep))))]},
  3918. {optional_applications, [$(call comma_list,$(OPTIONAL_DEPS))]},
  3919. {env, $(subst \,\\,$(PROJECT_ENV))}$(if $(findstring {,$(PROJECT_APP_EXTRA_KEYS)),$(comma)$(newline)$(tab)$(subst \,\\,$(PROJECT_APP_EXTRA_KEYS)),)
  3920. ]}.
  3921. endef
  3922. else
  3923. define app_file
  3924. {application, '$(PROJECT)', [
  3925. {description, "$(PROJECT_DESCRIPTION)"},
  3926. {vsn, "$(PROJECT_VERSION)"},$(if $(IS_DEP),
  3927. {id$(comma)$(space)"$(1)"}$(comma))
  3928. {modules, [$(call comma_list,$(2))]},
  3929. {registered, [$(call comma_list,$(PROJECT)_sup $(PROJECT_REGISTERED))]},
  3930. {applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(OPTIONAL_DEPS) $(foreach dep,$(DEPS),$(call dep_name,$(dep))))]},
  3931. {optional_applications, [$(call comma_list,$(OPTIONAL_DEPS))]},
  3932. {mod, {$(PROJECT_MOD), []}},
  3933. {env, $(subst \,\\,$(PROJECT_ENV))}$(if $(findstring {,$(PROJECT_APP_EXTRA_KEYS)),$(comma)$(newline)$(tab)$(subst \,\\,$(PROJECT_APP_EXTRA_KEYS)),)
  3934. ]}.
  3935. endef
  3936. endif
  3937. app-build: ebin/$(PROJECT).app
  3938. $(verbose) :
  3939. # Source files.
  3940. ALL_SRC_FILES := $(sort $(call core_find,src/,*))
  3941. ERL_FILES := $(filter %.erl,$(ALL_SRC_FILES))
  3942. CORE_FILES := $(filter %.core,$(ALL_SRC_FILES))
  3943. # ASN.1 files.
  3944. ifneq ($(wildcard asn1/),)
  3945. ASN1_FILES = $(sort $(call core_find,asn1/,*.asn1))
  3946. ERL_FILES += $(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES))))
  3947. define compile_asn1
  3948. $(verbose) mkdir -p include/
  3949. $(asn1_verbose) erlc -v -I include/ -o asn1/ +noobj $(ERLC_ASN1_OPTS) $(1)
  3950. $(verbose) mv asn1/*.erl src/
  3951. -$(verbose) mv asn1/*.hrl include/
  3952. $(verbose) mv asn1/*.asn1db include/
  3953. endef
  3954. $(PROJECT).d:: $(ASN1_FILES)
  3955. $(if $(strip $?),$(call compile_asn1,$?))
  3956. endif
  3957. # SNMP MIB files.
  3958. ifneq ($(wildcard mibs/),)
  3959. MIB_FILES = $(sort $(call core_find,mibs/,*.mib))
  3960. $(PROJECT).d:: $(COMPILE_MIB_FIRST_PATHS) $(MIB_FILES)
  3961. $(verbose) mkdir -p include/ priv/mibs/
  3962. $(mib_verbose) erlc -v $(ERLC_MIB_OPTS) -o priv/mibs/ -I priv/mibs/ $?
  3963. $(mib_verbose) erlc -o include/ -- $(addprefix priv/mibs/,$(patsubst %.mib,%.bin,$(notdir $?)))
  3964. endif
  3965. # Leex and Yecc files.
  3966. XRL_FILES := $(filter %.xrl,$(ALL_SRC_FILES))
  3967. XRL_ERL_FILES = $(addprefix src/,$(patsubst %.xrl,%.erl,$(notdir $(XRL_FILES))))
  3968. ERL_FILES += $(XRL_ERL_FILES)
  3969. YRL_FILES := $(filter %.yrl,$(ALL_SRC_FILES))
  3970. YRL_ERL_FILES = $(addprefix src/,$(patsubst %.yrl,%.erl,$(notdir $(YRL_FILES))))
  3971. ERL_FILES += $(YRL_ERL_FILES)
  3972. $(PROJECT).d:: $(XRL_FILES) $(YRL_FILES)
  3973. $(if $(strip $?),$(xyrl_verbose) erlc -v -o src/ $(YRL_ERLC_OPTS) $?)
  3974. # Erlang and Core Erlang files.
  3975. define makedep.erl
  3976. E = ets:new(makedep, [bag]),
  3977. G = digraph:new([acyclic]),
  3978. ErlFiles = lists:usort(string:tokens("$(ERL_FILES)", " ")),
  3979. DepsDir = "$(call core_native_path,$(DEPS_DIR))",
  3980. AppsDir = "$(call core_native_path,$(APPS_DIR))",
  3981. DepsDirsSrc = "$(if $(wildcard $(DEPS_DIR)/*/src), $(call core_native_path,$(wildcard $(DEPS_DIR)/*/src)))",
  3982. DepsDirsInc = "$(if $(wildcard $(DEPS_DIR)/*/include), $(call core_native_path,$(wildcard $(DEPS_DIR)/*/include)))",
  3983. AppsDirsSrc = "$(if $(wildcard $(APPS_DIR)/*/src), $(call core_native_path,$(wildcard $(APPS_DIR)/*/src)))",
  3984. AppsDirsInc = "$(if $(wildcard $(APPS_DIR)/*/include), $(call core_native_path,$(wildcard $(APPS_DIR)/*/include)))",
  3985. DepsDirs = lists:usort(string:tokens(DepsDirsSrc++DepsDirsInc, " ")),
  3986. AppsDirs = lists:usort(string:tokens(AppsDirsSrc++AppsDirsInc, " ")),
  3987. Modules = [{list_to_atom(filename:basename(F, ".erl")), F} || F <- ErlFiles],
  3988. Add = fun (Mod, Dep) ->
  3989. case lists:keyfind(Dep, 1, Modules) of
  3990. false -> ok;
  3991. {_, DepFile} ->
  3992. {_, ModFile} = lists:keyfind(Mod, 1, Modules),
  3993. ets:insert(E, {ModFile, DepFile}),
  3994. digraph:add_vertex(G, Mod),
  3995. digraph:add_vertex(G, Dep),
  3996. digraph:add_edge(G, Mod, Dep)
  3997. end
  3998. end,
  3999. AddHd = fun (F, Mod, DepFile) ->
  4000. case file:open(DepFile, [read]) of
  4001. {error, enoent} ->
  4002. ok;
  4003. {ok, Fd} ->
  4004. {_, ModFile} = lists:keyfind(Mod, 1, Modules),
  4005. case ets:match(E, {ModFile, DepFile}) of
  4006. [] ->
  4007. ets:insert(E, {ModFile, DepFile}),
  4008. F(F, Fd, Mod,0);
  4009. _ -> ok
  4010. end
  4011. end
  4012. end,
  4013. SearchHrl = fun
  4014. F(_Hrl, []) -> {error,enoent};
  4015. F(Hrl, [Dir|Dirs]) ->
  4016. HrlF = filename:join([Dir,Hrl]),
  4017. case filelib:is_file(HrlF) of
  4018. true ->
  4019. {ok, HrlF};
  4020. false -> F(Hrl,Dirs)
  4021. end
  4022. end,
  4023. Attr = fun
  4024. (_F, Mod, behavior, Dep) ->
  4025. Add(Mod, Dep);
  4026. (_F, Mod, behaviour, Dep) ->
  4027. Add(Mod, Dep);
  4028. (_F, Mod, compile, {parse_transform, Dep}) ->
  4029. Add(Mod, Dep);
  4030. (_F, Mod, compile, Opts) when is_list(Opts) ->
  4031. case proplists:get_value(parse_transform, Opts) of
  4032. undefined -> ok;
  4033. Dep -> Add(Mod, Dep)
  4034. end;
  4035. (F, Mod, include, Hrl) ->
  4036. case SearchHrl(Hrl, ["src", "include",AppsDir,DepsDir]++AppsDirs++DepsDirs) of
  4037. {ok, FoundHrl} -> AddHd(F, Mod, FoundHrl);
  4038. {error, _} -> false
  4039. end;
  4040. (F, Mod, include_lib, Hrl) ->
  4041. case SearchHrl(Hrl, ["src", "include",AppsDir,DepsDir]++AppsDirs++DepsDirs) of
  4042. {ok, FoundHrl} -> AddHd(F, Mod, FoundHrl);
  4043. {error, _} -> false
  4044. end;
  4045. (F, Mod, import, {Imp, _}) ->
  4046. IsFile =
  4047. case lists:keyfind(Imp, 1, Modules) of
  4048. false -> false;
  4049. {_, FilePath} -> filelib:is_file(FilePath)
  4050. end,
  4051. case IsFile of
  4052. false -> ok;
  4053. true -> Add(Mod, Imp)
  4054. end;
  4055. (_, _, _, _) -> ok
  4056. end,
  4057. MakeDepend = fun
  4058. (F, Fd, Mod, StartLocation) ->
  4059. {ok, Filename} = file:pid2name(Fd),
  4060. case io:parse_erl_form(Fd, undefined, StartLocation) of
  4061. {ok, AbsData, EndLocation} ->
  4062. case AbsData of
  4063. {attribute, _, Key, Value} ->
  4064. Attr(F, Mod, Key, Value),
  4065. F(F, Fd, Mod, EndLocation);
  4066. _ -> F(F, Fd, Mod, EndLocation)
  4067. end;
  4068. {eof, _ } -> file:close(Fd);
  4069. {error, ErrorDescription } ->
  4070. file:close(Fd);
  4071. {error, ErrorInfo, ErrorLocation} ->
  4072. F(F, Fd, Mod, ErrorLocation)
  4073. end,
  4074. ok
  4075. end,
  4076. [begin
  4077. Mod = list_to_atom(filename:basename(F, ".erl")),
  4078. case file:open(F, [read]) of
  4079. {ok, Fd} -> MakeDepend(MakeDepend, Fd, Mod,0);
  4080. {error, enoent} -> ok
  4081. end
  4082. end || F <- ErlFiles],
  4083. Depend = sofs:to_external(sofs:relation_to_family(sofs:relation(ets:tab2list(E)))),
  4084. CompileFirst = [X || X <- lists:reverse(digraph_utils:topsort(G)), [] =/= digraph:in_neighbours(G, X)],
  4085. TargetPath = fun(Target) ->
  4086. case lists:keyfind(Target, 1, Modules) of
  4087. false -> "";
  4088. {_, DepFile} ->
  4089. DirSubname = tl(string:tokens(filename:dirname(DepFile), "/")),
  4090. string:join(DirSubname ++ [atom_to_list(Target)], "/")
  4091. end
  4092. end,
  4093. Output0 = [
  4094. "# Generated by Erlang.mk. Edit at your own risk!\n\n",
  4095. [[F, "::", [[" ", D] || D <- Deps], "; @touch \$$@\n"] || {F, Deps} <- Depend],
  4096. "\nCOMPILE_FIRST +=", [[" ", TargetPath(CF)] || CF <- CompileFirst], "\n"
  4097. ],
  4098. Output = case "é" of
  4099. [233] -> unicode:characters_to_binary(Output0);
  4100. _ -> Output0
  4101. end,
  4102. ok = file:write_file("$(1)", Output),
  4103. halt()
  4104. endef
  4105. ifeq ($(if $(NO_MAKEDEP),$(wildcard $(PROJECT).d),),)
  4106. $(PROJECT).d:: $(ERL_FILES) $(call core_find,include/,*.hrl) $(MAKEFILE_LIST)
  4107. $(makedep_verbose) $(call erlang,$(call makedep.erl,$@))
  4108. endif
  4109. ifeq ($(IS_APP)$(IS_DEP),)
  4110. ifneq ($(words $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES)),0)
  4111. # Rebuild everything when the Makefile changes.
  4112. $(ERLANG_MK_TMP)/last-makefile-change: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)
  4113. $(verbose) if test -f $@; then \
  4114. touch $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES); \
  4115. touch -c $(PROJECT).d; \
  4116. fi
  4117. $(verbose) touch $@
  4118. $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES):: $(ERLANG_MK_TMP)/last-makefile-change
  4119. ebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-change
  4120. endif
  4121. endif
  4122. $(PROJECT).d::
  4123. $(verbose) :
  4124. include $(wildcard $(PROJECT).d)
  4125. ebin/$(PROJECT).app:: ebin/
  4126. ebin/:
  4127. $(verbose) mkdir -p ebin/
  4128. define compile_erl
  4129. $(erlc_verbose) erlc -v $(if $(IS_DEP),$(filter-out -Werror,$(ERLC_OPTS)),$(ERLC_OPTS)) -o ebin/ \
  4130. -pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),$(COMPILE_FIRST_PATHS) $(1))
  4131. endef
  4132. define validate_app_file
  4133. case file:consult("ebin/$(PROJECT).app") of
  4134. {ok, _} -> halt();
  4135. _ -> halt(1)
  4136. end
  4137. endef
  4138. ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) $(wildcard src/$(PROJECT).app.src)
  4139. $(eval FILES_TO_COMPILE := $(filter-out src/$(PROJECT).app.src,$?))
  4140. $(if $(strip $(FILES_TO_COMPILE)),$(call compile_erl,$(FILES_TO_COMPILE)))
  4141. # Older git versions do not have the --first-parent flag. Do without in that case.
  4142. $(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null \
  4143. || git describe --dirty --abbrev=7 --tags --always 2>/dev/null || true))
  4144. $(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
  4145. $(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES) $(BEAM_FILES)))))))
  4146. ifeq ($(wildcard src/$(PROJECT).app.src),)
  4147. $(app_verbose) printf '$(subst %,%%,$(subst $(newline),\n,$(subst ','\'',$(call app_file,$(GITDESCRIBE),$(MODULES)))))' \
  4148. > ebin/$(PROJECT).app
  4149. $(verbose) if ! $(call erlang,$(call validate_app_file)); then \
  4150. echo "The .app file produced is invalid. Please verify the value of PROJECT_ENV." >&2; \
  4151. exit 1; \
  4152. fi
  4153. else
  4154. $(verbose) if [ -z "$$(grep -e '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \
  4155. echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk documentation for instructions." >&2; \
  4156. exit 1; \
  4157. fi
  4158. $(appsrc_verbose) cat src/$(PROJECT).app.src \
  4159. | sed "s/{[[:space:]]*modules[[:space:]]*,[[:space:]]*\[\]}/{modules, \[$(call comma_list,$(MODULES))\]}/" \
  4160. | sed "s/{id,[[:space:]]*\"git\"}/{id, \"$(subst /,\/,$(GITDESCRIBE))\"}/" \
  4161. > ebin/$(PROJECT).app
  4162. endif
  4163. ifneq ($(wildcard src/$(PROJECT).appup),)
  4164. $(verbose) cp src/$(PROJECT).appup ebin/
  4165. endif
  4166. clean:: clean-app
  4167. clean-app:
  4168. $(gen_verbose) rm -rf $(PROJECT).d ebin/ priv/mibs/ $(XRL_ERL_FILES) $(YRL_ERL_FILES) \
  4169. $(addprefix include/,$(patsubst %.mib,%.hrl,$(notdir $(MIB_FILES)))) \
  4170. $(addprefix include/,$(patsubst %.asn1,%.hrl,$(notdir $(ASN1_FILES)))) \
  4171. $(addprefix include/,$(patsubst %.asn1,%.asn1db,$(notdir $(ASN1_FILES)))) \
  4172. $(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES))))
  4173. endif
  4174. # Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu>
  4175. # Copyright (c) 2015, Viktor Söderqvist <viktor@zuiderkwast.se>
  4176. # This file is part of erlang.mk and subject to the terms of the ISC License.
  4177. .PHONY: docs-deps
  4178. # Configuration.
  4179. ALL_DOC_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(DOC_DEPS))
  4180. # Targets.
  4181. $(foreach dep,$(DOC_DEPS),$(eval $(call dep_target,$(dep))))
  4182. ifneq ($(SKIP_DEPS),)
  4183. doc-deps:
  4184. else
  4185. doc-deps: $(ALL_DOC_DEPS_DIRS)
  4186. $(verbose) set -e; for dep in $(ALL_DOC_DEPS_DIRS) ; do $(MAKE) -C $$dep IS_DEP=1; done
  4187. endif
  4188. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  4189. # This file is part of erlang.mk and subject to the terms of the ISC License.
  4190. .PHONY: rel-deps
  4191. # Configuration.
  4192. ALL_REL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(REL_DEPS))
  4193. # Targets.
  4194. $(foreach dep,$(REL_DEPS),$(eval $(call dep_target,$(dep))))
  4195. ifneq ($(SKIP_DEPS),)
  4196. rel-deps:
  4197. else
  4198. rel-deps: $(ALL_REL_DEPS_DIRS)
  4199. $(verbose) set -e; for dep in $(ALL_REL_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
  4200. endif
  4201. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  4202. # This file is part of erlang.mk and subject to the terms of the ISC License.
  4203. .PHONY: test-deps test-dir test-build clean-test-dir
  4204. # Configuration.
  4205. TEST_DIR ?= $(CURDIR)/test
  4206. ALL_TEST_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(TEST_DEPS))
  4207. TEST_ERLC_OPTS ?= +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guard
  4208. TEST_ERLC_OPTS += -DTEST=1
  4209. # Targets.
  4210. $(foreach dep,$(TEST_DEPS),$(eval $(call dep_target,$(dep))))
  4211. ifneq ($(SKIP_DEPS),)
  4212. test-deps:
  4213. else
  4214. test-deps: $(ALL_TEST_DEPS_DIRS)
  4215. $(verbose) set -e; for dep in $(ALL_TEST_DEPS_DIRS) ; do \
  4216. if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \
  4217. :; \
  4218. else \
  4219. $(MAKE) -C $$dep IS_DEP=1; \
  4220. if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \
  4221. fi \
  4222. done
  4223. endif
  4224. ifneq ($(wildcard $(TEST_DIR)),)
  4225. test-dir: $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build
  4226. @:
  4227. test_erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\
  4228. $(filter %.erl %.core,$(notdir $(FILES_TO_COMPILE))));
  4229. test_erlc_verbose_2 = set -x;
  4230. test_erlc_verbose = $(test_erlc_verbose_$(V))
  4231. define compile_test_erl
  4232. $(test_erlc_verbose) erlc -v $(TEST_ERLC_OPTS) -o $(TEST_DIR) \
  4233. -pa ebin/ -I include/ $(1)
  4234. endef
  4235. ERL_TEST_FILES = $(call core_find,$(TEST_DIR)/,*.erl)
  4236. $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build: $(ERL_TEST_FILES) $(MAKEFILE_LIST)
  4237. $(eval FILES_TO_COMPILE := $(if $(filter $(MAKEFILE_LIST),$?),$(filter $(ERL_TEST_FILES),$^),$?))
  4238. $(if $(strip $(FILES_TO_COMPILE)),$(call compile_test_erl,$(FILES_TO_COMPILE)) && touch $@)
  4239. endif
  4240. test-build:: IS_TEST=1
  4241. test-build:: ERLC_OPTS=$(TEST_ERLC_OPTS)
  4242. test-build:: $(if $(wildcard src),$(if $(wildcard ebin/test),,clean)) $(if $(IS_APP),,deps test-deps)
  4243. # We already compiled everything when IS_APP=1.
  4244. ifndef IS_APP
  4245. ifneq ($(wildcard src),)
  4246. $(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
  4247. $(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
  4248. $(gen_verbose) touch ebin/test
  4249. endif
  4250. ifneq ($(wildcard $(TEST_DIR)),)
  4251. $(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
  4252. endif
  4253. endif
  4254. # Roughly the same as test-build, but when IS_APP=1.
  4255. # We only care about compiling the current application.
  4256. ifdef IS_APP
  4257. test-build-app:: ERLC_OPTS=$(TEST_ERLC_OPTS)
  4258. test-build-app:: deps test-deps
  4259. ifneq ($(wildcard src),)
  4260. $(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
  4261. $(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
  4262. $(gen_verbose) touch ebin/test
  4263. endif
  4264. ifneq ($(wildcard $(TEST_DIR)),)
  4265. $(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"
  4266. endif
  4267. endif
  4268. clean:: clean-test-dir
  4269. clean-test-dir:
  4270. ifneq ($(wildcard $(TEST_DIR)/*.beam),)
  4271. $(gen_verbose) rm -f $(TEST_DIR)/*.beam $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build
  4272. endif
  4273. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  4274. # This file is part of erlang.mk and subject to the terms of the ISC License.
  4275. .PHONY: rebar.config
  4276. # We strip out -Werror because we don't want to fail due to
  4277. # warnings when used as a dependency.
  4278. compat_prepare_erlc_opts = $(shell echo "$1" | sed 's/, */,/g')
  4279. define compat_convert_erlc_opts
  4280. $(if $(filter-out -Werror,$1),\
  4281. $(if $(findstring +,$1),\
  4282. $(shell echo $1 | cut -b 2-)))
  4283. endef
  4284. define compat_erlc_opts_to_list
  4285. [$(call comma_list,$(foreach o,$(call compat_prepare_erlc_opts,$1),$(call compat_convert_erlc_opts,$o)))]
  4286. endef
  4287. define compat_rebar_config
  4288. {deps, [
  4289. $(call comma_list,$(foreach d,$(DEPS),\
  4290. $(if $(filter hex,$(call dep_fetch,$d)),\
  4291. {$(call dep_name,$d)$(comma)"$(call dep_repo,$d)"},\
  4292. {$(call dep_name,$d)$(comma)".*"$(comma){git,"$(call dep_repo,$d)"$(comma)"$(call dep_commit,$d)"}})))
  4293. ]}.
  4294. {erl_opts, $(call compat_erlc_opts_to_list,$(ERLC_OPTS))}.
  4295. endef
  4296. rebar.config:
  4297. $(gen_verbose) $(call core_render,compat_rebar_config,rebar.config)
  4298. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  4299. # This file is part of erlang.mk and subject to the terms of the ISC License.
  4300. ifeq ($(filter asciideck,$(DEPS) $(DOC_DEPS)),asciideck)
  4301. .PHONY: asciidoc asciidoc-guide asciidoc-manual install-asciidoc distclean-asciidoc-guide distclean-asciidoc-manual
  4302. # Core targets.
  4303. docs:: asciidoc
  4304. distclean:: distclean-asciidoc-guide distclean-asciidoc-manual
  4305. # Plugin-specific targets.
  4306. asciidoc: asciidoc-guide asciidoc-manual
  4307. # User guide.
  4308. ifeq ($(wildcard doc/src/guide/book.asciidoc),)
  4309. asciidoc-guide:
  4310. else
  4311. asciidoc-guide: distclean-asciidoc-guide doc-deps
  4312. a2x -v -f pdf doc/src/guide/book.asciidoc && mv doc/src/guide/book.pdf doc/guide.pdf
  4313. a2x -v -f chunked doc/src/guide/book.asciidoc && mv doc/src/guide/book.chunked/ doc/html/
  4314. distclean-asciidoc-guide:
  4315. $(gen_verbose) rm -rf doc/html/ doc/guide.pdf
  4316. endif
  4317. # Man pages.
  4318. ASCIIDOC_MANUAL_FILES := $(wildcard doc/src/manual/*.asciidoc)
  4319. ifeq ($(ASCIIDOC_MANUAL_FILES),)
  4320. asciidoc-manual:
  4321. else
  4322. # Configuration.
  4323. MAN_INSTALL_PATH ?= /usr/local/share/man
  4324. MAN_SECTIONS ?= 3 7
  4325. MAN_PROJECT ?= $(shell echo $(PROJECT) | sed 's/^./\U&\E/')
  4326. MAN_VERSION ?= $(PROJECT_VERSION)
  4327. # Plugin-specific targets.
  4328. define asciidoc2man.erl
  4329. try
  4330. [begin
  4331. io:format(" ADOC ~s~n", [F]),
  4332. ok = asciideck:to_manpage(asciideck:parse_file(F), #{
  4333. compress => gzip,
  4334. outdir => filename:dirname(F),
  4335. extra2 => "$(MAN_PROJECT) $(MAN_VERSION)",
  4336. extra3 => "$(MAN_PROJECT) Function Reference"
  4337. })
  4338. end || F <- [$(shell echo $(addprefix $(comma)\",$(addsuffix \",$1)) | sed 's/^.//')]],
  4339. halt(0)
  4340. catch C:E$(if $V,:S) ->
  4341. io:format("Exception: ~p:~p~n$(if $V,Stacktrace: ~p~n)", [C, E$(if $V,$(comma) S)]),
  4342. halt(1)
  4343. end.
  4344. endef
  4345. asciidoc-manual:: doc-deps
  4346. asciidoc-manual:: $(ASCIIDOC_MANUAL_FILES)
  4347. $(gen_verbose) $(call erlang,$(call asciidoc2man.erl,$?))
  4348. $(verbose) $(foreach s,$(MAN_SECTIONS),mkdir -p doc/man$s/ && mv doc/src/manual/*.$s.gz doc/man$s/;)
  4349. install-docs:: install-asciidoc
  4350. install-asciidoc: asciidoc-manual
  4351. $(foreach s,$(MAN_SECTIONS),\
  4352. mkdir -p $(MAN_INSTALL_PATH)/man$s/ && \
  4353. install -g `id -g` -o `id -u` -m 0644 doc/man$s/*.gz $(MAN_INSTALL_PATH)/man$s/;)
  4354. distclean-asciidoc-manual:
  4355. $(gen_verbose) rm -rf $(addprefix doc/man,$(MAN_SECTIONS))
  4356. endif
  4357. endif
  4358. # Copyright (c) 2014-2016, Loïc Hoguin <essen@ninenines.eu>
  4359. # This file is part of erlang.mk and subject to the terms of the ISC License.
  4360. .PHONY: bootstrap bootstrap-lib bootstrap-rel new list-templates
  4361. # Core targets.
  4362. help::
  4363. $(verbose) printf "%s\n" "" \
  4364. "Bootstrap targets:" \
  4365. " bootstrap Generate a skeleton of an OTP application" \
  4366. " bootstrap-lib Generate a skeleton of an OTP library" \
  4367. " bootstrap-rel Generate the files needed to build a release" \
  4368. " new-app in=NAME Create a new local OTP application NAME" \
  4369. " new-lib in=NAME Create a new local OTP library NAME" \
  4370. " new t=TPL n=NAME Generate a module NAME based on the template TPL" \
  4371. " new t=T n=N in=APP Generate a module NAME based on the template TPL in APP" \
  4372. " list-templates List available templates"
  4373. # Bootstrap templates.
  4374. define bs_appsrc
  4375. {application, $p, [
  4376. {description, ""},
  4377. {vsn, "0.1.0"},
  4378. {id, "git"},
  4379. {modules, []},
  4380. {registered, []},
  4381. {applications, [
  4382. kernel,
  4383. stdlib
  4384. ]},
  4385. {mod, {$p_app, []}},
  4386. {env, []}
  4387. ]}.
  4388. endef
  4389. define bs_appsrc_lib
  4390. {application, $p, [
  4391. {description, ""},
  4392. {vsn, "0.1.0"},
  4393. {id, "git"},
  4394. {modules, []},
  4395. {registered, []},
  4396. {applications, [
  4397. kernel,
  4398. stdlib
  4399. ]}
  4400. ]}.
  4401. endef
  4402. # To prevent autocompletion issues with ZSH, we add "include erlang.mk"
  4403. # separately during the actual bootstrap.
  4404. define bs_Makefile
  4405. PROJECT = $p
  4406. PROJECT_DESCRIPTION = New project
  4407. PROJECT_VERSION = 0.1.0
  4408. $(if $(SP),
  4409. # Whitespace to be used when creating files from templates.
  4410. SP = $(SP)
  4411. )
  4412. endef
  4413. define bs_apps_Makefile
  4414. PROJECT = $p
  4415. PROJECT_DESCRIPTION = New project
  4416. PROJECT_VERSION = 0.1.0
  4417. $(if $(SP),
  4418. # Whitespace to be used when creating files from templates.
  4419. SP = $(SP)
  4420. )
  4421. # Make sure we know where the applications are located.
  4422. ROOT_DIR ?= $(call core_relpath,$(dir $(ERLANG_MK_FILENAME)),$(APPS_DIR)/app)
  4423. APPS_DIR ?= ..
  4424. DEPS_DIR ?= $(call core_relpath,$(DEPS_DIR),$(APPS_DIR)/app)
  4425. include $$(ROOT_DIR)/erlang.mk
  4426. endef
  4427. define bs_app
  4428. -module($p_app).
  4429. -behaviour(application).
  4430. -export([start/2]).
  4431. -export([stop/1]).
  4432. start(_Type, _Args) ->
  4433. $p_sup:start_link().
  4434. stop(_State) ->
  4435. ok.
  4436. endef
  4437. define bs_relx_config
  4438. {release, {$p_release, "1"}, [$p, sasl, runtime_tools]}.
  4439. {dev_mode, false}.
  4440. {include_erts, true}.
  4441. {extended_start_script, true}.
  4442. {sys_config, "config/sys.config"}.
  4443. {vm_args, "config/vm.args"}.
  4444. endef
  4445. define bs_sys_config
  4446. [
  4447. ].
  4448. endef
  4449. define bs_vm_args
  4450. -name $p@127.0.0.1
  4451. -setcookie $p
  4452. -heart
  4453. endef
  4454. # Normal templates.
  4455. define tpl_supervisor
  4456. -module($(n)).
  4457. -behaviour(supervisor).
  4458. -export([start_link/0]).
  4459. -export([init/1]).
  4460. start_link() ->
  4461. supervisor:start_link({local, ?MODULE}, ?MODULE, []).
  4462. init([]) ->
  4463. Procs = [],
  4464. {ok, {{one_for_one, 1, 5}, Procs}}.
  4465. endef
  4466. define tpl_gen_server
  4467. -module($(n)).
  4468. -behaviour(gen_server).
  4469. %% API.
  4470. -export([start_link/0]).
  4471. %% gen_server.
  4472. -export([init/1]).
  4473. -export([handle_call/3]).
  4474. -export([handle_cast/2]).
  4475. -export([handle_info/2]).
  4476. -export([terminate/2]).
  4477. -export([code_change/3]).
  4478. -record(state, {
  4479. }).
  4480. %% API.
  4481. -spec start_link() -> {ok, pid()}.
  4482. start_link() ->
  4483. gen_server:start_link(?MODULE, [], []).
  4484. %% gen_server.
  4485. init([]) ->
  4486. {ok, #state{}}.
  4487. handle_call(_Request, _From, State) ->
  4488. {reply, ignored, State}.
  4489. handle_cast(_Msg, State) ->
  4490. {noreply, State}.
  4491. handle_info(_Info, State) ->
  4492. {noreply, State}.
  4493. terminate(_Reason, _State) ->
  4494. ok.
  4495. code_change(_OldVsn, State, _Extra) ->
  4496. {ok, State}.
  4497. endef
  4498. define tpl_module
  4499. -module($(n)).
  4500. -export([]).
  4501. endef
  4502. define tpl_cowboy_http
  4503. -module($(n)).
  4504. -behaviour(cowboy_http_handler).
  4505. -export([init/3]).
  4506. -export([handle/2]).
  4507. -export([terminate/3]).
  4508. -record(state, {
  4509. }).
  4510. init(_, Req, _Opts) ->
  4511. {ok, Req, #state{}}.
  4512. handle(Req, State=#state{}) ->
  4513. {ok, Req2} = cowboy_req:reply(200, Req),
  4514. {ok, Req2, State}.
  4515. terminate(_Reason, _Req, _State) ->
  4516. ok.
  4517. endef
  4518. define tpl_gen_fsm
  4519. -module($(n)).
  4520. -behaviour(gen_fsm).
  4521. %% API.
  4522. -export([start_link/0]).
  4523. %% gen_fsm.
  4524. -export([init/1]).
  4525. -export([state_name/2]).
  4526. -export([handle_event/3]).
  4527. -export([state_name/3]).
  4528. -export([handle_sync_event/4]).
  4529. -export([handle_info/3]).
  4530. -export([terminate/3]).
  4531. -export([code_change/4]).
  4532. -record(state, {
  4533. }).
  4534. %% API.
  4535. -spec start_link() -> {ok, pid()}.
  4536. start_link() ->
  4537. gen_fsm:start_link(?MODULE, [], []).
  4538. %% gen_fsm.
  4539. init([]) ->
  4540. {ok, state_name, #state{}}.
  4541. state_name(_Event, StateData) ->
  4542. {next_state, state_name, StateData}.
  4543. handle_event(_Event, StateName, StateData) ->
  4544. {next_state, StateName, StateData}.
  4545. state_name(_Event, _From, StateData) ->
  4546. {reply, ignored, state_name, StateData}.
  4547. handle_sync_event(_Event, _From, StateName, StateData) ->
  4548. {reply, ignored, StateName, StateData}.
  4549. handle_info(_Info, StateName, StateData) ->
  4550. {next_state, StateName, StateData}.
  4551. terminate(_Reason, _StateName, _StateData) ->
  4552. ok.
  4553. code_change(_OldVsn, StateName, StateData, _Extra) ->
  4554. {ok, StateName, StateData}.
  4555. endef
  4556. define tpl_gen_statem
  4557. -module($(n)).
  4558. -behaviour(gen_statem).
  4559. %% API.
  4560. -export([start_link/0]).
  4561. %% gen_statem.
  4562. -export([callback_mode/0]).
  4563. -export([init/1]).
  4564. -export([state_name/3]).
  4565. -export([handle_event/4]).
  4566. -export([terminate/3]).
  4567. -export([code_change/4]).
  4568. -record(state, {
  4569. }).
  4570. %% API.
  4571. -spec start_link() -> {ok, pid()}.
  4572. start_link() ->
  4573. gen_statem:start_link(?MODULE, [], []).
  4574. %% gen_statem.
  4575. callback_mode() ->
  4576. state_functions.
  4577. init([]) ->
  4578. {ok, state_name, #state{}}.
  4579. state_name(_EventType, _EventData, StateData) ->
  4580. {next_state, state_name, StateData}.
  4581. handle_event(_EventType, _EventData, StateName, StateData) ->
  4582. {next_state, StateName, StateData}.
  4583. terminate(_Reason, _StateName, _StateData) ->
  4584. ok.
  4585. code_change(_OldVsn, StateName, StateData, _Extra) ->
  4586. {ok, StateName, StateData}.
  4587. endef
  4588. define tpl_cowboy_loop
  4589. -module($(n)).
  4590. -behaviour(cowboy_loop_handler).
  4591. -export([init/3]).
  4592. -export([info/3]).
  4593. -export([terminate/3]).
  4594. -record(state, {
  4595. }).
  4596. init(_, Req, _Opts) ->
  4597. {loop, Req, #state{}, 5000, hibernate}.
  4598. info(_Info, Req, State) ->
  4599. {loop, Req, State, hibernate}.
  4600. terminate(_Reason, _Req, _State) ->
  4601. ok.
  4602. endef
  4603. define tpl_cowboy_rest
  4604. -module($(n)).
  4605. -export([init/3]).
  4606. -export([content_types_provided/2]).
  4607. -export([get_html/2]).
  4608. init(_, _Req, _Opts) ->
  4609. {upgrade, protocol, cowboy_rest}.
  4610. content_types_provided(Req, State) ->
  4611. {[{{<<"text">>, <<"html">>, '*'}, get_html}], Req, State}.
  4612. get_html(Req, State) ->
  4613. {<<"<html><body>This is REST!</body></html>">>, Req, State}.
  4614. endef
  4615. define tpl_cowboy_ws
  4616. -module($(n)).
  4617. -behaviour(cowboy_websocket_handler).
  4618. -export([init/3]).
  4619. -export([websocket_init/3]).
  4620. -export([websocket_handle/3]).
  4621. -export([websocket_info/3]).
  4622. -export([websocket_terminate/3]).
  4623. -record(state, {
  4624. }).
  4625. init(_, _, _) ->
  4626. {upgrade, protocol, cowboy_websocket}.
  4627. websocket_init(_, Req, _Opts) ->
  4628. Req2 = cowboy_req:compact(Req),
  4629. {ok, Req2, #state{}}.
  4630. websocket_handle({text, Data}, Req, State) ->
  4631. {reply, {text, Data}, Req, State};
  4632. websocket_handle({binary, Data}, Req, State) ->
  4633. {reply, {binary, Data}, Req, State};
  4634. websocket_handle(_Frame, Req, State) ->
  4635. {ok, Req, State}.
  4636. websocket_info(_Info, Req, State) ->
  4637. {ok, Req, State}.
  4638. websocket_terminate(_Reason, _Req, _State) ->
  4639. ok.
  4640. endef
  4641. define tpl_ranch_protocol
  4642. -module($(n)).
  4643. -behaviour(ranch_protocol).
  4644. -export([start_link/4]).
  4645. -export([init/4]).
  4646. -type opts() :: [].
  4647. -export_type([opts/0]).
  4648. -record(state, {
  4649. socket :: inet:socket(),
  4650. transport :: module()
  4651. }).
  4652. start_link(Ref, Socket, Transport, Opts) ->
  4653. Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),
  4654. {ok, Pid}.
  4655. -spec init(ranch:ref(), inet:socket(), module(), opts()) -> ok.
  4656. init(Ref, Socket, Transport, _Opts) ->
  4657. ok = ranch:accept_ack(Ref),
  4658. loop(#state{socket=Socket, transport=Transport}).
  4659. loop(State) ->
  4660. loop(State).
  4661. endef
  4662. # Plugin-specific targets.
  4663. ifndef WS
  4664. ifdef SP
  4665. WS = $(subst a,,a $(wordlist 1,$(SP),a a a a a a a a a a a a a a a a a a a a))
  4666. else
  4667. WS = $(tab)
  4668. endif
  4669. endif
  4670. bootstrap:
  4671. ifneq ($(wildcard src/),)
  4672. $(error Error: src/ directory already exists)
  4673. endif
  4674. $(eval p := $(PROJECT))
  4675. $(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\
  4676. $(error Error: Invalid characters in the application name))
  4677. $(eval n := $(PROJECT)_sup)
  4678. $(verbose) $(call core_render,bs_Makefile,Makefile)
  4679. $(verbose) echo "include erlang.mk" >> Makefile
  4680. $(verbose) mkdir src/
  4681. ifdef LEGACY
  4682. $(verbose) $(call core_render,bs_appsrc,src/$(PROJECT).app.src)
  4683. endif
  4684. $(verbose) $(call core_render,bs_app,src/$(PROJECT)_app.erl)
  4685. $(verbose) $(call core_render,tpl_supervisor,src/$(PROJECT)_sup.erl)
  4686. bootstrap-lib:
  4687. ifneq ($(wildcard src/),)
  4688. $(error Error: src/ directory already exists)
  4689. endif
  4690. $(eval p := $(PROJECT))
  4691. $(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\
  4692. $(error Error: Invalid characters in the application name))
  4693. $(verbose) $(call core_render,bs_Makefile,Makefile)
  4694. $(verbose) echo "include erlang.mk" >> Makefile
  4695. $(verbose) mkdir src/
  4696. ifdef LEGACY
  4697. $(verbose) $(call core_render,bs_appsrc_lib,src/$(PROJECT).app.src)
  4698. endif
  4699. bootstrap-rel:
  4700. ifneq ($(wildcard relx.config),)
  4701. $(error Error: relx.config already exists)
  4702. endif
  4703. ifneq ($(wildcard config/),)
  4704. $(error Error: config/ directory already exists)
  4705. endif
  4706. $(eval p := $(PROJECT))
  4707. $(verbose) $(call core_render,bs_relx_config,relx.config)
  4708. $(verbose) mkdir config/
  4709. $(verbose) $(call core_render,bs_sys_config,config/sys.config)
  4710. $(verbose) $(call core_render,bs_vm_args,config/vm.args)
  4711. $(verbose) awk '/^include erlang.mk/ && !ins {print "BUILD_DEPS += relx";ins=1};{print}' Makefile > Makefile.bak
  4712. $(verbose) mv Makefile.bak Makefile
  4713. new-app:
  4714. ifndef in
  4715. $(error Usage: $(MAKE) new-app in=APP)
  4716. endif
  4717. ifneq ($(wildcard $(APPS_DIR)/$in),)
  4718. $(error Error: Application $in already exists)
  4719. endif
  4720. $(eval p := $(in))
  4721. $(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\
  4722. $(error Error: Invalid characters in the application name))
  4723. $(eval n := $(in)_sup)
  4724. $(verbose) mkdir -p $(APPS_DIR)/$p/src/
  4725. $(verbose) $(call core_render,bs_apps_Makefile,$(APPS_DIR)/$p/Makefile)
  4726. ifdef LEGACY
  4727. $(verbose) $(call core_render,bs_appsrc,$(APPS_DIR)/$p/src/$p.app.src)
  4728. endif
  4729. $(verbose) $(call core_render,bs_app,$(APPS_DIR)/$p/src/$p_app.erl)
  4730. $(verbose) $(call core_render,tpl_supervisor,$(APPS_DIR)/$p/src/$p_sup.erl)
  4731. new-lib:
  4732. ifndef in
  4733. $(error Usage: $(MAKE) new-lib in=APP)
  4734. endif
  4735. ifneq ($(wildcard $(APPS_DIR)/$in),)
  4736. $(error Error: Application $in already exists)
  4737. endif
  4738. $(eval p := $(in))
  4739. $(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\
  4740. $(error Error: Invalid characters in the application name))
  4741. $(verbose) mkdir -p $(APPS_DIR)/$p/src/
  4742. $(verbose) $(call core_render,bs_apps_Makefile,$(APPS_DIR)/$p/Makefile)
  4743. ifdef LEGACY
  4744. $(verbose) $(call core_render,bs_appsrc_lib,$(APPS_DIR)/$p/src/$p.app.src)
  4745. endif
  4746. new:
  4747. ifeq ($(wildcard src/)$(in),)
  4748. $(error Error: src/ directory does not exist)
  4749. endif
  4750. ifndef t
  4751. $(error Usage: $(MAKE) new t=TEMPLATE n=NAME [in=APP])
  4752. endif
  4753. ifndef n
  4754. $(error Usage: $(MAKE) new t=TEMPLATE n=NAME [in=APP])
  4755. endif
  4756. ifdef in
  4757. $(verbose) $(call core_render,tpl_$(t),$(APPS_DIR)/$(in)/src/$(n).erl)
  4758. else
  4759. $(verbose) $(call core_render,tpl_$(t),src/$(n).erl)
  4760. endif
  4761. list-templates:
  4762. $(verbose) @echo Available templates:
  4763. $(verbose) printf " %s\n" $(sort $(patsubst tpl_%,%,$(filter tpl_%,$(.VARIABLES))))
  4764. # Copyright (c) 2014-2016, Loïc Hoguin <essen@ninenines.eu>
  4765. # This file is part of erlang.mk and subject to the terms of the ISC License.
  4766. .PHONY: clean-c_src distclean-c_src-env
  4767. # Configuration.
  4768. C_SRC_DIR ?= $(CURDIR)/c_src
  4769. C_SRC_ENV ?= $(C_SRC_DIR)/env.mk
  4770. C_SRC_OUTPUT ?= $(CURDIR)/priv/$(PROJECT)
  4771. C_SRC_TYPE ?= shared
  4772. # System type and C compiler/flags.
  4773. ifeq ($(PLATFORM),msys2)
  4774. C_SRC_OUTPUT_EXECUTABLE_EXTENSION ?= .exe
  4775. C_SRC_OUTPUT_SHARED_EXTENSION ?= .dll
  4776. C_SRC_OUTPUT_STATIC_EXTENSION ?= .lib
  4777. else
  4778. C_SRC_OUTPUT_EXECUTABLE_EXTENSION ?=
  4779. C_SRC_OUTPUT_SHARED_EXTENSION ?= .so
  4780. C_SRC_OUTPUT_STATIC_EXTENSION ?= .a
  4781. endif
  4782. ifeq ($(C_SRC_TYPE),shared)
  4783. C_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_SHARED_EXTENSION)
  4784. else ifeq ($(C_SRC_TYPE),static)
  4785. C_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_STATIC_EXTENSION)
  4786. else
  4787. C_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_EXECUTABLE_EXTENSION)
  4788. endif
  4789. RANLIB ?= ranlib
  4790. ARFLAGS ?= cr
  4791. ifeq ($(PLATFORM),msys2)
  4792. # We hardcode the compiler used on MSYS2. The default CC=cc does
  4793. # not produce working code. The "gcc" MSYS2 package also doesn't.
  4794. CC = /mingw64/bin/gcc
  4795. export CC
  4796. CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
  4797. CXXFLAGS ?= -O3 -finline-functions -Wall
  4798. else ifeq ($(PLATFORM),darwin)
  4799. CC ?= cc
  4800. CFLAGS ?= -O3 -std=c99 -Wall -Wmissing-prototypes
  4801. CXXFLAGS ?= -O3 -Wall
  4802. LDFLAGS ?= -flat_namespace -undefined suppress
  4803. else ifeq ($(PLATFORM),freebsd)
  4804. CC ?= cc
  4805. CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
  4806. CXXFLAGS ?= -O3 -finline-functions -Wall
  4807. else ifeq ($(PLATFORM),linux)
  4808. CC ?= gcc
  4809. CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
  4810. CXXFLAGS ?= -O3 -finline-functions -Wall
  4811. endif
  4812. ifneq ($(PLATFORM),msys2)
  4813. CFLAGS += -fPIC
  4814. CXXFLAGS += -fPIC
  4815. endif
  4816. ifeq ($(C_SRC_TYPE),static)
  4817. CFLAGS += -DSTATIC_ERLANG_NIF=1
  4818. CXXFLAGS += -DSTATIC_ERLANG_NIF=1
  4819. endif
  4820. CFLAGS += -I"$(ERTS_INCLUDE_DIR)" -I"$(ERL_INTERFACE_INCLUDE_DIR)"
  4821. CXXFLAGS += -I"$(ERTS_INCLUDE_DIR)" -I"$(ERL_INTERFACE_INCLUDE_DIR)"
  4822. LDLIBS += -L"$(ERL_INTERFACE_LIB_DIR)" -lei
  4823. # Verbosity.
  4824. c_verbose_0 = @echo " C " $(filter-out $(notdir $(MAKEFILE_LIST) $(C_SRC_ENV)),$(^F));
  4825. c_verbose = $(c_verbose_$(V))
  4826. cpp_verbose_0 = @echo " CPP " $(filter-out $(notdir $(MAKEFILE_LIST) $(C_SRC_ENV)),$(^F));
  4827. cpp_verbose = $(cpp_verbose_$(V))
  4828. link_verbose_0 = @echo " LD " $(@F);
  4829. link_verbose = $(link_verbose_$(V))
  4830. ar_verbose_0 = @echo " AR " $(@F);
  4831. ar_verbose = $(ar_verbose_$(V))
  4832. ranlib_verbose_0 = @echo " RANLIB" $(@F);
  4833. ranlib_verbose = $(ranlib_verbose_$(V))
  4834. # Targets.
  4835. ifeq ($(wildcard $(C_SRC_DIR)),)
  4836. else ifneq ($(wildcard $(C_SRC_DIR)/Makefile),)
  4837. app:: app-c_src
  4838. test-build:: app-c_src
  4839. app-c_src:
  4840. $(MAKE) -C $(C_SRC_DIR)
  4841. clean::
  4842. $(MAKE) -C $(C_SRC_DIR) clean
  4843. else
  4844. ifeq ($(SOURCES),)
  4845. SOURCES := $(sort $(foreach pat,*.c *.C *.cc *.cpp,$(call core_find,$(C_SRC_DIR)/,$(pat))))
  4846. endif
  4847. OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
  4848. COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c
  4849. COMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
  4850. app:: $(C_SRC_ENV) $(C_SRC_OUTPUT_FILE)
  4851. test-build:: $(C_SRC_ENV) $(C_SRC_OUTPUT_FILE)
  4852. ifneq ($(C_SRC_TYPE),static)
  4853. $(C_SRC_OUTPUT_FILE): $(OBJECTS)
  4854. $(verbose) mkdir -p $(dir $@)
  4855. $(link_verbose) $(CC) $(OBJECTS) \
  4856. $(LDFLAGS) $(if $(filter $(C_SRC_TYPE),shared),-shared) $(LDLIBS) \
  4857. -o $(C_SRC_OUTPUT_FILE)
  4858. else
  4859. $(C_SRC_OUTPUT_FILE): $(OBJECTS)
  4860. $(verbose) mkdir -p $(dir $@)
  4861. $(ar_verbose) $(AR) $(ARFLAGS) $(C_SRC_OUTPUT_FILE) $(OBJECTS)
  4862. $(ranlib_verbose) $(RANLIB) $(C_SRC_OUTPUT_FILE)
  4863. endif
  4864. $(OBJECTS): $(MAKEFILE_LIST) $(C_SRC_ENV)
  4865. %.o: %.c
  4866. $(COMPILE_C) $(OUTPUT_OPTION) $<
  4867. %.o: %.cc
  4868. $(COMPILE_CPP) $(OUTPUT_OPTION) $<
  4869. %.o: %.C
  4870. $(COMPILE_CPP) $(OUTPUT_OPTION) $<
  4871. %.o: %.cpp
  4872. $(COMPILE_CPP) $(OUTPUT_OPTION) $<
  4873. clean:: clean-c_src
  4874. clean-c_src:
  4875. $(gen_verbose) rm -f $(C_SRC_OUTPUT_FILE) $(OBJECTS)
  4876. endif
  4877. ifneq ($(wildcard $(C_SRC_DIR)),)
  4878. ERL_ERTS_DIR = $(shell $(ERL) -eval 'io:format("~s~n", [code:lib_dir(erts)]), halt().')
  4879. $(C_SRC_ENV):
  4880. $(verbose) $(ERL) -eval "file:write_file(\"$(call core_native_path,$(C_SRC_ENV))\", \
  4881. io_lib:format( \
  4882. \"# Generated by Erlang.mk. Edit at your own risk!~n~n\" \
  4883. \"ERTS_INCLUDE_DIR ?= ~s/erts-~s/include/~n\" \
  4884. \"ERL_INTERFACE_INCLUDE_DIR ?= ~s~n\" \
  4885. \"ERL_INTERFACE_LIB_DIR ?= ~s~n\" \
  4886. \"ERTS_DIR ?= $(ERL_ERTS_DIR)~n\", \
  4887. [code:root_dir(), erlang:system_info(version), \
  4888. code:lib_dir(erl_interface, include), \
  4889. code:lib_dir(erl_interface, lib)])), \
  4890. halt()."
  4891. distclean:: distclean-c_src-env
  4892. distclean-c_src-env:
  4893. $(gen_verbose) rm -f $(C_SRC_ENV)
  4894. -include $(C_SRC_ENV)
  4895. ifneq ($(ERL_ERTS_DIR),$(ERTS_DIR))
  4896. $(shell rm -f $(C_SRC_ENV))
  4897. endif
  4898. endif
  4899. # Templates.
  4900. define bs_c_nif
  4901. #include "erl_nif.h"
  4902. static int loads = 0;
  4903. static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
  4904. {
  4905. /* Initialize private data. */
  4906. *priv_data = NULL;
  4907. loads++;
  4908. return 0;
  4909. }
  4910. static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info)
  4911. {
  4912. /* Convert the private data to the new version. */
  4913. *priv_data = *old_priv_data;
  4914. loads++;
  4915. return 0;
  4916. }
  4917. static void unload(ErlNifEnv* env, void* priv_data)
  4918. {
  4919. if (loads == 1) {
  4920. /* Destroy the private data. */
  4921. }
  4922. loads--;
  4923. }
  4924. static ERL_NIF_TERM hello(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
  4925. {
  4926. if (enif_is_atom(env, argv[0])) {
  4927. return enif_make_tuple2(env,
  4928. enif_make_atom(env, "hello"),
  4929. argv[0]);
  4930. }
  4931. return enif_make_tuple2(env,
  4932. enif_make_atom(env, "error"),
  4933. enif_make_atom(env, "badarg"));
  4934. }
  4935. static ErlNifFunc nif_funcs[] = {
  4936. {"hello", 1, hello}
  4937. };
  4938. ERL_NIF_INIT($n, nif_funcs, load, NULL, upgrade, unload)
  4939. endef
  4940. define bs_erl_nif
  4941. -module($n).
  4942. -export([hello/1]).
  4943. -on_load(on_load/0).
  4944. on_load() ->
  4945. PrivDir = case code:priv_dir(?MODULE) of
  4946. {error, _} ->
  4947. AppPath = filename:dirname(filename:dirname(code:which(?MODULE))),
  4948. filename:join(AppPath, "priv");
  4949. Path ->
  4950. Path
  4951. end,
  4952. erlang:load_nif(filename:join(PrivDir, atom_to_list(?MODULE)), 0).
  4953. hello(_) ->
  4954. erlang:nif_error({not_loaded, ?MODULE}).
  4955. endef
  4956. new-nif:
  4957. ifneq ($(wildcard $(C_SRC_DIR)/$n.c),)
  4958. $(error Error: $(C_SRC_DIR)/$n.c already exists)
  4959. endif
  4960. ifneq ($(wildcard src/$n.erl),)
  4961. $(error Error: src/$n.erl already exists)
  4962. endif
  4963. ifndef n
  4964. $(error Usage: $(MAKE) new-nif n=NAME [in=APP])
  4965. endif
  4966. ifdef in
  4967. $(verbose) $(MAKE) -C $(APPS_DIR)/$(in)/ new-nif n=$n in=
  4968. else
  4969. $(verbose) mkdir -p $(C_SRC_DIR) src/
  4970. $(verbose) $(call core_render,bs_c_nif,$(C_SRC_DIR)/$n.c)
  4971. $(verbose) $(call core_render,bs_erl_nif,src/$n.erl)
  4972. endif
  4973. # Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu>
  4974. # This file is part of erlang.mk and subject to the terms of the ISC License.
  4975. .PHONY: ci ci-prepare ci-setup
  4976. CI_OTP ?=
  4977. ifeq ($(strip $(CI_OTP)),)
  4978. ci::
  4979. else
  4980. ci:: $(addprefix ci-,$(CI_OTP))
  4981. ci-prepare: $(addprefix ci-prepare-,$(CI_OTP))
  4982. ci-setup::
  4983. $(verbose) :
  4984. ci-extra::
  4985. $(verbose) :
  4986. ci_verbose_0 = @echo " CI " $(1);
  4987. ci_verbose = $(ci_verbose_$(V))
  4988. define ci_target
  4989. ci-prepare-$1: $(KERL_INSTALL_DIR)/$2
  4990. $(verbose) :
  4991. ci-$1: ci-prepare-$1
  4992. $(verbose) $(MAKE) --no-print-directory clean
  4993. $(ci_verbose) \
  4994. PATH="$(KERL_INSTALL_DIR)/$2/bin:$(PATH)" \
  4995. CI_OTP_RELEASE="$1" \
  4996. CT_OPTS="-label $1" \
  4997. CI_VM="$3" \
  4998. $(MAKE) ci-setup tests
  4999. $(verbose) $(MAKE) --no-print-directory ci-extra
  5000. endef
  5001. $(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),$(otp),otp)))
  5002. $(foreach otp,$(filter-out $(ERLANG_OTP),$(CI_OTP)),$(eval $(call kerl_otp_target,$(otp))))
  5003. help::
  5004. $(verbose) printf "%s\n" "" \
  5005. "Continuous Integration targets:" \
  5006. " ci Run '$(MAKE) tests' on all configured Erlang versions." \
  5007. "" \
  5008. "The CI_OTP variable must be defined with the Erlang versions" \
  5009. "that must be tested. For example: CI_OTP = OTP-17.3.4 OTP-17.5.3"
  5010. endif
  5011. # Copyright (c) 2020, Loïc Hoguin <essen@ninenines.eu>
  5012. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5013. ifdef CONCUERROR_TESTS
  5014. .PHONY: concuerror distclean-concuerror
  5015. # Configuration
  5016. CONCUERROR_LOGS_DIR ?= $(CURDIR)/logs
  5017. CONCUERROR_OPTS ?=
  5018. # Core targets.
  5019. check:: concuerror
  5020. ifndef KEEP_LOGS
  5021. distclean:: distclean-concuerror
  5022. endif
  5023. # Plugin-specific targets.
  5024. $(ERLANG_MK_TMP)/Concuerror/bin/concuerror: | $(ERLANG_MK_TMP)
  5025. $(verbose) git clone https://github.com/parapluu/Concuerror $(ERLANG_MK_TMP)/Concuerror
  5026. $(verbose) $(MAKE) -C $(ERLANG_MK_TMP)/Concuerror
  5027. $(CONCUERROR_LOGS_DIR):
  5028. $(verbose) mkdir -p $(CONCUERROR_LOGS_DIR)
  5029. define concuerror_html_report
  5030. <!DOCTYPE html>
  5031. <html lang="en">
  5032. <head>
  5033. <meta charset="utf-8">
  5034. <title>Concuerror HTML report</title>
  5035. </head>
  5036. <body>
  5037. <h1>Concuerror HTML report</h1>
  5038. <p>Generated on $(concuerror_date)</p>
  5039. <ul>
  5040. $(foreach t,$(concuerror_targets),<li><a href="$(t).txt">$(t)</a></li>)
  5041. </ul>
  5042. </body>
  5043. </html>
  5044. endef
  5045. concuerror: $(addprefix concuerror-,$(subst :,-,$(CONCUERROR_TESTS)))
  5046. $(eval concuerror_date := $(shell date))
  5047. $(eval concuerror_targets := $^)
  5048. $(verbose) $(call core_render,concuerror_html_report,$(CONCUERROR_LOGS_DIR)/concuerror.html)
  5049. define concuerror_target
  5050. .PHONY: concuerror-$1-$2
  5051. concuerror-$1-$2: test-build | $(ERLANG_MK_TMP)/Concuerror/bin/concuerror $(CONCUERROR_LOGS_DIR)
  5052. $(ERLANG_MK_TMP)/Concuerror/bin/concuerror \
  5053. --pa $(CURDIR)/ebin --pa $(TEST_DIR) \
  5054. -o $(CONCUERROR_LOGS_DIR)/concuerror-$1-$2.txt \
  5055. $$(CONCUERROR_OPTS) -m $1 -t $2
  5056. endef
  5057. $(foreach test,$(CONCUERROR_TESTS),$(eval $(call concuerror_target,$(firstword $(subst :, ,$(test))),$(lastword $(subst :, ,$(test))))))
  5058. distclean-concuerror:
  5059. $(gen_verbose) rm -rf $(CONCUERROR_LOGS_DIR)
  5060. endif
  5061. # Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
  5062. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5063. .PHONY: ct apps-ct distclean-ct
  5064. # Configuration.
  5065. CT_OPTS ?=
  5066. ifneq ($(wildcard $(TEST_DIR)),)
  5067. ifndef CT_SUITES
  5068. CT_SUITES := $(sort $(subst _SUITE.erl,,$(notdir $(call core_find,$(TEST_DIR)/,*_SUITE.erl))))
  5069. endif
  5070. endif
  5071. CT_SUITES ?=
  5072. CT_LOGS_DIR ?= $(CURDIR)/logs
  5073. # Core targets.
  5074. tests:: ct
  5075. ifndef KEEP_LOGS
  5076. distclean:: distclean-ct
  5077. endif
  5078. help::
  5079. $(verbose) printf "%s\n" "" \
  5080. "Common_test targets:" \
  5081. " ct Run all the common_test suites for this project" \
  5082. "" \
  5083. "All your common_test suites have their associated targets." \
  5084. "A suite named http_SUITE can be ran using the ct-http target."
  5085. # Plugin-specific targets.
  5086. CT_RUN = ct_run \
  5087. -no_auto_compile \
  5088. -noinput \
  5089. -pa $(CURDIR)/ebin $(TEST_DIR) \
  5090. -dir $(TEST_DIR) \
  5091. -logdir $(CT_LOGS_DIR)
  5092. ifeq ($(CT_SUITES),)
  5093. ct: $(if $(IS_APP)$(ROOT_DIR),,apps-ct)
  5094. else
  5095. # We do not run tests if we are in an apps/* with no test directory.
  5096. ifneq ($(IS_APP)$(wildcard $(TEST_DIR)),1)
  5097. ct: test-build $(if $(IS_APP)$(ROOT_DIR),,apps-ct)
  5098. $(verbose) mkdir -p $(CT_LOGS_DIR)
  5099. $(gen_verbose) $(CT_RUN) -sname ct_$(PROJECT) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS)
  5100. endif
  5101. endif
  5102. ifneq ($(ALL_APPS_DIRS),)
  5103. define ct_app_target
  5104. apps-ct-$1: test-build
  5105. $$(MAKE) -C $1 ct IS_APP=1
  5106. endef
  5107. $(foreach app,$(ALL_APPS_DIRS),$(eval $(call ct_app_target,$(app))))
  5108. apps-ct: $(addprefix apps-ct-,$(ALL_APPS_DIRS))
  5109. endif
  5110. ifdef t
  5111. ifeq (,$(findstring :,$t))
  5112. CT_EXTRA = -group $t
  5113. else
  5114. t_words = $(subst :, ,$t)
  5115. CT_EXTRA = -group $(firstword $(t_words)) -case $(lastword $(t_words))
  5116. endif
  5117. else
  5118. ifdef c
  5119. CT_EXTRA = -case $c
  5120. else
  5121. CT_EXTRA =
  5122. endif
  5123. endif
  5124. define ct_suite_target
  5125. ct-$1: test-build
  5126. $$(verbose) mkdir -p $$(CT_LOGS_DIR)
  5127. $$(gen_verbose_esc) $$(CT_RUN) -sname ct_$$(PROJECT) -suite $$(addsuffix _SUITE,$1) $$(CT_EXTRA) $$(CT_OPTS)
  5128. endef
  5129. $(foreach test,$(CT_SUITES),$(eval $(call ct_suite_target,$(test))))
  5130. distclean-ct:
  5131. $(gen_verbose) rm -rf $(CT_LOGS_DIR)
  5132. # Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
  5133. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5134. .PHONY: plt distclean-plt dialyze
  5135. # Configuration.
  5136. DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).plt
  5137. export DIALYZER_PLT
  5138. PLT_APPS ?=
  5139. DIALYZER_DIRS ?= --src -r $(wildcard src) $(ALL_APPS_DIRS)
  5140. DIALYZER_OPTS ?= -Werror_handling -Wunmatched_returns # -Wunderspecs
  5141. DIALYZER_PLT_OPTS ?=
  5142. # Core targets.
  5143. check:: dialyze
  5144. distclean:: distclean-plt
  5145. help::
  5146. $(verbose) printf "%s\n" "" \
  5147. "Dialyzer targets:" \
  5148. " plt Build a PLT file for this project" \
  5149. " dialyze Analyze the project using Dialyzer"
  5150. # Plugin-specific targets.
  5151. define filter_opts.erl
  5152. Opts = init:get_plain_arguments(),
  5153. {Filtered, _} = lists:foldl(fun
  5154. (O, {Os, true}) -> {[O|Os], false};
  5155. (O = "-D", {Os, _}) -> {[O|Os], true};
  5156. (O = [\\$$-, \\$$D, _ | _], {Os, _}) -> {[O|Os], false};
  5157. (O = "-I", {Os, _}) -> {[O|Os], true};
  5158. (O = [\\$$-, \\$$I, _ | _], {Os, _}) -> {[O|Os], false};
  5159. (O = "-pa", {Os, _}) -> {[O|Os], true};
  5160. (_, Acc) -> Acc
  5161. end, {[], false}, Opts),
  5162. io:format("~s~n", [string:join(lists:reverse(Filtered), " ")]),
  5163. halt().
  5164. endef
  5165. # DIALYZER_PLT is a variable understood directly by Dialyzer.
  5166. #
  5167. # We append the path to erts at the end of the PLT. This works
  5168. # because the PLT file is in the external term format and the
  5169. # function binary_to_term/1 ignores any trailing data.
  5170. $(DIALYZER_PLT): deps app
  5171. $(eval DEPS_LOG := $(shell test -f $(ERLANG_MK_TMP)/deps.log && \
  5172. while read p; do test -d $$p/ebin && echo $$p/ebin; done <$(ERLANG_MK_TMP)/deps.log))
  5173. $(verbose) dialyzer --build_plt $(DIALYZER_PLT_OPTS) --apps \
  5174. erts kernel stdlib $(PLT_APPS) $(OTP_DEPS) $(LOCAL_DEPS) $(DEPS_LOG) || test $$? -eq 2
  5175. $(verbose) $(ERL) -eval 'io:format("~n~s~n", [code:lib_dir(erts)]), halt().' >> $@
  5176. plt: $(DIALYZER_PLT)
  5177. distclean-plt:
  5178. $(gen_verbose) rm -f $(DIALYZER_PLT)
  5179. ifneq ($(wildcard $(DIALYZER_PLT)),)
  5180. dialyze: $(if $(filter --src,$(DIALYZER_DIRS)),,deps app)
  5181. $(verbose) if ! tail -n1 $(DIALYZER_PLT) | \
  5182. grep -q "^`$(ERL) -eval 'io:format("~s", [code:lib_dir(erts)]), halt().'`$$"; then \
  5183. rm $(DIALYZER_PLT); \
  5184. $(MAKE) plt; \
  5185. fi
  5186. else
  5187. dialyze: $(DIALYZER_PLT)
  5188. endif
  5189. $(verbose) dialyzer `$(ERL) \
  5190. -eval "$(subst $(newline),,$(call escape_dquotes,$(call filter_opts.erl)))" \
  5191. -extra $(ERLC_OPTS)` $(DIALYZER_DIRS) $(DIALYZER_OPTS) $(if $(wildcard ebin/),-pa ebin/)
  5192. # Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
  5193. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5194. .PHONY: distclean-edoc edoc
  5195. # Configuration.
  5196. EDOC_OPTS ?=
  5197. EDOC_SRC_DIRS ?=
  5198. EDOC_OUTPUT ?= doc
  5199. define edoc.erl
  5200. SrcPaths = lists:foldl(fun(P, Acc) ->
  5201. filelib:wildcard(atom_to_list(P) ++ "/{src,c_src}")
  5202. ++ lists:filter(fun(D) ->
  5203. filelib:is_dir(D)
  5204. end, filelib:wildcard(atom_to_list(P) ++ "/{src,c_src}/**"))
  5205. ++ Acc
  5206. end, [], [$(call comma_list,$(patsubst %,'%',$(call core_native_path,$(EDOC_SRC_DIRS))))]),
  5207. DefaultOpts = [{dir, "$(EDOC_OUTPUT)"}, {source_path, SrcPaths}, {subpackages, false}],
  5208. edoc:application($(1), ".", [$(2)] ++ DefaultOpts),
  5209. halt(0).
  5210. endef
  5211. # Core targets.
  5212. ifneq ($(strip $(EDOC_SRC_DIRS)$(wildcard doc/overview.edoc)),)
  5213. docs:: edoc
  5214. endif
  5215. distclean:: distclean-edoc
  5216. # Plugin-specific targets.
  5217. edoc: distclean-edoc doc-deps
  5218. $(gen_verbose) $(call erlang,$(call edoc.erl,$(PROJECT),$(EDOC_OPTS)))
  5219. distclean-edoc:
  5220. $(gen_verbose) rm -f $(EDOC_OUTPUT)/*.css $(EDOC_OUTPUT)/*.html $(EDOC_OUTPUT)/*.png $(EDOC_OUTPUT)/edoc-info
  5221. # Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
  5222. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5223. # Configuration.
  5224. DTL_FULL_PATH ?=
  5225. DTL_PATH ?= templates/
  5226. DTL_PREFIX ?=
  5227. DTL_SUFFIX ?= _dtl
  5228. DTL_OPTS ?=
  5229. # Verbosity.
  5230. dtl_verbose_0 = @echo " DTL " $(filter %.dtl,$(?F));
  5231. dtl_verbose = $(dtl_verbose_$(V))
  5232. # Core targets.
  5233. DTL_PATH := $(abspath $(DTL_PATH))
  5234. DTL_FILES := $(sort $(call core_find,$(DTL_PATH),*.dtl))
  5235. ifneq ($(DTL_FILES),)
  5236. DTL_NAMES = $(addprefix $(DTL_PREFIX),$(addsuffix $(DTL_SUFFIX),$(DTL_FILES:$(DTL_PATH)/%.dtl=%)))
  5237. DTL_MODULES = $(if $(DTL_FULL_PATH),$(subst /,_,$(DTL_NAMES)),$(notdir $(DTL_NAMES)))
  5238. BEAM_FILES += $(addsuffix .beam,$(addprefix ebin/,$(DTL_MODULES)))
  5239. ifneq ($(words $(DTL_FILES)),0)
  5240. # Rebuild templates when the Makefile changes.
  5241. $(ERLANG_MK_TMP)/last-makefile-change-erlydtl: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)
  5242. $(verbose) if test -f $@; then \
  5243. touch $(DTL_FILES); \
  5244. fi
  5245. $(verbose) touch $@
  5246. ebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-change-erlydtl
  5247. endif
  5248. define erlydtl_compile.erl
  5249. [begin
  5250. Module0 = case "$(strip $(DTL_FULL_PATH))" of
  5251. "" ->
  5252. filename:basename(F, ".dtl");
  5253. _ ->
  5254. "$(call core_native_path,$(DTL_PATH))/" ++ F2 = filename:rootname(F, ".dtl"),
  5255. re:replace(F2, "/", "_", [{return, list}, global])
  5256. end,
  5257. Module = list_to_atom("$(DTL_PREFIX)" ++ string:to_lower(Module0) ++ "$(DTL_SUFFIX)"),
  5258. case erlydtl:compile(F, Module, [$(DTL_OPTS)] ++ [{out_dir, "ebin/"}, return_errors]) of
  5259. ok -> ok;
  5260. {ok, _} -> ok
  5261. end
  5262. end || F <- string:tokens("$(1)", " ")],
  5263. halt().
  5264. endef
  5265. ebin/$(PROJECT).app:: $(DTL_FILES) | ebin/
  5266. $(if $(strip $?),\
  5267. $(dtl_verbose) $(call erlang,$(call erlydtl_compile.erl,$(call core_native_path,$?)),\
  5268. -pa ebin/))
  5269. endif
  5270. # Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu>
  5271. # Copyright (c) 2014, Dave Cottlehuber <dch@skunkwerks.at>
  5272. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5273. .PHONY: distclean-escript escript escript-zip
  5274. # Configuration.
  5275. ESCRIPT_NAME ?= $(PROJECT)
  5276. ESCRIPT_FILE ?= $(ESCRIPT_NAME)
  5277. ESCRIPT_SHEBANG ?= /usr/bin/env escript
  5278. ESCRIPT_COMMENT ?= This is an -*- erlang -*- file
  5279. ESCRIPT_EMU_ARGS ?= -escript main $(ESCRIPT_NAME)
  5280. ESCRIPT_ZIP ?= 7z a -tzip -mx=9 -mtc=off $(if $(filter-out 0,$(V)),,> /dev/null)
  5281. ESCRIPT_ZIP_FILE ?= $(ERLANG_MK_TMP)/escript.zip
  5282. # Core targets.
  5283. distclean:: distclean-escript
  5284. help::
  5285. $(verbose) printf "%s\n" "" \
  5286. "Escript targets:" \
  5287. " escript Build an executable escript archive" \
  5288. # Plugin-specific targets.
  5289. escript-zip:: FULL=1
  5290. escript-zip:: deps app
  5291. $(verbose) mkdir -p $(dir $(abspath $(ESCRIPT_ZIP_FILE)))
  5292. $(verbose) rm -f $(abspath $(ESCRIPT_ZIP_FILE))
  5293. $(gen_verbose) cd .. && $(ESCRIPT_ZIP) $(abspath $(ESCRIPT_ZIP_FILE)) $(PROJECT)/ebin/*
  5294. ifneq ($(DEPS),)
  5295. $(verbose) cd $(DEPS_DIR) && $(ESCRIPT_ZIP) $(abspath $(ESCRIPT_ZIP_FILE)) \
  5296. $(subst $(DEPS_DIR)/,,$(addsuffix /*,$(wildcard \
  5297. $(addsuffix /ebin,$(shell cat $(ERLANG_MK_TMP)/deps.log)))))
  5298. endif
  5299. escript:: escript-zip
  5300. $(gen_verbose) printf "%s\n" \
  5301. "#!$(ESCRIPT_SHEBANG)" \
  5302. "%% $(ESCRIPT_COMMENT)" \
  5303. "%%! $(ESCRIPT_EMU_ARGS)" > $(ESCRIPT_FILE)
  5304. $(verbose) cat $(abspath $(ESCRIPT_ZIP_FILE)) >> $(ESCRIPT_FILE)
  5305. $(verbose) chmod +x $(ESCRIPT_FILE)
  5306. distclean-escript:
  5307. $(gen_verbose) rm -f $(ESCRIPT_FILE) $(abspath $(ESCRIPT_ZIP_FILE))
  5308. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  5309. # Copyright (c) 2014, Enrique Fernandez <enrique.fernandez@erlang-solutions.com>
  5310. # This file is contributed to erlang.mk and subject to the terms of the ISC License.
  5311. .PHONY: eunit apps-eunit
  5312. # Configuration
  5313. EUNIT_OPTS ?=
  5314. EUNIT_ERL_OPTS ?=
  5315. EUNIT_TEST_SPEC ?= $1
  5316. # Core targets.
  5317. tests:: eunit
  5318. help::
  5319. $(verbose) printf "%s\n" "" \
  5320. "EUnit targets:" \
  5321. " eunit Run all the EUnit tests for this project"
  5322. # Plugin-specific targets.
  5323. define eunit.erl
  5324. $(call cover.erl)
  5325. CoverSetup(),
  5326. case eunit:test($(call EUNIT_TEST_SPEC,$1), [$(EUNIT_OPTS)]) of
  5327. ok -> ok;
  5328. error -> halt(2)
  5329. end,
  5330. CoverExport("$(call core_native_path,$(COVER_DATA_DIR))/eunit.coverdata"),
  5331. halt()
  5332. endef
  5333. EUNIT_ERL_OPTS += -pa $(TEST_DIR) $(CURDIR)/ebin
  5334. ifdef t
  5335. ifeq (,$(findstring :,$(t)))
  5336. eunit: test-build cover-data-dir
  5337. $(gen_verbose) $(call erlang,$(call eunit.erl,['$(t)']),$(EUNIT_ERL_OPTS))
  5338. else
  5339. eunit: test-build cover-data-dir
  5340. $(gen_verbose) $(call erlang,$(call eunit.erl,fun $(t)/0),$(EUNIT_ERL_OPTS))
  5341. endif
  5342. else
  5343. EUNIT_EBIN_MODS = $(notdir $(basename $(ERL_FILES) $(BEAM_FILES)))
  5344. EUNIT_TEST_MODS = $(notdir $(basename $(call core_find,$(TEST_DIR)/,*.erl)))
  5345. EUNIT_MODS = $(foreach mod,$(EUNIT_EBIN_MODS) $(filter-out \
  5346. $(patsubst %,%_tests,$(EUNIT_EBIN_MODS)),$(EUNIT_TEST_MODS)),'$(mod)')
  5347. eunit: test-build $(if $(IS_APP)$(ROOT_DIR),,apps-eunit) cover-data-dir
  5348. ifneq ($(wildcard src/ $(TEST_DIR)),)
  5349. $(gen_verbose) $(call erlang,$(call eunit.erl,[$(call comma_list,$(EUNIT_MODS))]),$(EUNIT_ERL_OPTS))
  5350. endif
  5351. ifneq ($(ALL_APPS_DIRS),)
  5352. apps-eunit: test-build
  5353. $(verbose) eunit_retcode=0 ; for app in $(ALL_APPS_DIRS); do $(MAKE) -C $$app eunit IS_APP=1; \
  5354. [ $$? -ne 0 ] && eunit_retcode=1 ; done ; \
  5355. exit $$eunit_retcode
  5356. endif
  5357. endif
  5358. # Copyright (c) 2020, Loïc Hoguin <essen@ninenines.eu>
  5359. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5360. HEX_CORE_GIT ?= https://github.com/hexpm/hex_core
  5361. HEX_CORE_COMMIT ?= v0.7.0
  5362. PACKAGES += hex_core
  5363. pkg_hex_core_name = hex_core
  5364. pkg_hex_core_description = Reference implementation of Hex specifications
  5365. pkg_hex_core_homepage = $(HEX_CORE_GIT)
  5366. pkg_hex_core_fetch = git
  5367. pkg_hex_core_repo = $(HEX_CORE_GIT)
  5368. pkg_hex_core_commit = $(HEX_CORE_COMMIT)
  5369. # We automatically depend on hex_core when the project isn't already.
  5370. $(if $(filter hex_core,$(DEPS) $(BUILD_DEPS) $(DOC_DEPS) $(REL_DEPS) $(TEST_DEPS)),,\
  5371. $(eval $(call dep_target,hex_core)))
  5372. hex-core: $(DEPS_DIR)/hex_core
  5373. $(verbose) if [ ! -e $(DEPS_DIR)/hex_core/ebin/dep_built ]; then \
  5374. $(MAKE) -C $(DEPS_DIR)/hex_core IS_DEP=1; \
  5375. touch $(DEPS_DIR)/hex_core/ebin/dep_built; \
  5376. fi
  5377. # @todo This must also apply to fetching.
  5378. HEX_CONFIG ?=
  5379. define hex_config.erl
  5380. begin
  5381. Config0 = hex_core:default_config(),
  5382. Config0$(HEX_CONFIG)
  5383. end
  5384. endef
  5385. define hex_user_create.erl
  5386. {ok, _} = application:ensure_all_started(ssl),
  5387. {ok, _} = application:ensure_all_started(inets),
  5388. Config = $(hex_config.erl),
  5389. case hex_api_user:create(Config, <<"$(strip $1)">>, <<"$(strip $2)">>, <<"$(strip $3)">>) of
  5390. {ok, {201, _, #{<<"email">> := Email, <<"url">> := URL, <<"username">> := Username}}} ->
  5391. io:format("User ~s (~s) created at ~s~n"
  5392. "Please check your inbox for a confirmation email.~n"
  5393. "You must confirm before you are allowed to publish packages.~n",
  5394. [Username, Email, URL]),
  5395. halt(0);
  5396. {ok, {Status, _, Errors}} ->
  5397. io:format("Error ~b: ~0p~n", [Status, Errors]),
  5398. halt(80)
  5399. end
  5400. endef
  5401. # The $(info ) call inserts a new line after the password prompt.
  5402. hex-user-create: hex-core
  5403. $(if $(HEX_USERNAME),,$(eval HEX_USERNAME := $(shell read -p "Username: " username; echo $$username)))
  5404. $(if $(HEX_PASSWORD),,$(eval HEX_PASSWORD := $(shell stty -echo; read -p "Password: " password; stty echo; echo $$password) $(info )))
  5405. $(if $(HEX_EMAIL),,$(eval HEX_EMAIL := $(shell read -p "Email: " email; echo $$email)))
  5406. $(gen_verbose) $(call erlang,$(call hex_user_create.erl,$(HEX_USERNAME),$(HEX_PASSWORD),$(HEX_EMAIL)))
  5407. define hex_key_add.erl
  5408. {ok, _} = application:ensure_all_started(ssl),
  5409. {ok, _} = application:ensure_all_started(inets),
  5410. Config = $(hex_config.erl),
  5411. ConfigF = Config#{api_key => iolist_to_binary([<<"Basic ">>, base64:encode(<<"$(strip $1):$(strip $2)">>)])},
  5412. Permissions = [
  5413. case string:split(P, <<":">>) of
  5414. [D] -> #{domain => D};
  5415. [D, R] -> #{domain => D, resource => R}
  5416. end
  5417. || P <- string:split(<<"$(strip $4)">>, <<",">>, all)],
  5418. case hex_api_key:add(ConfigF, <<"$(strip $3)">>, Permissions) of
  5419. {ok, {201, _, #{<<"secret">> := Secret}}} ->
  5420. io:format("Key ~s created for user ~s~nSecret: ~s~n"
  5421. "Please store the secret in a secure location, such as a password store.~n"
  5422. "The secret will be requested for most Hex-related operations.~n",
  5423. [<<"$(strip $3)">>, <<"$(strip $1)">>, Secret]),
  5424. halt(0);
  5425. {ok, {Status, _, Errors}} ->
  5426. io:format("Error ~b: ~0p~n", [Status, Errors]),
  5427. halt(81)
  5428. end
  5429. endef
  5430. hex-key-add: hex-core
  5431. $(if $(HEX_USERNAME),,$(eval HEX_USERNAME := $(shell read -p "Username: " username; echo $$username)))
  5432. $(if $(HEX_PASSWORD),,$(eval HEX_PASSWORD := $(shell stty -echo; read -p "Password: " password; stty echo; echo $$password) $(info )))
  5433. $(gen_verbose) $(call erlang,$(call hex_key_add.erl,$(HEX_USERNAME),$(HEX_PASSWORD),\
  5434. $(if $(name),$(name),$(shell hostname)-erlang-mk),\
  5435. $(if $(perm),$(perm),api)))
  5436. HEX_TARBALL_EXTRA_METADATA ?=
  5437. # @todo Check that we can += files
  5438. HEX_TARBALL_FILES ?= \
  5439. $(wildcard early-plugins.mk) \
  5440. $(wildcard ebin/$(PROJECT).app) \
  5441. $(wildcard ebin/$(PROJECT).appup) \
  5442. $(wildcard $(notdir $(ERLANG_MK_FILENAME))) \
  5443. $(sort $(call core_find,include/,*.hrl)) \
  5444. $(wildcard LICENSE*) \
  5445. $(wildcard Makefile) \
  5446. $(wildcard plugins.mk) \
  5447. $(sort $(call core_find,priv/,*)) \
  5448. $(wildcard README*) \
  5449. $(wildcard rebar.config) \
  5450. $(sort $(call core_find,src/,*))
  5451. HEX_TARBALL_OUTPUT_FILE ?= $(ERLANG_MK_TMP)/$(PROJECT).tar
  5452. # @todo Need to check for rebar.config and/or the absence of DEPS to know
  5453. # whether a project will work with Rebar.
  5454. #
  5455. # @todo contributors licenses links in HEX_TARBALL_EXTRA_METADATA
  5456. # In order to build the requirements metadata we look into DEPS.
  5457. # We do not require that the project use Hex dependencies, however
  5458. # Hex.pm does require that the package name and version numbers
  5459. # correspond to a real Hex package.
  5460. define hex_tarball_create.erl
  5461. Files0 = [$(call comma_list,$(patsubst %,"%",$(HEX_TARBALL_FILES)))],
  5462. Requirements0 = #{
  5463. $(foreach d,$(DEPS),
  5464. <<"$(if $(subst hex,,$(call query_fetch_method,$d)),$d,$(if $(word 3,$(dep_$d)),$(word 3,$(dep_$d)),$d))">> => #{
  5465. <<"app">> => <<"$d">>,
  5466. <<"optional">> => false,
  5467. <<"requirement">> => <<"$(call query_version,$d)">>
  5468. },)
  5469. $(if $(DEPS),dummy => dummy)
  5470. },
  5471. Requirements = maps:remove(dummy, Requirements0),
  5472. Metadata0 = #{
  5473. app => <<"$(strip $(PROJECT))">>,
  5474. build_tools => [<<"make">>, <<"rebar3">>],
  5475. description => <<"$(strip $(PROJECT_DESCRIPTION))">>,
  5476. files => [unicode:characters_to_binary(F) || F <- Files0],
  5477. name => <<"$(strip $(PROJECT))">>,
  5478. requirements => Requirements,
  5479. version => <<"$(strip $(PROJECT_VERSION))">>
  5480. },
  5481. Metadata = Metadata0$(HEX_TARBALL_EXTRA_METADATA),
  5482. Files = [case file:read_file(F) of
  5483. {ok, Bin} ->
  5484. {F, Bin};
  5485. {error, Reason} ->
  5486. io:format("Error trying to open file ~0p: ~0p~n", [F, Reason]),
  5487. halt(82)
  5488. end || F <- Files0],
  5489. case hex_tarball:create(Metadata, Files) of
  5490. {ok, #{tarball := Tarball}} ->
  5491. ok = file:write_file("$(strip $(HEX_TARBALL_OUTPUT_FILE))", Tarball),
  5492. halt(0);
  5493. {error, Reason} ->
  5494. io:format("Error ~0p~n", [Reason]),
  5495. halt(83)
  5496. end
  5497. endef
  5498. hex_tar_verbose_0 = @echo " TAR $(notdir $(ERLANG_MK_TMP))/$(@F)";
  5499. hex_tar_verbose_2 = set -x;
  5500. hex_tar_verbose = $(hex_tar_verbose_$(V))
  5501. $(HEX_TARBALL_OUTPUT_FILE): hex-core app
  5502. $(hex_tar_verbose) $(call erlang,$(call hex_tarball_create.erl))
  5503. hex-tarball-create: $(HEX_TARBALL_OUTPUT_FILE)
  5504. define hex_release_publish_summary.erl
  5505. {ok, Tarball} = erl_tar:open("$(strip $(HEX_TARBALL_OUTPUT_FILE))", [read]),
  5506. ok = erl_tar:extract(Tarball, [{cwd, "$(ERLANG_MK_TMP)"}, {files, ["metadata.config"]}]),
  5507. {ok, Metadata} = file:consult("$(ERLANG_MK_TMP)/metadata.config"),
  5508. #{
  5509. <<"name">> := Name,
  5510. <<"version">> := Version,
  5511. <<"files">> := Files,
  5512. <<"requirements">> := Deps
  5513. } = maps:from_list(Metadata),
  5514. io:format("Publishing ~s ~s~n Dependencies:~n", [Name, Version]),
  5515. case Deps of
  5516. [] ->
  5517. io:format(" (none)~n");
  5518. _ ->
  5519. [begin
  5520. #{<<"app">> := DA, <<"requirement">> := DR} = maps:from_list(D),
  5521. io:format(" ~s ~s~n", [DA, DR])
  5522. end || {_, D} <- Deps]
  5523. end,
  5524. io:format(" Included files:~n"),
  5525. [io:format(" ~s~n", [F]) || F <- Files],
  5526. io:format("You may also review the contents of the tarball file.~n"
  5527. "Please enter your secret key to proceed.~n"),
  5528. halt(0)
  5529. endef
  5530. define hex_release_publish.erl
  5531. {ok, _} = application:ensure_all_started(ssl),
  5532. {ok, _} = application:ensure_all_started(inets),
  5533. Config = $(hex_config.erl),
  5534. ConfigF = Config#{api_key => <<"$(strip $1)">>},
  5535. {ok, Tarball} = file:read_file("$(strip $(HEX_TARBALL_OUTPUT_FILE))"),
  5536. case hex_api_release:publish(ConfigF, Tarball, [{replace, $2}]) of
  5537. {ok, {200, _, #{}}} ->
  5538. io:format("Release replaced~n"),
  5539. halt(0);
  5540. {ok, {201, _, #{}}} ->
  5541. io:format("Release published~n"),
  5542. halt(0);
  5543. {ok, {Status, _, Errors}} ->
  5544. io:format("Error ~b: ~0p~n", [Status, Errors]),
  5545. halt(84)
  5546. end
  5547. endef
  5548. hex-release-tarball: hex-core $(HEX_TARBALL_OUTPUT_FILE)
  5549. $(verbose) $(call erlang,$(call hex_release_publish_summary.erl))
  5550. hex-release-publish: hex-core hex-release-tarball
  5551. $(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))
  5552. $(gen_verbose) $(call erlang,$(call hex_release_publish.erl,$(HEX_SECRET),false))
  5553. hex-release-replace: hex-core hex-release-tarball
  5554. $(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))
  5555. $(gen_verbose) $(call erlang,$(call hex_release_publish.erl,$(HEX_SECRET),true))
  5556. define hex_release_delete.erl
  5557. {ok, _} = application:ensure_all_started(ssl),
  5558. {ok, _} = application:ensure_all_started(inets),
  5559. Config = $(hex_config.erl),
  5560. ConfigF = Config#{api_key => <<"$(strip $1)">>},
  5561. case hex_api_release:delete(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $(PROJECT_VERSION))">>) of
  5562. {ok, {204, _, _}} ->
  5563. io:format("Release $(strip $(PROJECT_VERSION)) deleted~n"),
  5564. halt(0);
  5565. {ok, {Status, _, Errors}} ->
  5566. io:format("Error ~b: ~0p~n", [Status, Errors]),
  5567. halt(85)
  5568. end
  5569. endef
  5570. hex-release-delete: hex-core
  5571. $(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))
  5572. $(gen_verbose) $(call erlang,$(call hex_release_delete.erl,$(HEX_SECRET)))
  5573. define hex_release_retire.erl
  5574. {ok, _} = application:ensure_all_started(ssl),
  5575. {ok, _} = application:ensure_all_started(inets),
  5576. Config = $(hex_config.erl),
  5577. ConfigF = Config#{api_key => <<"$(strip $1)">>},
  5578. Params = #{<<"reason">> => <<"$(strip $3)">>, <<"message">> => <<"$(strip $4)">>},
  5579. case hex_api_release:retire(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $2)">>, Params) of
  5580. {ok, {204, _, _}} ->
  5581. io:format("Release $(strip $2) has been retired~n"),
  5582. halt(0);
  5583. {ok, {Status, _, Errors}} ->
  5584. io:format("Error ~b: ~0p~n", [Status, Errors]),
  5585. halt(86)
  5586. end
  5587. endef
  5588. hex-release-retire: hex-core
  5589. $(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))
  5590. $(gen_verbose) $(call erlang,$(call hex_release_retire.erl,$(HEX_SECRET),\
  5591. $(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION)),\
  5592. $(if $(HEX_REASON),$(HEX_REASON),invalid),\
  5593. $(HEX_MESSAGE)))
  5594. define hex_release_unretire.erl
  5595. {ok, _} = application:ensure_all_started(ssl),
  5596. {ok, _} = application:ensure_all_started(inets),
  5597. Config = $(hex_config.erl),
  5598. ConfigF = Config#{api_key => <<"$(strip $1)">>},
  5599. case hex_api_release:unretire(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $2)">>) of
  5600. {ok, {204, _, _}} ->
  5601. io:format("Release $(strip $2) is not retired anymore~n"),
  5602. halt(0);
  5603. {ok, {Status, _, Errors}} ->
  5604. io:format("Error ~b: ~0p~n", [Status, Errors]),
  5605. halt(87)
  5606. end
  5607. endef
  5608. hex-release-unretire: hex-core
  5609. $(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))
  5610. $(gen_verbose) $(call erlang,$(call hex_release_unretire.erl,$(HEX_SECRET),\
  5611. $(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION))))
  5612. HEX_DOCS_DOC_DIR ?= doc/
  5613. HEX_DOCS_TARBALL_FILES ?= $(sort $(call core_find,$(HEX_DOCS_DOC_DIR),*))
  5614. HEX_DOCS_TARBALL_OUTPUT_FILE ?= $(ERLANG_MK_TMP)/$(PROJECT)-docs.tar.gz
  5615. $(HEX_DOCS_TARBALL_OUTPUT_FILE): hex-core app docs
  5616. $(hex_tar_verbose) tar czf $(HEX_DOCS_TARBALL_OUTPUT_FILE) -C $(HEX_DOCS_DOC_DIR) \
  5617. $(HEX_DOCS_TARBALL_FILES:$(HEX_DOCS_DOC_DIR)%=%)
  5618. hex-docs-tarball-create: $(HEX_DOCS_TARBALL_OUTPUT_FILE)
  5619. define hex_docs_publish.erl
  5620. {ok, _} = application:ensure_all_started(ssl),
  5621. {ok, _} = application:ensure_all_started(inets),
  5622. Config = $(hex_config.erl),
  5623. ConfigF = Config#{api_key => <<"$(strip $1)">>},
  5624. {ok, Tarball} = file:read_file("$(strip $(HEX_DOCS_TARBALL_OUTPUT_FILE))"),
  5625. case hex_api:post(ConfigF,
  5626. ["packages", "$(strip $(PROJECT))", "releases", "$(strip $(PROJECT_VERSION))", "docs"],
  5627. {"application/octet-stream", Tarball}) of
  5628. {ok, {Status, _, _}} when Status >= 200, Status < 300 ->
  5629. io:format("Docs published~n"),
  5630. halt(0);
  5631. {ok, {Status, _, Errors}} ->
  5632. io:format("Error ~b: ~0p~n", [Status, Errors]),
  5633. halt(88)
  5634. end
  5635. endef
  5636. hex-docs-publish: hex-core hex-docs-tarball-create
  5637. $(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))
  5638. $(gen_verbose) $(call erlang,$(call hex_docs_publish.erl,$(HEX_SECRET)))
  5639. define hex_docs_delete.erl
  5640. {ok, _} = application:ensure_all_started(ssl),
  5641. {ok, _} = application:ensure_all_started(inets),
  5642. Config = $(hex_config.erl),
  5643. ConfigF = Config#{api_key => <<"$(strip $1)">>},
  5644. case hex_api:delete(ConfigF,
  5645. ["packages", "$(strip $(PROJECT))", "releases", "$(strip $2)", "docs"]) of
  5646. {ok, {Status, _, _}} when Status >= 200, Status < 300 ->
  5647. io:format("Docs removed~n"),
  5648. halt(0);
  5649. {ok, {Status, _, Errors}} ->
  5650. io:format("Error ~b: ~0p~n", [Status, Errors]),
  5651. halt(89)
  5652. end
  5653. endef
  5654. hex-docs-delete: hex-core
  5655. $(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))
  5656. $(gen_verbose) $(call erlang,$(call hex_docs_delete.erl,$(HEX_SECRET),\
  5657. $(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION))))
  5658. # Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu>
  5659. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5660. ifeq ($(filter proper,$(DEPS) $(TEST_DEPS)),proper)
  5661. .PHONY: proper
  5662. # Targets.
  5663. tests:: proper
  5664. define proper_check.erl
  5665. $(call cover.erl)
  5666. code:add_pathsa([
  5667. "$(call core_native_path,$(CURDIR)/ebin)",
  5668. "$(call core_native_path,$(DEPS_DIR)/*/ebin)",
  5669. "$(call core_native_path,$(TEST_DIR))"]),
  5670. Module = fun(M) ->
  5671. [true] =:= lists:usort([
  5672. case atom_to_list(F) of
  5673. "prop_" ++ _ ->
  5674. io:format("Testing ~p:~p/0~n", [M, F]),
  5675. proper:quickcheck(M:F(), nocolors);
  5676. _ ->
  5677. true
  5678. end
  5679. || {F, 0} <- M:module_info(exports)])
  5680. end,
  5681. try begin
  5682. CoverSetup(),
  5683. Res = case $(1) of
  5684. all -> [true] =:= lists:usort([Module(M) || M <- [$(call comma_list,$(3))]]);
  5685. module -> Module($(2));
  5686. function -> proper:quickcheck($(2), nocolors)
  5687. end,
  5688. CoverExport("$(COVER_DATA_DIR)/proper.coverdata"),
  5689. Res
  5690. end of
  5691. true -> halt(0);
  5692. _ -> halt(1)
  5693. catch error:undef$(if $V,:Stacktrace) ->
  5694. io:format("Undefined property or module?~n$(if $V,~p~n)", [$(if $V,Stacktrace)]),
  5695. halt(0)
  5696. end.
  5697. endef
  5698. ifdef t
  5699. ifeq (,$(findstring :,$(t)))
  5700. proper: test-build cover-data-dir
  5701. $(verbose) $(call erlang,$(call proper_check.erl,module,$(t)))
  5702. else
  5703. proper: test-build cover-data-dir
  5704. $(verbose) echo Testing $(t)/0
  5705. $(verbose) $(call erlang,$(call proper_check.erl,function,$(t)()))
  5706. endif
  5707. else
  5708. proper: test-build cover-data-dir
  5709. $(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
  5710. $(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))
  5711. $(gen_verbose) $(call erlang,$(call proper_check.erl,all,undefined,$(MODULES)))
  5712. endif
  5713. endif
  5714. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  5715. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5716. # Verbosity.
  5717. proto_verbose_0 = @echo " PROTO " $(filter %.proto,$(?F));
  5718. proto_verbose = $(proto_verbose_$(V))
  5719. # Core targets.
  5720. ifneq ($(wildcard src/),)
  5721. ifneq ($(filter gpb protobuffs,$(BUILD_DEPS) $(DEPS)),)
  5722. PROTO_FILES := $(filter %.proto,$(ALL_SRC_FILES))
  5723. ERL_FILES += $(addprefix src/,$(patsubst %.proto,%_pb.erl,$(notdir $(PROTO_FILES))))
  5724. ifeq ($(PROTO_FILES),)
  5725. $(ERLANG_MK_TMP)/last-makefile-change-protobuffs:
  5726. $(verbose) :
  5727. else
  5728. # Rebuild proto files when the Makefile changes.
  5729. # We exclude $(PROJECT).d to avoid a circular dependency.
  5730. $(ERLANG_MK_TMP)/last-makefile-change-protobuffs: $(filter-out $(PROJECT).d,$(MAKEFILE_LIST)) | $(ERLANG_MK_TMP)
  5731. $(verbose) if test -f $@; then \
  5732. touch $(PROTO_FILES); \
  5733. fi
  5734. $(verbose) touch $@
  5735. $(PROJECT).d:: $(ERLANG_MK_TMP)/last-makefile-change-protobuffs
  5736. endif
  5737. ifeq ($(filter gpb,$(BUILD_DEPS) $(DEPS)),)
  5738. define compile_proto.erl
  5739. [begin
  5740. protobuffs_compile:generate_source(F, [
  5741. {output_include_dir, "./include"},
  5742. {output_src_dir, "./src"}])
  5743. end || F <- string:tokens("$1", " ")],
  5744. halt().
  5745. endef
  5746. else
  5747. define compile_proto.erl
  5748. [begin
  5749. gpb_compile:file(F, [
  5750. $(foreach i,$(sort $(dir $(PROTO_FILES))),{i$(comma) "$i"}$(comma))
  5751. {include_as_lib, true},
  5752. {module_name_suffix, "_pb"},
  5753. {o_hrl, "./include"},
  5754. {o_erl, "./src"},
  5755. {use_packages, true}
  5756. ])
  5757. end || F <- string:tokens("$1", " ")],
  5758. halt().
  5759. endef
  5760. endif
  5761. ifneq ($(PROTO_FILES),)
  5762. $(PROJECT).d:: $(PROTO_FILES)
  5763. $(verbose) mkdir -p ebin/ include/
  5764. $(if $(strip $?),$(proto_verbose) $(call erlang,$(call compile_proto.erl,$?)))
  5765. endif
  5766. endif
  5767. endif
  5768. # Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
  5769. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5770. ifeq ($(filter relx,$(BUILD_DEPS) $(DEPS) $(REL_DEPS)),relx)
  5771. .PHONY: relx-rel relx-relup distclean-relx-rel run
  5772. # Configuration.
  5773. RELX_CONFIG ?= $(CURDIR)/relx.config
  5774. RELX_CONFIG_SCRIPT ?= $(CURDIR)/relx.config.script
  5775. RELX_OUTPUT_DIR ?= _rel
  5776. RELX_REL_EXT ?=
  5777. RELX_TAR ?= 1
  5778. ifdef SFX
  5779. RELX_TAR = 1
  5780. endif
  5781. # Core targets.
  5782. ifeq ($(IS_DEP),)
  5783. ifneq ($(wildcard $(RELX_CONFIG))$(wildcard $(RELX_CONFIG_SCRIPT)),)
  5784. rel:: relx-rel
  5785. relup:: relx-relup
  5786. endif
  5787. endif
  5788. distclean:: distclean-relx-rel
  5789. # Plugin-specific targets.
  5790. define relx_get_config.erl
  5791. (fun() ->
  5792. Config0 =
  5793. case file:consult("$(call core_native_path,$(RELX_CONFIG))") of
  5794. {ok, Terms} ->
  5795. Terms;
  5796. {error, _} ->
  5797. []
  5798. end,
  5799. case filelib:is_file("$(call core_native_path,$(RELX_CONFIG_SCRIPT))") of
  5800. true ->
  5801. Bindings = erl_eval:add_binding('CONFIG', Config0, erl_eval:new_bindings()),
  5802. {ok, Config1} = file:script("$(call core_native_path,$(RELX_CONFIG_SCRIPT))", Bindings),
  5803. Config1;
  5804. false ->
  5805. Config0
  5806. end
  5807. end)()
  5808. endef
  5809. define relx_release.erl
  5810. Config = $(call relx_get_config.erl),
  5811. {release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),
  5812. Vsn = case Vsn0 of
  5813. {cmd, Cmd} -> os:cmd(Cmd);
  5814. semver -> "";
  5815. {semver, _} -> "";
  5816. {git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");
  5817. {git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");
  5818. VsnStr -> Vsn0
  5819. end,
  5820. {ok, _} = relx:build_release(#{name => Name, vsn => Vsn}, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),
  5821. halt(0).
  5822. endef
  5823. define relx_tar.erl
  5824. Config = $(call relx_get_config.erl),
  5825. {release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),
  5826. Vsn = case Vsn0 of
  5827. {cmd, Cmd} -> os:cmd(Cmd);
  5828. semver -> "";
  5829. {semver, _} -> "";
  5830. {git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");
  5831. {git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");
  5832. VsnStr -> Vsn0
  5833. end,
  5834. {ok, _} = relx:build_tar(#{name => Name, vsn => Vsn}, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),
  5835. halt(0).
  5836. endef
  5837. define relx_relup.erl
  5838. Config = $(call relx_get_config.erl),
  5839. {release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),
  5840. Vsn = case Vsn0 of
  5841. {cmd, Cmd} -> os:cmd(Cmd);
  5842. semver -> "";
  5843. {semver, _} -> "";
  5844. {git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");
  5845. {git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");
  5846. VsnStr -> Vsn0
  5847. end,
  5848. {ok, _} = relx:build_relup(Name, Vsn, undefined, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),
  5849. halt(0).
  5850. endef
  5851. relx-rel: rel-deps app
  5852. $(call erlang,$(call relx_release.erl),-pa ebin/)
  5853. $(verbose) $(MAKE) relx-post-rel
  5854. ifeq ($(RELX_TAR),1)
  5855. $(call erlang,$(call relx_tar.erl),-pa ebin/)
  5856. endif
  5857. relx-relup: rel-deps app
  5858. $(call erlang,$(call relx_release.erl),-pa ebin/)
  5859. $(MAKE) relx-post-rel
  5860. $(call erlang,$(call relx_relup.erl),-pa ebin/)
  5861. ifeq ($(RELX_TAR),1)
  5862. $(call erlang,$(call relx_tar.erl),-pa ebin/)
  5863. endif
  5864. distclean-relx-rel:
  5865. $(gen_verbose) rm -rf $(RELX_OUTPUT_DIR)
  5866. # Default hooks.
  5867. relx-post-rel::
  5868. $(verbose) :
  5869. # Run target.
  5870. ifeq ($(wildcard $(RELX_CONFIG))$(wildcard $(RELX_CONFIG_SCRIPT)),)
  5871. run::
  5872. else
  5873. define get_relx_release.erl
  5874. Config = $(call relx_get_config.erl),
  5875. {release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),
  5876. Vsn = case Vsn0 of
  5877. {cmd, Cmd} -> os:cmd(Cmd);
  5878. semver -> "";
  5879. {semver, _} -> "";
  5880. {git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");
  5881. {git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");
  5882. VsnStr -> Vsn0
  5883. end,
  5884. Extended = case lists:keyfind(extended_start_script, 1, Config) of
  5885. {_, true} -> "1";
  5886. _ -> ""
  5887. end,
  5888. io:format("~s ~s ~s", [Name, Vsn, Extended]),
  5889. halt(0).
  5890. endef
  5891. RELX_REL := $(shell $(call erlang,$(get_relx_release.erl)))
  5892. RELX_REL_NAME := $(word 1,$(RELX_REL))
  5893. RELX_REL_VSN := $(word 2,$(RELX_REL))
  5894. RELX_REL_CMD := $(if $(word 3,$(RELX_REL)),console)
  5895. ifeq ($(PLATFORM),msys2)
  5896. RELX_REL_EXT := .cmd
  5897. endif
  5898. run:: all
  5899. $(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) $(RELX_REL_CMD)
  5900. ifdef RELOAD
  5901. rel::
  5902. $(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) ping
  5903. $(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) \
  5904. eval "io:format(\"~p~n\", [c:lm()])."
  5905. endif
  5906. help::
  5907. $(verbose) printf "%s\n" "" \
  5908. "Relx targets:" \
  5909. " run Compile the project, build the release and run it"
  5910. endif
  5911. endif
  5912. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  5913. # Copyright (c) 2014, M Robert Martin <rob@version2beta.com>
  5914. # This file is contributed to erlang.mk and subject to the terms of the ISC License.
  5915. .PHONY: shell
  5916. # Configuration.
  5917. SHELL_ERL ?= erl
  5918. SHELL_PATHS ?= $(CURDIR)/ebin $(TEST_DIR)
  5919. SHELL_OPTS ?=
  5920. ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS))
  5921. # Core targets
  5922. help::
  5923. $(verbose) printf "%s\n" "" \
  5924. "Shell targets:" \
  5925. " shell Run an erlang shell with SHELL_OPTS or reasonable default"
  5926. # Plugin-specific targets.
  5927. $(foreach dep,$(SHELL_DEPS),$(eval $(call dep_target,$(dep))))
  5928. ifneq ($(SKIP_DEPS),)
  5929. build-shell-deps:
  5930. else
  5931. build-shell-deps: $(ALL_SHELL_DEPS_DIRS)
  5932. $(verbose) set -e; for dep in $(ALL_SHELL_DEPS_DIRS) ; do \
  5933. if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \
  5934. :; \
  5935. else \
  5936. $(MAKE) -C $$dep IS_DEP=1; \
  5937. if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \
  5938. fi \
  5939. done
  5940. endif
  5941. shell:: build-shell-deps
  5942. $(gen_verbose) $(SHELL_ERL) -pa $(SHELL_PATHS) $(SHELL_OPTS)
  5943. # Copyright 2017, Stanislaw Klekot <dozzie@jarowit.net>
  5944. # This file is part of erlang.mk and subject to the terms of the ISC License.
  5945. .PHONY: distclean-sphinx sphinx
  5946. # Configuration.
  5947. SPHINX_BUILD ?= sphinx-build
  5948. SPHINX_SOURCE ?= doc
  5949. SPHINX_CONFDIR ?=
  5950. SPHINX_FORMATS ?= html
  5951. SPHINX_DOCTREES ?= $(ERLANG_MK_TMP)/sphinx.doctrees
  5952. SPHINX_OPTS ?=
  5953. #sphinx_html_opts =
  5954. #sphinx_html_output = html
  5955. #sphinx_man_opts =
  5956. #sphinx_man_output = man
  5957. #sphinx_latex_opts =
  5958. #sphinx_latex_output = latex
  5959. # Helpers.
  5960. sphinx_build_0 = @echo " SPHINX" $1; $(SPHINX_BUILD) -N -q
  5961. sphinx_build_1 = $(SPHINX_BUILD) -N
  5962. sphinx_build_2 = set -x; $(SPHINX_BUILD)
  5963. sphinx_build = $(sphinx_build_$(V))
  5964. define sphinx.build
  5965. $(call sphinx_build,$1) -b $1 -d $(SPHINX_DOCTREES) $(if $(SPHINX_CONFDIR),-c $(SPHINX_CONFDIR)) $(SPHINX_OPTS) $(sphinx_$1_opts) -- $(SPHINX_SOURCE) $(call sphinx.output,$1)
  5966. endef
  5967. define sphinx.output
  5968. $(if $(sphinx_$1_output),$(sphinx_$1_output),$1)
  5969. endef
  5970. # Targets.
  5971. ifneq ($(wildcard $(if $(SPHINX_CONFDIR),$(SPHINX_CONFDIR),$(SPHINX_SOURCE))/conf.py),)
  5972. docs:: sphinx
  5973. distclean:: distclean-sphinx
  5974. endif
  5975. help::
  5976. $(verbose) printf "%s\n" "" \
  5977. "Sphinx targets:" \
  5978. " sphinx Generate Sphinx documentation." \
  5979. "" \
  5980. "ReST sources and 'conf.py' file are expected in directory pointed by" \
  5981. "SPHINX_SOURCE ('doc' by default). SPHINX_FORMATS lists formats to build (only" \
  5982. "'html' format is generated by default); target directory can be specified by" \
  5983. 'setting sphinx_$${format}_output, for example: sphinx_html_output = output/html' \
  5984. "Additional Sphinx options can be set in SPHINX_OPTS."
  5985. # Plugin-specific targets.
  5986. sphinx:
  5987. $(foreach F,$(SPHINX_FORMATS),$(call sphinx.build,$F))
  5988. distclean-sphinx:
  5989. $(gen_verbose) rm -rf $(filter-out $(SPHINX_SOURCE),$(foreach F,$(SPHINX_FORMATS),$(call sphinx.output,$F)))
  5990. # Copyright (c) 2017, Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com>
  5991. # This file is contributed to erlang.mk and subject to the terms of the ISC License.
  5992. .PHONY: show-ERL_LIBS show-ERLC_OPTS show-TEST_ERLC_OPTS
  5993. show-ERL_LIBS:
  5994. @echo $(ERL_LIBS)
  5995. show-ERLC_OPTS:
  5996. @$(foreach opt,$(ERLC_OPTS) -pa ebin -I include,echo "$(opt)";)
  5997. show-TEST_ERLC_OPTS:
  5998. @$(foreach opt,$(TEST_ERLC_OPTS) -pa ebin -I include,echo "$(opt)";)
  5999. # Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu>
  6000. # This file is part of erlang.mk and subject to the terms of the ISC License.
  6001. ifeq ($(filter triq,$(DEPS) $(TEST_DEPS)),triq)
  6002. .PHONY: triq
  6003. # Targets.
  6004. tests:: triq
  6005. define triq_check.erl
  6006. $(call cover.erl)
  6007. code:add_pathsa([
  6008. "$(call core_native_path,$(CURDIR)/ebin)",
  6009. "$(call core_native_path,$(DEPS_DIR)/*/ebin)",
  6010. "$(call core_native_path,$(TEST_DIR))"]),
  6011. try begin
  6012. CoverSetup(),
  6013. Res = case $(1) of
  6014. all -> [true] =:= lists:usort([triq:check(M) || M <- [$(call comma_list,$(3))]]);
  6015. module -> triq:check($(2));
  6016. function -> triq:check($(2))
  6017. end,
  6018. CoverExport("$(COVER_DATA_DIR)/triq.coverdata"),
  6019. Res
  6020. end of
  6021. true -> halt(0);
  6022. _ -> halt(1)
  6023. catch error:undef$(if $V,:Stacktrace) ->
  6024. io:format("Undefined property or module?~n$(if $V,~p~n)", [$(if $V,Stacktrace)]),
  6025. halt(0)
  6026. end.
  6027. endef
  6028. ifdef t
  6029. ifeq (,$(findstring :,$(t)))
  6030. triq: test-build cover-data-dir
  6031. $(verbose) $(call erlang,$(call triq_check.erl,module,$(t)))
  6032. else
  6033. triq: test-build cover-data-dir
  6034. $(verbose) echo Testing $(t)/0
  6035. $(verbose) $(call erlang,$(call triq_check.erl,function,$(t)()))
  6036. endif
  6037. else
  6038. triq: test-build cover-data-dir
  6039. $(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
  6040. $(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))
  6041. $(gen_verbose) $(call erlang,$(call triq_check.erl,all,undefined,$(MODULES)))
  6042. endif
  6043. endif
  6044. # Copyright (c) 2022, Loïc Hoguin <essen@ninenines.eu>
  6045. # This file is part of erlang.mk and subject to the terms of the ISC License.
  6046. .PHONY: xref
  6047. # Configuration.
  6048. # We do not use locals_not_used or deprecated_function_calls
  6049. # because the compiler will error out by default in those
  6050. # cases with Erlang.mk. Deprecated functions may make sense
  6051. # in some cases but few libraries define them. We do not
  6052. # use exports_not_used by default because it hinders more
  6053. # than it helps library projects such as Cowboy. Finally,
  6054. # undefined_functions provides little that undefined_function_calls
  6055. # doesn't already provide, so it's not enabled by default.
  6056. XREF_CHECKS ?= [undefined_function_calls]
  6057. # Instead of predefined checks a query can be evaluated
  6058. # using the Xref DSL. The $q variable is used in that case.
  6059. # The scope is a list of keywords that correspond to
  6060. # application directories, being essentially an easy way
  6061. # to configure which applications to analyze. With:
  6062. #
  6063. # - app: .
  6064. # - apps: $(ALL_APPS_DIRS)
  6065. # - deps: $(ALL_DEPS_DIRS)
  6066. # - otp: Built-in Erlang/OTP applications.
  6067. #
  6068. # The default is conservative (app) and will not be
  6069. # appropriate for all types of queries (for example
  6070. # application_call requires adding all applications
  6071. # that might be called or they will not be found).
  6072. XREF_SCOPE ?= app # apps deps otp
  6073. # If the above is not enough, additional application
  6074. # directories can be configured.
  6075. XREF_EXTRA_APP_DIRS ?=
  6076. # As well as additional non-application directories.
  6077. XREF_EXTRA_DIRS ?=
  6078. # Erlang.mk supports -ignore_xref([...]) with forms
  6079. # {M, F, A} | {F, A} | M, the latter ignoring whole
  6080. # modules. Ignores can also be provided project-wide.
  6081. XREF_IGNORE ?= []
  6082. # All callbacks may be ignored. Erlang.mk will ignore
  6083. # them automatically for exports_not_used (unless it
  6084. # is explicitly disabled by the user).
  6085. XREF_IGNORE_CALLBACKS ?=
  6086. # Core targets.
  6087. help::
  6088. $(verbose) printf '%s\n' '' \
  6089. 'Xref targets:' \
  6090. ' xref Analyze the project using Xref' \
  6091. ' xref q=QUERY Evaluate an Xref query'
  6092. # Plugin-specific targets.
  6093. define xref.erl
  6094. {ok, Xref} = xref:start([]),
  6095. Scope = [$(call comma_list,$(XREF_SCOPE))],
  6096. AppDirs0 = [$(call comma_list,$(foreach d,$(XREF_EXTRA_APP_DIRS),"$d"))],
  6097. AppDirs1 = case lists:member(otp, Scope) of
  6098. false -> AppDirs0;
  6099. true ->
  6100. RootDir = code:root_dir(),
  6101. AppDirs0 ++ [filename:dirname(P) || P <- code:get_path(), lists:prefix(RootDir, P)]
  6102. end,
  6103. AppDirs2 = case lists:member(deps, Scope) of
  6104. false -> AppDirs1;
  6105. true -> [$(call comma_list,$(foreach d,$(ALL_DEPS_DIRS),"$d"))] ++ AppDirs1
  6106. end,
  6107. AppDirs3 = case lists:member(apps, Scope) of
  6108. false -> AppDirs2;
  6109. true -> [$(call comma_list,$(foreach d,$(ALL_APPS_DIRS),"$d"))] ++ AppDirs2
  6110. end,
  6111. AppDirs = case lists:member(app, Scope) of
  6112. false -> AppDirs3;
  6113. true -> ["../$(notdir $(CURDIR))"|AppDirs3]
  6114. end,
  6115. [{ok, _} = xref:add_application(Xref, AppDir, [{builtins, true}]) || AppDir <- AppDirs],
  6116. ExtraDirs = [$(call comma_list,$(foreach d,$(XREF_EXTRA_DIRS),"$d"))],
  6117. [{ok, _} = xref:add_directory(Xref, ExtraDir, [{builtins, true}]) || ExtraDir <- ExtraDirs],
  6118. ok = xref:set_library_path(Xref, code:get_path() -- (["ebin", "."] ++ AppDirs ++ ExtraDirs)),
  6119. Checks = case {$1, is_list($2)} of
  6120. {check, true} -> $2;
  6121. {check, false} -> [$2];
  6122. {query, _} -> [$2]
  6123. end,
  6124. FinalRes = [begin
  6125. IsInformational = case $1 of
  6126. query -> true;
  6127. check ->
  6128. is_tuple(Check) andalso
  6129. lists:member(element(1, Check),
  6130. [call, use, module_call, module_use, application_call, application_use])
  6131. end,
  6132. {ok, Res0} = case $1 of
  6133. check -> xref:analyze(Xref, Check);
  6134. query -> xref:q(Xref, Check)
  6135. end,
  6136. Res = case IsInformational of
  6137. true -> Res0;
  6138. false ->
  6139. lists:filter(fun(R) ->
  6140. {Mod, InMFA, MFA} = case R of
  6141. {InMFA0 = {M, _, _}, MFA0} -> {M, InMFA0, MFA0};
  6142. {M, _, _} -> {M, R, R}
  6143. end,
  6144. Attrs = try
  6145. Mod:module_info(attributes)
  6146. catch error:undef ->
  6147. []
  6148. end,
  6149. InlineIgnores = lists:flatten([
  6150. [case V of
  6151. M when is_atom(M) -> {M, '_', '_'};
  6152. {F, A} -> {Mod, F, A};
  6153. _ -> V
  6154. end || V <- Values]
  6155. || {ignore_xref, Values} <- Attrs]),
  6156. BuiltinIgnores = [
  6157. {eunit_test, wrapper_test_exported_, 0}
  6158. ],
  6159. DoCallbackIgnores = case {Check, "$(strip $(XREF_IGNORE_CALLBACKS))"} of
  6160. {exports_not_used, ""} -> true;
  6161. {_, "0"} -> false;
  6162. _ -> true
  6163. end,
  6164. CallbackIgnores = case DoCallbackIgnores of
  6165. false -> [];
  6166. true ->
  6167. Behaviors = lists:flatten([
  6168. [BL || {behavior, BL} <- Attrs],
  6169. [BL || {behaviour, BL} <- Attrs]
  6170. ]),
  6171. [{Mod, CF, CA} || B <- Behaviors, {CF, CA} <- B:behaviour_info(callbacks)]
  6172. end,
  6173. WideIgnores = if
  6174. is_list($(XREF_IGNORE)) ->
  6175. [if is_atom(I) -> {I, '_', '_'}; true -> I end
  6176. || I <- $(XREF_IGNORE)];
  6177. true -> [$(XREF_IGNORE)]
  6178. end,
  6179. Ignores = InlineIgnores ++ BuiltinIgnores ++ CallbackIgnores ++ WideIgnores,
  6180. not (lists:member(InMFA, Ignores)
  6181. orelse lists:member(MFA, Ignores)
  6182. orelse lists:member({Mod, '_', '_'}, Ignores))
  6183. end, Res0)
  6184. end,
  6185. case Res of
  6186. [] -> ok;
  6187. _ when IsInformational ->
  6188. case Check of
  6189. {call, {CM, CF, CA}} ->
  6190. io:format("Functions that ~s:~s/~b calls:~n", [CM, CF, CA]);
  6191. {use, {CM, CF, CA}} ->
  6192. io:format("Function ~s:~s/~b is called by:~n", [CM, CF, CA]);
  6193. {module_call, CMod} ->
  6194. io:format("Modules that ~s calls:~n", [CMod]);
  6195. {module_use, CMod} ->
  6196. io:format("Module ~s is used by:~n", [CMod]);
  6197. {application_call, CApp} ->
  6198. io:format("Applications that ~s calls:~n", [CApp]);
  6199. {application_use, CApp} ->
  6200. io:format("Application ~s is used by:~n", [CApp]);
  6201. _ when $1 =:= query ->
  6202. io:format("Query ~s returned:~n", [Check])
  6203. end,
  6204. [case R of
  6205. {{InM, InF, InA}, {M, F, A}} ->
  6206. io:format("- ~s:~s/~b called by ~s:~s/~b~n",
  6207. [M, F, A, InM, InF, InA]);
  6208. {M, F, A} ->
  6209. io:format("- ~s:~s/~b~n", [M, F, A]);
  6210. ModOrApp ->
  6211. io:format("- ~s~n", [ModOrApp])
  6212. end || R <- Res],
  6213. ok;
  6214. _ ->
  6215. [case {Check, R} of
  6216. {undefined_function_calls, {{InM, InF, InA}, {M, F, A}}} ->
  6217. io:format("Undefined function ~s:~s/~b called by ~s:~s/~b~n",
  6218. [M, F, A, InM, InF, InA]);
  6219. {undefined_functions, {M, F, A}} ->
  6220. io:format("Undefined function ~s:~s/~b~n", [M, F, A]);
  6221. {locals_not_used, {M, F, A}} ->
  6222. io:format("Unused local function ~s:~s/~b~n", [M, F, A]);
  6223. {exports_not_used, {M, F, A}} ->
  6224. io:format("Unused exported function ~s:~s/~b~n", [M, F, A]);
  6225. {deprecated_function_calls, {{InM, InF, InA}, {M, F, A}}} ->
  6226. io:format("Deprecated function ~s:~s/~b called by ~s:~s/~b~n",
  6227. [M, F, A, InM, InF, InA]);
  6228. {deprecated_functions, {M, F, A}} ->
  6229. io:format("Deprecated function ~s:~s/~b~n", [M, F, A]);
  6230. _ ->
  6231. io:format("~p: ~p~n", [Check, R])
  6232. end || R <- Res],
  6233. error
  6234. end
  6235. end || Check <- Checks],
  6236. stopped = xref:stop(Xref),
  6237. case lists:usort(FinalRes) of
  6238. [ok] -> halt(0);
  6239. _ -> halt(1)
  6240. end
  6241. endef
  6242. xref: deps app
  6243. ifdef q
  6244. $(verbose) $(call erlang,$(call xref.erl,query,"$q"),-pa ebin/)
  6245. else
  6246. $(verbose) $(call erlang,$(call xref.erl,check,$(XREF_CHECKS)),-pa ebin/)
  6247. endif
  6248. # Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu>
  6249. # Copyright (c) 2015, Viktor Söderqvist <viktor@zuiderkwast.se>
  6250. # This file is part of erlang.mk and subject to the terms of the ISC License.
  6251. COVER_REPORT_DIR ?= cover
  6252. COVER_DATA_DIR ?= $(COVER_REPORT_DIR)
  6253. ifdef COVER
  6254. COVER_APPS ?= $(notdir $(ALL_APPS_DIRS))
  6255. COVER_DEPS ?=
  6256. COVER_EXCLUDE_MODS ?=
  6257. endif
  6258. # Code coverage for Common Test.
  6259. ifdef COVER
  6260. ifdef CT_RUN
  6261. ifneq ($(wildcard $(TEST_DIR)),)
  6262. test-build:: $(TEST_DIR)/ct.cover.spec
  6263. $(TEST_DIR)/ct.cover.spec: cover-data-dir
  6264. $(gen_verbose) printf "%s\n" \
  6265. "{incl_app, '$(PROJECT)', details}." \
  6266. "{incl_dirs, '$(PROJECT)', [\"$(call core_native_path,$(CURDIR)/ebin)\" \
  6267. $(foreach a,$(COVER_APPS),$(comma) \"$(call core_native_path,$(APPS_DIR)/$a/ebin)\") \
  6268. $(foreach d,$(COVER_DEPS),$(comma) \"$(call core_native_path,$(DEPS_DIR)/$d/ebin)\")]}." \
  6269. '{export,"$(call core_native_path,$(abspath $(COVER_DATA_DIR))/ct.coverdata)"}.' \
  6270. "{excl_mods, '$(PROJECT)', [$(call comma_list,$(COVER_EXCLUDE_MODS))]}." > $@
  6271. CT_RUN += -cover $(TEST_DIR)/ct.cover.spec
  6272. endif
  6273. endif
  6274. endif
  6275. # Code coverage for other tools.
  6276. ifdef COVER
  6277. define cover.erl
  6278. CoverSetup = fun() ->
  6279. Dirs = ["$(call core_native_path,$(CURDIR)/ebin)"
  6280. $(foreach a,$(COVER_APPS),$(comma) "$(call core_native_path,$(APPS_DIR)/$a/ebin)")
  6281. $(foreach d,$(COVER_DEPS),$(comma) "$(call core_native_path,$(DEPS_DIR)/$d/ebin)")],
  6282. Excludes = [$(call comma_list,$(foreach e,$(COVER_EXCLUDE_MODS),"$e"))],
  6283. [case file:list_dir(Dir) of
  6284. {error, enotdir} -> false;
  6285. {error, _} -> halt(2);
  6286. {ok, Files} ->
  6287. BeamFiles = [filename:join(Dir, File) ||
  6288. File <- Files,
  6289. not lists:member(filename:basename(File, ".beam"), Excludes),
  6290. filename:extension(File) =:= ".beam"],
  6291. case cover:compile_beam(BeamFiles) of
  6292. {error, _} -> halt(1);
  6293. _ -> true
  6294. end
  6295. end || Dir <- Dirs]
  6296. end,
  6297. CoverExport = fun(Filename) -> cover:export(Filename) end,
  6298. endef
  6299. else
  6300. define cover.erl
  6301. CoverSetup = fun() -> ok end,
  6302. CoverExport = fun(_) -> ok end,
  6303. endef
  6304. endif
  6305. # Core targets
  6306. ifdef COVER
  6307. ifneq ($(COVER_REPORT_DIR),)
  6308. tests::
  6309. $(verbose) $(MAKE) --no-print-directory cover-report
  6310. endif
  6311. cover-data-dir: | $(COVER_DATA_DIR)
  6312. $(COVER_DATA_DIR):
  6313. $(verbose) mkdir -p $(COVER_DATA_DIR)
  6314. else
  6315. cover-data-dir:
  6316. endif
  6317. clean:: coverdata-clean
  6318. ifneq ($(COVER_REPORT_DIR),)
  6319. distclean:: cover-report-clean
  6320. endif
  6321. help::
  6322. $(verbose) printf "%s\n" "" \
  6323. "Cover targets:" \
  6324. " cover-report Generate a HTML coverage report from previously collected" \
  6325. " cover data." \
  6326. " all.coverdata Merge all coverdata files into all.coverdata." \
  6327. "" \
  6328. "If COVER=1 is set, coverage data is generated by the targets eunit and ct. The" \
  6329. "target tests additionally generates a HTML coverage report from the combined" \
  6330. "coverdata files from each of these testing tools. HTML reports can be disabled" \
  6331. "by setting COVER_REPORT_DIR to empty."
  6332. # Plugin specific targets
  6333. COVERDATA = $(filter-out $(COVER_DATA_DIR)/all.coverdata,$(wildcard $(COVER_DATA_DIR)/*.coverdata))
  6334. .PHONY: coverdata-clean
  6335. coverdata-clean:
  6336. $(gen_verbose) rm -f $(COVER_DATA_DIR)/*.coverdata $(TEST_DIR)/ct.cover.spec
  6337. # Merge all coverdata files into one.
  6338. define cover_export.erl
  6339. $(foreach f,$(COVERDATA),cover:import("$(f)") == ok orelse halt(1),)
  6340. cover:export("$(COVER_DATA_DIR)/$@"), halt(0).
  6341. endef
  6342. all.coverdata: $(COVERDATA) cover-data-dir
  6343. $(gen_verbose) $(call erlang,$(cover_export.erl))
  6344. # These are only defined if COVER_REPORT_DIR is non-empty. Set COVER_REPORT_DIR to
  6345. # empty if you want the coverdata files but not the HTML report.
  6346. ifneq ($(COVER_REPORT_DIR),)
  6347. .PHONY: cover-report-clean cover-report
  6348. cover-report-clean:
  6349. $(gen_verbose) rm -rf $(COVER_REPORT_DIR)
  6350. ifneq ($(COVER_REPORT_DIR),$(COVER_DATA_DIR))
  6351. $(if $(shell ls -A $(COVER_DATA_DIR)/),,$(verbose) rmdir $(COVER_DATA_DIR))
  6352. endif
  6353. ifeq ($(COVERDATA),)
  6354. cover-report:
  6355. else
  6356. # Modules which include eunit.hrl always contain one line without coverage
  6357. # because eunit defines test/0 which is never called. We compensate for this.
  6358. EUNIT_HRL_MODS = $(subst $(space),$(comma),$(shell \
  6359. grep -H -e '^\s*-include.*include/eunit\.hrl"' src/*.erl \
  6360. | sed "s/^src\/\(.*\)\.erl:.*/'\1'/" | uniq))
  6361. define cover_report.erl
  6362. $(foreach f,$(COVERDATA),cover:import("$(f)") == ok orelse halt(1),)
  6363. Ms = cover:imported_modules(),
  6364. [cover:analyse_to_file(M, "$(COVER_REPORT_DIR)/" ++ atom_to_list(M)
  6365. ++ ".COVER.html", [html]) || M <- Ms],
  6366. Report = [begin {ok, R} = cover:analyse(M, module), R end || M <- Ms],
  6367. EunitHrlMods = [$(EUNIT_HRL_MODS)],
  6368. Report1 = [{M, {Y, case lists:member(M, EunitHrlMods) of
  6369. true -> N - 1; false -> N end}} || {M, {Y, N}} <- Report],
  6370. TotalY = lists:sum([Y || {_, {Y, _}} <- Report1]),
  6371. TotalN = lists:sum([N || {_, {_, N}} <- Report1]),
  6372. Perc = fun(Y, N) -> case Y + N of 0 -> 100; S -> round(100 * Y / S) end end,
  6373. TotalPerc = Perc(TotalY, TotalN),
  6374. {ok, F} = file:open("$(COVER_REPORT_DIR)/index.html", [write]),
  6375. io:format(F, "<!DOCTYPE html><html>~n"
  6376. "<head><meta charset=\"UTF-8\">~n"
  6377. "<title>Coverage report</title></head>~n"
  6378. "<body>~n", []),
  6379. io:format(F, "<h1>Coverage</h1>~n<p>Total: ~p%</p>~n", [TotalPerc]),
  6380. io:format(F, "<table><tr><th>Module</th><th>Coverage</th></tr>~n", []),
  6381. [io:format(F, "<tr><td><a href=\"~p.COVER.html\">~p</a></td>"
  6382. "<td>~p%</td></tr>~n",
  6383. [M, M, Perc(Y, N)]) || {M, {Y, N}} <- Report1],
  6384. How = "$(subst $(space),$(comma)$(space),$(basename $(COVERDATA)))",
  6385. Date = "$(shell date -u "+%Y-%m-%dT%H:%M:%SZ")",
  6386. io:format(F, "</table>~n"
  6387. "<p>Generated using ~s and erlang.mk on ~s.</p>~n"
  6388. "</body></html>", [How, Date]),
  6389. halt().
  6390. endef
  6391. cover-report:
  6392. $(verbose) mkdir -p $(COVER_REPORT_DIR)
  6393. $(gen_verbose) $(call erlang,$(cover_report.erl))
  6394. endif
  6395. endif # ifneq ($(COVER_REPORT_DIR),)
  6396. # Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu>
  6397. # This file is part of erlang.mk and subject to the terms of the ISC License.
  6398. .PHONY: sfx
  6399. ifdef RELX_REL
  6400. ifdef SFX
  6401. # Configuration.
  6402. SFX_ARCHIVE ?= $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/$(RELX_REL_NAME)-$(RELX_REL_VSN).tar.gz
  6403. SFX_OUTPUT_FILE ?= $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME).run
  6404. # Core targets.
  6405. rel:: sfx
  6406. # Plugin-specific targets.
  6407. define sfx_stub
  6408. #!/bin/sh
  6409. TMPDIR=`mktemp -d`
  6410. ARCHIVE=`awk '/^__ARCHIVE_BELOW__$$/ {print NR + 1; exit 0;}' $$0`
  6411. FILENAME=$$(basename $$0)
  6412. REL=$${FILENAME%.*}
  6413. tail -n+$$ARCHIVE $$0 | tar -xzf - -C $$TMPDIR
  6414. $$TMPDIR/bin/$$REL console
  6415. RET=$$?
  6416. rm -rf $$TMPDIR
  6417. exit $$RET
  6418. __ARCHIVE_BELOW__
  6419. endef
  6420. sfx:
  6421. $(verbose) $(call core_render,sfx_stub,$(SFX_OUTPUT_FILE))
  6422. $(gen_verbose) cat $(SFX_ARCHIVE) >> $(SFX_OUTPUT_FILE)
  6423. $(verbose) chmod +x $(SFX_OUTPUT_FILE)
  6424. endif
  6425. endif
  6426. # Copyright (c) 2013-2017, Loïc Hoguin <essen@ninenines.eu>
  6427. # This file is part of erlang.mk and subject to the terms of the ISC License.
  6428. # External plugins.
  6429. DEP_PLUGINS ?=
  6430. $(foreach p,$(DEP_PLUGINS),\
  6431. $(eval $(if $(findstring /,$p),\
  6432. $(call core_dep_plugin,$p,$(firstword $(subst /, ,$p))),\
  6433. $(call core_dep_plugin,$p/plugins.mk,$p))))
  6434. help:: help-plugins
  6435. help-plugins::
  6436. $(verbose) :
  6437. # Copyright (c) 2013-2015, Loïc Hoguin <essen@ninenines.eu>
  6438. # Copyright (c) 2015-2016, Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com>
  6439. # This file is part of erlang.mk and subject to the terms of the ISC License.
  6440. # Fetch dependencies recursively (without building them).
  6441. .PHONY: fetch-deps fetch-doc-deps fetch-rel-deps fetch-test-deps \
  6442. fetch-shell-deps
  6443. .PHONY: $(ERLANG_MK_RECURSIVE_DEPS_LIST) \
  6444. $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \
  6445. $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \
  6446. $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \
  6447. $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)
  6448. fetch-deps: $(ERLANG_MK_RECURSIVE_DEPS_LIST)
  6449. fetch-doc-deps: $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST)
  6450. fetch-rel-deps: $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST)
  6451. fetch-test-deps: $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST)
  6452. fetch-shell-deps: $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)
  6453. ifneq ($(SKIP_DEPS),)
  6454. $(ERLANG_MK_RECURSIVE_DEPS_LIST) \
  6455. $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \
  6456. $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \
  6457. $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \
  6458. $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST):
  6459. $(verbose) :> $@
  6460. else
  6461. # By default, we fetch "normal" dependencies. They are also included no
  6462. # matter the type of requested dependencies.
  6463. #
  6464. # $(ALL_DEPS_DIRS) includes $(BUILD_DEPS).
  6465. $(ERLANG_MK_RECURSIVE_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS)
  6466. $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_DOC_DEPS_DIRS)
  6467. $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_REL_DEPS_DIRS)
  6468. $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_TEST_DEPS_DIRS)
  6469. $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_SHELL_DEPS_DIRS)
  6470. # Allow to use fetch-deps and $(DEP_TYPES) to fetch multiple types of
  6471. # dependencies with a single target.
  6472. ifneq ($(filter doc,$(DEP_TYPES)),)
  6473. $(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_DOC_DEPS_DIRS)
  6474. endif
  6475. ifneq ($(filter rel,$(DEP_TYPES)),)
  6476. $(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_REL_DEPS_DIRS)
  6477. endif
  6478. ifneq ($(filter test,$(DEP_TYPES)),)
  6479. $(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_TEST_DEPS_DIRS)
  6480. endif
  6481. ifneq ($(filter shell,$(DEP_TYPES)),)
  6482. $(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_SHELL_DEPS_DIRS)
  6483. endif
  6484. ERLANG_MK_RECURSIVE_TMP_LIST := $(abspath $(ERLANG_MK_TMP)/recursive-tmp-deps-$(shell echo $$PPID).log)
  6485. $(ERLANG_MK_RECURSIVE_DEPS_LIST) \
  6486. $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \
  6487. $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \
  6488. $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \
  6489. $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST): | $(ERLANG_MK_TMP)
  6490. ifeq ($(IS_APP)$(IS_DEP),)
  6491. $(verbose) rm -f $(ERLANG_MK_RECURSIVE_TMP_LIST)
  6492. endif
  6493. $(verbose) touch $(ERLANG_MK_RECURSIVE_TMP_LIST)
  6494. $(verbose) set -e; for dep in $^ ; do \
  6495. if ! grep -qs ^$$dep$$ $(ERLANG_MK_RECURSIVE_TMP_LIST); then \
  6496. echo $$dep >> $(ERLANG_MK_RECURSIVE_TMP_LIST); \
  6497. if grep -qs -E "^[[:blank:]]*include[[:blank:]]+(erlang\.mk|.*/erlang\.mk|.*ERLANG_MK_FILENAME.*)$$" \
  6498. $$dep/GNUmakefile $$dep/makefile $$dep/Makefile; then \
  6499. $(MAKE) -C $$dep fetch-deps \
  6500. IS_DEP=1 \
  6501. ERLANG_MK_RECURSIVE_TMP_LIST=$(ERLANG_MK_RECURSIVE_TMP_LIST); \
  6502. fi \
  6503. fi \
  6504. done
  6505. ifeq ($(IS_APP)$(IS_DEP),)
  6506. $(verbose) sort < $(ERLANG_MK_RECURSIVE_TMP_LIST) | \
  6507. uniq > $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted
  6508. $(verbose) cmp -s $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted $@ \
  6509. || mv $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted $@
  6510. $(verbose) rm -f $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted
  6511. $(verbose) rm $(ERLANG_MK_RECURSIVE_TMP_LIST)
  6512. endif
  6513. endif # ifneq ($(SKIP_DEPS),)
  6514. # List dependencies recursively.
  6515. .PHONY: list-deps list-doc-deps list-rel-deps list-test-deps \
  6516. list-shell-deps
  6517. list-deps: $(ERLANG_MK_RECURSIVE_DEPS_LIST)
  6518. list-doc-deps: $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST)
  6519. list-rel-deps: $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST)
  6520. list-test-deps: $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST)
  6521. list-shell-deps: $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)
  6522. list-deps list-doc-deps list-rel-deps list-test-deps list-shell-deps:
  6523. $(verbose) cat $^
  6524. # Query dependencies recursively.
  6525. .PHONY: query-deps query-doc-deps query-rel-deps query-test-deps \
  6526. query-shell-deps
  6527. QUERY ?= name fetch_method repo version
  6528. define query_target
  6529. $(1): $(2) clean-tmp-query.log
  6530. ifeq ($(IS_APP)$(IS_DEP),)
  6531. $(verbose) rm -f $(4)
  6532. endif
  6533. $(verbose) $(foreach dep,$(3),\
  6534. echo $(PROJECT): $(foreach q,$(QUERY),$(call query_$(q),$(dep))) >> $(4) ;)
  6535. $(if $(filter-out query-deps,$(1)),,\
  6536. $(verbose) set -e; for dep in $(3) ; do \
  6537. if grep -qs ^$$$$dep$$$$ $(ERLANG_MK_TMP)/query.log; then \
  6538. :; \
  6539. else \
  6540. echo $$$$dep >> $(ERLANG_MK_TMP)/query.log; \
  6541. $(MAKE) -C $(DEPS_DIR)/$$$$dep $$@ QUERY="$(QUERY)" IS_DEP=1 || true; \
  6542. fi \
  6543. done)
  6544. ifeq ($(IS_APP)$(IS_DEP),)
  6545. $(verbose) touch $(4)
  6546. $(verbose) cat $(4)
  6547. endif
  6548. endef
  6549. clean-tmp-query.log:
  6550. ifeq ($(IS_DEP),)
  6551. $(verbose) rm -f $(ERLANG_MK_TMP)/query.log
  6552. endif
  6553. $(eval $(call query_target,query-deps,$(ERLANG_MK_RECURSIVE_DEPS_LIST),$(BUILD_DEPS) $(DEPS),$(ERLANG_MK_QUERY_DEPS_FILE)))
  6554. $(eval $(call query_target,query-doc-deps,$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST),$(DOC_DEPS),$(ERLANG_MK_QUERY_DOC_DEPS_FILE)))
  6555. $(eval $(call query_target,query-rel-deps,$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST),$(REL_DEPS),$(ERLANG_MK_QUERY_REL_DEPS_FILE)))
  6556. $(eval $(call query_target,query-test-deps,$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST),$(TEST_DEPS),$(ERLANG_MK_QUERY_TEST_DEPS_FILE)))
  6557. $(eval $(call query_target,query-shell-deps,$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST),$(SHELL_DEPS),$(ERLANG_MK_QUERY_SHELL_DEPS_FILE)))