Commit 49e11c49 authored by Iustin Pop's avatar Iustin Pop

Some more changes to Makefile.am for htools

I duplicate the BINARY= rule in the ghc invocation in order to be able
to silence the if, which was confusing.

Additionally, a new target for running just the htools unit-tests is
provided.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 10028866
...@@ -450,15 +450,14 @@ $(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile ...@@ -450,15 +450,14 @@ $(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
echo "Error: htools compilation disabled at configure time" 1>&2 ;\ echo "Error: htools compilation disabled at configure time" 1>&2 ;\
exit 1; \ exit 1; \
fi fi
BINARY=$(@:htools/%=%); \ @BINARY=$(@:htools/%=%); \
if [ "$$BINARY" = "test" ] && [ -z "$(GHC_PKG_QUICKCHECK)" ]; then \ if [ "$BINARY" = "test" ] && [ -z "$(GHC_PKG_QUICKCHECK)" ]; then \
echo "Error: cannot run unittests without the QuickCheck library (see devnotes.rst)" 1>&2; \ echo "Error: cannot run unittests without the QuickCheck library (see devnotes.rst)" 1>&2; \
exit 1; \ exit 1; \
fi; \ fi
$(GHC) --make \ BINARY=$(@:htools/%=%); $(GHC) --make \
$(HFLAGS) $(HEXTRA) $(HTOOLS_NOCURL) \ $(HFLAGS) $(HEXTRA) $(HTOOLS_NOCURL) \
-osuf $$BINARY.o -hisuf $$BINARY.hi \ -osuf $$BINARY.o -hisuf $$BINARY.hi $@
$@
# for the htools/test binary, we need to enable profiling/coverage # for the htools/test binary, we need to enable profiling/coverage
htools/test: HEXTRA=-fhpc -Wwarn -fno-warn-missing-signatures \ htools/test: HEXTRA=-fhpc -Wwarn -fno-warn-missing-signatures \
...@@ -981,6 +980,11 @@ check-local: check-dirs ...@@ -981,6 +980,11 @@ check-local: check-dirs
$(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS $(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS
$(CHECK_NEWS) < $(top_srcdir)/NEWS $(CHECK_NEWS) < $(top_srcdir)/NEWS
.PHONY: hs-check
hs-check: htools/test
@rm -f test.tix
./htools/test
.PHONY: lint .PHONY: lint
lint: $(BUILT_SOURCES) lint: $(BUILT_SOURCES)
@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; } @test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment