skip to main content
research-article

Shake before building: replacing make with haskell

Published:09 September 2012Publication History
Skip Abstract Section

Abstract

Most complex software projects are compiled using a build tool (e.g. make), which runs commands in an order satisfying user-defined dependencies. Unfortunately, most build tools require all dependencies to be specified before the build starts. This restriction makes many dependency patterns difficult to express, especially those involving files generated at build time. We show how to eliminate this restriction, allowing additional dependencies to be specified while building. We have implemented our ideas in the Haskell library Shake, and have used Shake to write a complex build system which compiles millions of lines of code.

References

  1. Bram Adams, Herman Tromp, Kris De Schutter, and Wolfgang De Meuter. Design recovery and maintenance of build systems. In Proc. ICSM '07, pages 214--223. IEEE, October 2007.Google ScholarGoogle ScholarCross RefCross Ref
  2. Max Bolingbroke. OpenShake build system. https://github.com/batterseapower/openshake, 2011.Google ScholarGoogle Scholar
  3. Merijn de Jonge. Build-level components. IEEE Transactions on Software Engineering, 31 (7): 588--600, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Stuart Feldman. Make - a program for maintaining computer programs. Technical Report 5, Bell Laboratories, 1978.Google ScholarGoogle Scholar
  5. Berwyn Hoyt, Bryan Hoyt, and Ben Hoyt. fabricate - the better build tool. http://code.google.com/p/fabricate, 2009.Google ScholarGoogle Scholar
  6. Ralf Lämmel and Simon Peyton Jones. Scrap your boilerplate: a practical design pattern for generic programming. In Proc. TLDI '03, pages 26--37. ACM Press, March 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Konstantin Läufer and Martin Odersky. Polymorphic type inference and abstract data types. ACM Transactions on Programming Language Systems, 16: 1411--1430, September 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Evan Martin. Ninja manual. http://martine.github.com/ninja/manual.html, December 2011.Google ScholarGoogle Scholar
  9. Peter Miller. Recursive make considered harmful. Journal of AUUG Inc, 19 (1): 14--25, 1998.Google ScholarGoogle Scholar
  10. Avery Pennarun. redo: a top-down software build system. https://github.com/apenwarr/redo, December 2011.Google ScholarGoogle Scholar
  11. Tom Schrijvers, Simon Peyton Jones, Manuel Chakravarty, and Martin Sulzmann. Type checking with open type functions. In Proc. ICFP '08, pages 51--62. ACM Press, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Mike Shal. Build system rules and algorithms. http://gittup.org/tup/build_system_rules_and_algorithms.pdf, 2009.Google ScholarGoogle Scholar
  13. The GHC Team. The GHC compiler, version 7.2.2. http://www.haskell.org/ghc/, November 2011.Google ScholarGoogle Scholar

Index Terms

  1. Shake before building: replacing make with haskell

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 47, Issue 9
      ICFP '12
      September 2012
      368 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2398856
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '12: Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
        September 2012
        392 pages
        ISBN:9781450310543
        DOI:10.1145/2364527

      Copyright © 2012 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 9 September 2012

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!