[Haskell-cafe] [ANN] cake3- released

Sergey Mironov grrwlf at gmail.com
Sun Mar 30 19:04:12 UTC 2014

Hi! I'm glad to announce a new version of cake3 the Makefile generator.



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.

=== Chagnes ===

- Automatically generate the 'clean' rule
- New genFile and genTmpFile functions embed text files into the Makefile.
- The Ur/Web extension improved

=== The sample program ===

    module Cakefile where

    import Development.Cake3
    import Cakefile_P

    main = writeMake (file "Makefile") $ do


      cs <- return $ [file "main.c", file "second.c"]

      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 "all"
        depend elf

      includeMakefile d


More information about the Haskell-Cafe mailing list