Skip to content

Commit

Permalink
update test Makefiles in the style of latest nhm-tool (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyokha committed Apr 12, 2024
1 parent 6fd0618 commit fc1dec4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion test/Aggregate/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ifeq ($(INPLACE),1)
$(GHCENV)
endif
sed -i 's/\(^package-id \)/--\1/' $(GHCENV)
if ! command -v $(NHMTOOL) >/dev/null; then \
if test "$(NHMTOOL)" = nhm-tool && ! command -v nhm-tool >/dev/null; \
then \
PATH=$$(dirname \
$$(cabal list-bin $(PKGDISTR) --builddir="$(BUILDDIR)")):$$PATH; \
fi; \
Expand Down
3 changes: 2 additions & 1 deletion test/EDE/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ifeq ($(INPLACE),1)
$(GHCENV)
endif
sed -i 's/\(^package-id \)/--\1/' $(GHCENV)
if ! command -v $(NHMTOOL) >/dev/null; then \
if test "$(NHMTOOL)" = nhm-tool && ! command -v nhm-tool >/dev/null; \
then \
PATH=$$(dirname \
$$(cabal list-bin $(PKGDISTR) --builddir="$(BUILDDIR)")):$$PATH; \
fi; \
Expand Down
3 changes: 2 additions & 1 deletion test/PCRE/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ifeq ($(INPLACE),1)
$(GHCENV)
endif
sed -i 's/\(^package-id \)/--\1/' $(GHCENV)
if ! command -v $(NHMTOOL) >/dev/null; then \
if test "$(NHMTOOL)" = nhm-tool && ! command -v nhm-tool >/dev/null; \
then \
PATH=$$(dirname \
$$(cabal list-bin $(PKGDISTR) --builddir="$(BUILDDIR)")):$$PATH; \
fi; \
Expand Down
3 changes: 2 additions & 1 deletion test/Prometheus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ifeq ($(INPLACE),1)
$(GHCENV)
endif
sed -i 's/\(^package-id \)/--\1/' $(GHCENV)
if ! command -v $(NHMTOOL) >/dev/null; then \
if test "$(NHMTOOL)" = nhm-tool && ! command -v nhm-tool >/dev/null; \
then \
PATH=$$(dirname \
$$(cabal list-bin $(PKGDISTR) --builddir="$(BUILDDIR)")):$$PATH; \
fi; \
Expand Down
3 changes: 2 additions & 1 deletion test/Resolve/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ifeq ($(INPLACE),1)
$(GHCENV)
endif
sed -i 's/\(^package-id \)/--\1/' $(GHCENV)
if ! command -v $(NHMTOOL) >/dev/null; then \
if test "$(NHMTOOL)" = nhm-tool && ! command -v nhm-tool >/dev/null; \
then \
PATH=$$(dirname \
$$(cabal list-bin $(PKGDISTR) --builddir="$(BUILDDIR)")):$$PATH; \
fi; \
Expand Down
3 changes: 2 additions & 1 deletion test/ServiceHookAdaptor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ifeq ($(INPLACE),1)
$(GHCENV)
endif
sed -i 's/\(^package-id \)/--\1/' $(GHCENV)
if ! command -v $(NHMTOOL) >/dev/null; then \
if test "$(NHMTOOL)" = nhm-tool && ! command -v nhm-tool >/dev/null; \
then \
PATH=$$(dirname \
$$(cabal list-bin $(PKGDISTR) --builddir="$(BUILDDIR)")):$$PATH; \
fi; \
Expand Down
3 changes: 2 additions & 1 deletion test/Subrequest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ifeq ($(INPLACE),1)
$(GHCENV)
endif
sed -i 's/\(^package-id \)/--\1/' $(GHCENV)
if ! command -v $(NHMTOOL) >/dev/null; then \
if test "$(NHMTOOL)" = nhm-tool && ! command -v nhm-tool >/dev/null; \
then \
PATH=$$(dirname \
$$(cabal list-bin $(PKGDISTR) --builddir="$(BUILDDIR)")):$$PATH; \
fi; \
Expand Down

0 comments on commit fc1dec4

Please sign in to comment.