Questions tagged [shake-build-system]

Shake is a Haskell library for writing build systems - designed as a replacement for make.

Shake is a Haskell library for writing build systems - designed as a replacement for make. Website at https://shakebuild.com/.

127 questions
17
votes
2 answers

How to write fixed point build rules in Shake, e.g. Latex

Using the Shake Haskell build library, how can I write a rule using a program that needs to reach a fixed point? Imagine I have a program foo that takes a file input and produces an output file, which should have foo applied repeatedly until the…
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
16
votes
1 answer

Why does Shake recommend disabling idle garbage collection?

In the Shake documentation it recommends compiling using the flag -with-rtsopts=-I0 to disable idle garbage collection. Why does Shake recommend that?
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
14
votes
1 answer

Multi-input, multi-output compilers with Shake

I'm experimenting with using Shake to build Java code, and am a bit stuck because of the unusual nature of the javac compiler. In general for each module of a large project, the compiler is invoked with all of the source files for that module as…
Neil Bartlett
  • 23,743
  • 4
  • 44
  • 77
7
votes
1 answer

How do I compile Haskell programs using Shake

I have a Haskell program that I want to compile with GHC, orchestrated by the Shake build system. Which commands should I execute, and under what circumstances should they be rerun?
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
7
votes
2 answers

Differences between SCons and Shake

I'm working on a Python/Haskell project and I'm looking for alternatives to Makefile. Obvious choices are Python SCons and Haskell Shake. Since I have no experience with either of them, I'd like to ask if there is any comparison of their drawbacks…
Petr
  • 62,528
  • 13
  • 153
  • 317
6
votes
1 answer

Can Shake track number of threads used by build commands which are themselves parallel?

Shake builds things in parallel when possible, but what happens if an individual build step is itself parallelizable? For example I'm running BLAST commands. Each command compares two species' genomes. Several comparisons could be run in parallel,…
jefdaj
  • 2,025
  • 2
  • 21
  • 33
6
votes
1 answer

How to check if running shake would rebuild a target (without actually trying to build it)?

In certain situations, I want to know very quickly if a certain target file is up-to-date, i.e. whether or not building it with shake would run any of the rules transitively contributing to the target. What's the best way to achieve this with…
stefanwehr
  • 390
  • 2
  • 7
5
votes
1 answer

How to define a shake rule to build docker images?

I have a shake build (version 0.16.4) that builds a lot of docker images out of Dockerfiles and other support files. I would like to factor out all those build in a single "rule" whose output will be a docker image. I have read How to define a timer…
insitu
  • 4,488
  • 3
  • 25
  • 42
5
votes
1 answer

Can a shake rule determine which "needs" have changed since the last build?

I am building a shake based build system for a large Ruby (+ other things) code base, but I am struggling to deal with Ruby commands that expect to be passed a list of files to "build". Take Rubocop (a linting tool). I can see three options: need…
mavnn
  • 9,101
  • 4
  • 34
  • 52
5
votes
1 answer

How execute sh command using Shake

I'm trying to migrate an existing makefile to Shake and so far I've tried the following (just create a file with the content of a directory) module Main where import Development.Shake main :: IO () main = shakeArgs shakeOptions{shakeFiles="_build"}…
mb14
  • 22,276
  • 7
  • 60
  • 102
5
votes
1 answer

How can I use the Shake library to build a reactive build system?

Would it be possible to make Shake reactive, using inotify (or whatever git-annex and Yesod use) so that if ever the filesystem changes in such a way to imply that rule should execute, it does so at the earliest opportunity?
John Wiegley
  • 6,972
  • 1
  • 16
  • 20
4
votes
2 answers

Haskell Shake with Twitch?

I'm switching (or trying to) from the brilliant tup to haskell shake as my build system.. Only I can't figure out how to get shake to rebuild files on changes. I could of course use inotify or a wrapper like filewatcher or even watchman. Since I'm…
HaoZeke
  • 674
  • 9
  • 19
4
votes
1 answer

Shake: how do I depend on dynamically generated source files?

Given a directory structure like this: . ├── frontend │   ├── _build/ -- build dir, all files produced by shake, except for Frontend.elm, go here │   ├── Build.hs -- the build script │   ├── build.sh -- wrap Build.hs with…
Incömplete
  • 853
  • 8
  • 20
4
votes
1 answer

Shake: how to proceed when file name is not known a-priori

I'm trying to set up Shake for building a web application. At the end of my build process I would like to rename the resulting .js and .css files according to a content hash (for cache busting purposes). This means of course that I do not know the…
Aton
  • 1,125
  • 8
  • 18
4
votes
1 answer

Use shake to define a rule for a set of files, unknown at build time

I am developing a complex build script with Shake, but (for now) I'm using Visual Studio solutions to build all of the binaries. Because of this, I need to define a rule that builds dozens of files in a single sweep. I don't know what the build…
Elliot Cameron
  • 5,235
  • 2
  • 27
  • 34
1
2 3
8 9