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
1 answer

How to delete unbuildable goal?

I would like to remove files that no longer have source but without cleaning. Is there support for partially cleaning an incremental build? In this case, I guess I could compare against set of source files that were consumed in previous builds and…
sevo
  • 4,559
  • 1
  • 15
  • 31
1
vote
2 answers

Is Shake suitable for building a semi-automated tool for human users?

How can I make script that fill perform an "external" action once every build? import Development.Shake main = shakeArgs shakeOptions $ do want [".finished"] ".finished" %> \out -> do liftIO $ putStrLn "You sure?" >> getLine >>…
sevo
  • 4,559
  • 1
  • 15
  • 31
1
vote
1 answer

How to define a Shake rule that depends on some modification of an input

Using Shake, I want to define a rule that depends on a bunch of executables (e.g. exe, dll, etc.). However, before using them, they need to be digitally signed. Since "signing" doesn't actually produce a new file, how can I ensure that my rule…
Elliot Cameron
  • 5,235
  • 2
  • 27
  • 34
1
vote
1 answer

Depending on a generated file

What's the right way for a rule to need a generated file? Here's what I tried: import Development.Shake import System.IO import Control.Monad main = do s <- withBinaryFile "/dev/urandom" ReadMode $ replicateM 10 . hGetChar shakeArgs…
Cactus
  • 27,075
  • 9
  • 69
  • 149
1
vote
1 answer

Recover the source file name in a Shake rule

I am writing a build system for a static website which works like this: for every file src/123-some-title.txt produce a file out/123.html My problem is that when writing the rule for out/*.html I have no direct way to recover the source file name…
Roman Cheplyaka
  • 37,738
  • 7
  • 72
  • 121
1
vote
1 answer

What is the equivalent of default: in Shake

I'm trying to use Shake as replacement for Make in small project. Currently it's mostly used for aliasing shell commands. Is there any way to specify default phony action? Something similar to default: in makefile. For example, given: phony "build"…
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
1
vote
1 answer

How to write compilation rules for a bootstrapping compiler

I want to write build rules for a self-hosted compiler. Taking the example of GHC, the GHC compiler is written in Haskell, and compiles Haskell. I want to first compile the source using an existing copy of the GHC compiler (phase1), then compile the…
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
1
vote
1 answer

How to define custom Rule in Shake: Development.Shake.Core is hidden

I am trying to use Shake which look very promising but I hit a small wall. I am quite new to haskell so maybe I am missing something obvious but here is my problem: I want to define a new kind of Rule in my shake program. This rule would compute a…
Cédric
  • 13
  • 2
0
votes
0 answers

Generalizing intermediate rules when they will only be used end-to-end on one target

I'm writing Shake build rules for some ultimate result _build/a.4. Let's say its direct dependency is _build/a.3, which in turn depends on _build/a.2, and so on to _build/a.1. I also have a rule which produces _build/a.1 in some "bespoke" manner. Is…
Cactus
  • 27,075
  • 9
  • 69
  • 149
0
votes
0 answers

Shake: depend on rules from Shakefile in subdirectory?

I've got a project that looks something like this: . ├── pyproject.toml ├── server.py ├── Shakefile.hs └── ui ├── index.ts └── Shakefile.hs ui/Shakefile.hs contains something to the effect of: import Development.Shake main = shakeArgs…
wbadart
  • 2,583
  • 1
  • 13
  • 27
0
votes
1 answer

need "ensure dependency is up to date"

I was watching Neil's discussing shake at ICFP. He mentions in the talk that the need function ensures that the dependency is "up to date". What does this mean exactly? Below is the code used in the talk: "Foo.o" *> \_ -> do need ["Foo.c"] …
Steven L.
  • 2,045
  • 3
  • 18
  • 23
0
votes
0 answers

Avoiding a rebuild if none of the dependencies have changed, but the output file has

I have a complicated setup where I generate a Vivado project file, and then run Vivado's synthesis tool to consume said project file and produce a bitfile. During this last step, Vivado updates some fields in the project file. Below is a…
Cactus
  • 27,075
  • 9
  • 69
  • 149
0
votes
1 answer

Why does Shake think this file has changed?

Full Shakefile.hs: import Development.Shake import Development.Shake.FilePath outDir = "_build" expensiveProcess :: IO () expensiveProcess = do putStrLn "expensiveProcess" writeFile (outDir "b") "b" main = shakeArgs shakeOptions{…
Cactus
  • 27,075
  • 9
  • 69
  • 149
0
votes
1 answer

is there a way of using this on an air gapped windows machine?

I've looked on shakebuild and it looks as though you have to have a haskell installation on a networked machine? (verbiage to placate so follows)
njamescouk
  • 127
  • 11
0
votes
1 answer

Why no `Action a -> Rules a` function

In Shake there is a way to run an Action from Rules: action :: Action a -> Rules () But I couldn't find a function which returns the result of the Action, namely: actionWithResult :: Action a -> Rules a How come?
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
1 2 3
8 9