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
1
vote
2 answers

Does shake have an equivalent to make's dry-run option?

The make utility lets you see what would be built, without actually building it, by using the command-line option --dry-run. Does shake have something equivalent?
Jeffrey Benjamin Brown
  • 3,427
  • 2
  • 28
  • 40
1
vote
1 answer

Using persistent services with Shake

We've got a Shake build system where some rules talk to a Postgres database, as a persistent background service. How can we use Shake to ensure that the service is started if required, and shut down after Shake completes? In particular, we don't…
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
1
vote
1 answer

How do I ask Shake if a target is up to date, like `make -q`?

With Make I can say make -q [target] and the exit code will indicate if the target is up to date. Does Shake have an equivalent?
1
vote
2 answers

Shake build capturing directories

I have recently converted my works make based build system to shake. I am now trying to make shake a little more robust to changes in the directory structure so that I do not have to regenerate the build system. Each of my projects use are C based…
1
vote
2 answers

Why is shake's progress estimation for this simple build system very wrong?

I have the following build system module Main where import Development.Shake main :: IO () main = shakeArgs shakeOptions $ do "a" %> \out -> do need ["a.in"] cmd_ "sleep" "10" cmd "touch" [out] which I build with stack build and…
typetetris
  • 4,586
  • 16
  • 31
1
vote
1 answer

Shake does not recognize wether to build a rule/always builds a rule even if it shouldn't

I have a project where I use shake to generate a bunch of reports based on input-files, and run as a restful webservice. One reason why I chose Shake is that is should not rebuild anything if input-files have not changed (e.g. based on Digest,…
epsilonhalbe
  • 15,637
  • 5
  • 46
  • 74
1
vote
1 answer

What will (getDirectoryFiles "" (dir "//*.c")) actually match?

I was experiencing unnecessary rebuilds while using this matching pattern: getDirectoryFiles "" $ "foo" "//*.c" I'm on Linux so from my understanding the second argument will evaluate to "foo///*.c" and I presume that it would be incorrect to…
nesqi
  • 97
  • 7
1
vote
1 answer

how can I use the dir created by withTempDir in a rule?

I need to refer to the directory created by withTempDir by name in the Actions. I am guessing that the current working directory is changed by withTempDir, and that would likely work in the simple case. However some of the Actions must do their own…
jeffmcc
  • 263
  • 3
  • 9
1
vote
1 answer

How to force Shake to echo stdout from scripts?

I'm using Shake to manage some scripts that might run a really long time (days or even weeks). They print their progress to stdout using the progressbar Python module. How can I make Shake echo that progress during the run, rather than just showing…
jefdaj
  • 2,025
  • 2
  • 21
  • 33
1
vote
1 answer

Handling effects on the shell environment with the shake build system

I am running bash on windows (not the fancy new thing on windows 10, mingw bash) and from there shake. From what I understand it is possible for a command on windows to edit the environment of cmd. In my usecase I don't want to make assumptions on…
fakedrake
  • 6,528
  • 8
  • 41
  • 64
1
vote
1 answer

Detect errors and build report in case of failure in shake build

I'm using shake for a test suite. I have multiples independent tests represented as a set of Rule. If any of theses rules fails, the test fails. Finally, I produce a report containing all the tests status. My issues are : a) I need to detect which…
Guillaum
  • 170
  • 6
1
vote
1 answer

How to specify non-trivial metadata to drive a shake build system?

Given a non-homogeneously structured mixed-language code base, what is the recommended way to specify metadata to drive a Shake build system? In particular, the metadata should describe source language (C++, C#, Fortran), source files, result type…
precarious
  • 598
  • 2
  • 14
1
vote
1 answer

How to construct rule names according to an external factor?

Till now i had the following code: shakeArgsWith opts additionalFlags $ \flags targets -> return $ Just $ do ... -- Get target arch from command line flags let givenArch = listToMaybe [v | AFlag v <- flags] let arch = fromMaybe…
Fr0stBit
  • 1,455
  • 1
  • 13
  • 22
1
vote
2 answers

How to avoid output synchronization problems in parallel builds?

When using parallel builds in shake, i get malformed output like this: [»] Compiling src/Game/Game.cpp [»] Compiling [»] Compiling [»] Compiling src/Graphics/Image/Png/PngLoader.cpp src/Main.cpp src/System/HeartBeat.cpp [»] Compiling…
Fr0stBit
  • 1,455
  • 1
  • 13
  • 22
1
vote
1 answer

Storing metadata for rules

I have a function that rebuilds a target whenever the associated command changes: target :: FilePath -> [FilePath] -> String -> Rules () target dst deps cline = do let dcmd = dst <.> "x" dcmd %> \out -> do alwaysRerun writeFileChanged…
clavijo
  • 77
  • 6
1 2 3
8 9