From 39a9efa21e48de96860c8414e847b2840162ad0f Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Tue, 4 Jun 2024 07:35:02 -0400 Subject: [PATCH] WIP Revert "WIP" This reverts commit 6ac21afd9e2a1d9f5ce69a83106b93a3b03782b5. --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..128b061 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +delete-golden: + find test-suite-golden -name "*.golden" -type f -delete + +delete-generated: + find test-suite-golden -type f | grep -E ".*\.(cabal|json|yaml)" | xargs rm + +# Hpack +test-suite-golden/test-files/real-world/hpack/hpack.yaml.cabal: + dhall-hpack-cabal --package-dhall=$(@:.yaml.cabal=.dhall) + +test-suite-golden/test-files/real-world/hpack/hpack.json: + dhall-hpack-json --package-dhall=$(@:.json=.dhall) > $@ + +test-suite-golden/test-files/real-world/hpack/hpack.yaml: + dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ + +# Stack +test-suite-golden/test-files/real-world/stack/package.yaml: $(@:.yaml=.dhall) + dhall-hpack-yaml --package-dhall=$< > $@ + +test-suite-golden/test-files/real-world/stack/stack.cabal: + dhall-hpack-cabal --package-dhall=$(@:.yaml.cabal=.dhall) + +test-suite-golden/test-files/real-world/stack/stack.yaml: + dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall) > $@ + +test-suite-golden/test-files/real-world/stack/stack.yaml.cabal: \ + test-suite-golden/test-files/real-world/stack/stack.yaml + hpack --package-yaml=$< + +test-suite-golden/test-files/real-world/stack/stack.json: + dhall-hpack-json --package-dhall=$(@:.json=.dhall) + +test-suite-golden/test-files/real-world/stack/stack.yaml: + dhall-hpack-yaml --package-dhall=$(@:.yaml=.dhall)