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
2
votes
2 answers

shake: dependency on shared library that is built internally in the project

In my project, I want to build a shared library libfoo.so first, then build some test programs that use this shared library. For the test programs, if I use need need libfoo.so then they will be rebuilt every time libfoo.so is updated. Instead, I…
haucheefa
  • 23
  • 5
2
votes
2 answers

Using `FilePattern`/wildcards in the Shake functions `want` and `need`

The functions want and need both require that their input is of type FilePath rather than FilePattern. The filenames of my outputs and inputs follow a distinct pattern, outputs are _build/*checker.sh and the inputs are of ./*.py. Therefore I would…
Henk
  • 369
  • 3
  • 9
2
votes
1 answer

How to do build variants in shake?

How can pass parameters in shake and then use them in our rules? I would like to make some equivalents of: make ARCH=x86_64 or make DEBUG=YES etc... For now i've been using enviroment variables and getEnv function to simulate these. How can i make…
Fr0stBit
  • 1,455
  • 1
  • 13
  • 22
2
votes
1 answer

How to show progress in Shake?

I am trying to figure out how can i take the progress info from a Progress type (in Development.Shake.Progress) to output it before executing a command. The possible desired output would be: [1/9] Compiling src/Window/Window.cpp [2/9] Compiling…
Fr0stBit
  • 1,455
  • 1
  • 13
  • 22
2
votes
1 answer

Why does Shake not provide a MonadMask instance for Action?

I would like to use the temporary package with Shake, but that requires Action to have an instance for MonadMask, which is missing. Why does Shake not provide such an instance?
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
2
votes
1 answer

Dynamically generating Rules from the content of an (Action a)

I'm currently testing porting our build system from make to shake and have hit a roadblock: Given the following project structure: static/a.js static/b.coffee build/a.js build/b.js That is, various input extensions map to identical output…
Christophe Biocca
  • 3,388
  • 1
  • 23
  • 24
2
votes
1 answer

How should I interpolate environment variables in Shake file patterns?

In my Makefiles, I prefer having the output directory defined by a environment variable rather than hard-coded (with some reasonable default value if its unset). For example, a Make rule would look like $(OUTPUT_DIR)/some_file: deps #build…
Lane
  • 23
  • 2
2
votes
1 answer

Generating Shake Rules from Actions

I would like find all of the 'Makefiles' in my project and then generate Rules based them. However, it looks like (purposely) nothing can escape an Action. So, Instead I lifted my 'Makefile' scanner to the IO operation before the shake…
Ted
  • 14,465
  • 6
  • 28
  • 28
2
votes
1 answer

How to output /p:Platform="Any CPU" as quoted from shake cmd?

I'm using cmd from Shake and having trouble forming the following command line ... msbuild a.sln /p:Configuration=Debug /p:Platform="Any CPU" When I try escaping the double quote, the escaping and string quoting flows too far and get this error…
philderbeast
  • 267
  • 2
  • 8
1
vote
1 answer

Small binary Shake executable

Is there a way to use Shake using a small binary executable without pulling ghc ? We love Shake but we cannot ask our user to install ghc. As a nix user, could building a static Haskell executable work ? Ideally I would love to just grab the binary…
Pierre R
  • 216
  • 1
  • 7
1
vote
0 answers

Shake update of index files after changes

I use the shake build system and watch to keep files for a web site current. I cannot understand how to assure that an index file for a directory is changed when a file in the directory changes. The index file for a directory lists all the files in…
user855443
  • 2,596
  • 3
  • 25
  • 37
1
vote
1 answer

How can I get Shake to print errors only once?

If I ever have an error during a build, I see it twice # ghc (for _build/lib/WCLoan.o) # ghc (for _build/lib/WCLoan.o) [2 of 2] Compiling WCLoan ( src/WCLoan.hs, _build/lib/WCLoan.o ) src/WCLoan.hs:18:1: error: Parse error: module…
lbseale
  • 33
  • 4
1
vote
1 answer

How to allocate PTY using Shake?

I'm trying to run a command interactively from my build script: #!/usr/bin/env stack {- stack script --resolver lts-18.8 --ghc-options -Wall -} import Development.Shake main :: IO () main = shakeArgs shakeOptions $ do phony "cfg" $ do …
carbolymer
  • 1,439
  • 1
  • 15
  • 30
1
vote
1 answer

Is it possible to depend on an in-memory value (instead of a file) in shake-build?

I'm writing a static site builder using shake and am trying to implement an efficient way of persisting the site's navigation (along with some metadata for each page). This is turning out to be more complex than I imagined: The site-metadata is a…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
1
vote
1 answer

"One-way" dependencies in shake-build?

My brain might be fried right now (have been hacking on this Shakefile for 3 days straight), but I just can't figure out how to express a "one-way" dependency in Shake? I am building (generating) hundreds of HTML files, and for them to work…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
1 2 3
8 9