Skip to content

Commit

Permalink
Add recipes for generate-json
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Jun 4, 2024
1 parent 3b50cdd commit 8a093c8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,30 @@ $(KY)/%.cabal:

$(RW)/%.cabal:
dhall-hpack-cabal --package-dhall=$(@:.cabal=.dhall)

.PHONY: generate-json
generate-json: \
$(KY)/empty-inferred/package.json \
$(KY)/empty-package.json \
$(KY)/with-GHC2021.json \
$(KY)/when-dependencies.json \
$(KY)/import-relative/package.json \
$(KY)/import-local/package.json \
$(KY)/empty-inferred/package.json \
$(RW)/stack/stack.json \
$(RW)/hpack/hpack.json

$(KY)/empty-package.json:
dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@

$(KY)/when-dependencies.json:
dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@

$(KY)/with-GHC2021.json:
dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@

$(KY)/%/package.json:
cd $(@D) && dhall-hpack-json > $(@F)

$(RW)/%.json:
dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@

0 comments on commit 8a093c8

Please sign in to comment.