Skip to content

Commit

Permalink
fix: remove configure target for makefiles
Browse files Browse the repository at this point in the history
Signed-off-by: Drew Hess <[email protected]>
  • Loading branch information
dhess committed Dec 12, 2024
1 parent 5f92c09 commit 1917c33
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#
# This Makefile assumes you're using the `nix develop` shell.

build: configure
build:
cabal build all

project-targets = configure test bench haddock
project-targets = test bench haddock

$(project-targets):
cabal $@ all
Expand Down
7 changes: 2 additions & 5 deletions Makefile.wasm32
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ MAKE := $(MAKE) -f Makefile.wasm32

CABAL = wasm32-wasi-cabal

build: configure discover-tests
build: discover-tests
$(CABAL) build all

configure:
$(CABAL) configure all

test-targets = discover-tests test

$(test-targets):
Expand All @@ -35,4 +32,4 @@ clean:
$(CABAL) clean
$(MAKE) -C primer-miso clean

.PHONY: build configure $(test-targets) update clean
.PHONY: build $(test-targets) update clean
2 changes: 1 addition & 1 deletion docs/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For interactive development workflows, both with and without Nix, we
provide some convenient `Makefile` targets from the repository's top
level directory. For example:

* `make` runs `cabal configure all` followed by `cabal build all`.
* `make` runs `cabal build all`.

* `make test` runs `cabal test all`.

Expand Down
4 changes: 2 additions & 2 deletions makefiles/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Most commands assume you're running this from the top-level `nix
# develop` shell.

build: configure
build:
cabal build

package-targets = configure test haddock clean
package-targets = test haddock clean

$(package-targets):
cabal $@
Expand Down
7 changes: 2 additions & 5 deletions primer-api/Makefile.wasm32
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ CABAL = wasm32-wasi-cabal

primer-api-test-path = $(shell $(CABAL) list-bin -v0 test:primer-api-test)

build: configure discover-tests
build: discover-tests
$(CABAL) build

configure:
$(CABAL) configure

# test target is special because it requires wasmtime.
test: build
wasmtime --dir test::test "$(primer-api-test-path)"
Expand All @@ -23,4 +20,4 @@ clean:
$(CABAL) clean
rm -f test/TestsWasm32.hs

.PHONY: build configure test discover-tests clean
.PHONY: build test discover-tests clean
7 changes: 2 additions & 5 deletions primer-miso/Makefile.wasm32
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

CABAL = wasm32-wasi-cabal

build: configure
build:
$(CABAL) build

frontend: build
Expand All @@ -16,11 +16,8 @@ frontend-prod: build
serve-frontend: frontend
simple-http-server -i -p 8000 -- dist

configure:
$(CABAL) configure

clean:
$(CABAL) clean
rm -rf dist/

.PHONY: build configure clean
.PHONY: build clean
7 changes: 2 additions & 5 deletions primer/Makefile.wasm32
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ CABAL = wasm32-wasi-cabal

primer-test-path = $(shell $(CABAL) list-bin -v0 test:primer-test)

build: configure discover-tests
build: discover-tests
$(CABAL) build

configure:
$(CABAL) configure

# test target is special because it requires wasmtime.
test: build
wasmtime --dir test::test "$(primer-test-path)"
Expand All @@ -23,4 +20,4 @@ clean:
$(CABAL) clean
rm -f test/TestsWasm32.hs

.PHONY: build configure test discover-tests clean
.PHONY: build test discover-tests clean

0 comments on commit 1917c33

Please sign in to comment.