Skip to content

Commit

Permalink
example: simplify dependencies
Browse files Browse the repository at this point in the history
We can make tests directly depend on pre-clean.

Signed-off-by: Felipe Contreras <[email protected]>
  • Loading branch information
felipec committed Mar 20, 2023
1 parent 9f78e62 commit 636e6ce
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ RM ?= rm -f

T = $(sort $(wildcard *.t))

test: pre-clean
$(MAKE) and-cleanup
test: $(T)
$(MAKE) clean

$(T):
$(T): pre-clean
@echo "*** $@ ***"; '$(SHELL_PATH_SQ)' $@ $(TEST_OPTS)

pre-clean:
Expand All @@ -36,8 +36,4 @@ clean:
$(RM) -r "$${SHARNESS_TEST_OUTDIR-.}"/'trash directory'.*
$(RM) -r "$${SHARNESS_TEST_OUTDIR-.}"/test-results

and-cleanup: $(T)
$(MAKE) clean

.PHONY: test $(T) pre-clean clean
.PHONY: and-cleanup

0 comments on commit 636e6ce

Please sign in to comment.