cake3: Third cake the Makefile EDSL

[ bsd3, development, library, program ] [ Propose Tags ]

Cake3 is a EDSL for building Makefiles, written in Haskell. With cake3, developer can write their build logic in Haskell, obtain clean and safe Makefile and distribute it among the non-Haskell-aware users. Currenly, GNU Make is the only backend supported.

Example program

module Cakefile where

import Development.Cake3
import Cakefile_P

cs = map file ["main.c", "second.c"]

main = writeMake (file "Makefile") $ do
  selfUpdate
  d <- rule $ do
    shell [cmd|gcc -M $cs -MF @(file "depend.mk")|]
  os <- forM cs $ \c -> do
    rule $ do
      shell [cmd| gcc -c $(extvar "CFLAGS") -o @(c.="o") $c |]
  elf <- rule $ do
    shell [cmd| gcc -o @(file "main.elf") $os |]
  rule $ do
    phony "clean"
    unsafeShell [cmd|rm $elf $os $d|]
  rule $ do
    phony "all"
    depend elf
  includeMakefile d

Basic workflow

See the README on the GitHub https://github.com/grwlf/cake3 for more information.

Changes

Versions [faq] 0.1.0.0, 0.2.1.0, 0.3.0.0, 0.3.0.1, 0.4.0.0, 0.5.0.0, 0.5.1.0, 0.5.2.0, 0.6.0, 0.6.4, 0.6.5
Dependencies attoparsec, base (==4.6.*), bytestring, containers, deepseq, directory, filepath, haskell-src-meta, language-javascript (==0.5.*), mime-types, monadloc, mtl, optparse-applicative, process, syb, system-filepath, template-haskell, text, text-format [details]
License BSD-3-Clause
Author Sergey Mironov
Maintainer grrwlf@gmail.com
Category Development
Home page https://github.com/grwlf/cake3
Uploaded by SergeyMironov at Wed Dec 4 09:52:30 UTC 2013
Distributions NixOS:0.6.5
Executables urembed, cake3
Downloads 4735 total (83 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Successful builds reported [all 2 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees