Skip to content

Fix testing #448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,23 @@ ELCHECKS=$(addprefix check-, $(ELFILES:.el=))

%.elc: %.el
@$(BATCH) \
-f batch-byte-compile $<
--eval "(setq byte-compile-error-on-warn t)" \
-f batch-byte-compile $*.el

.PHONY: all compile info clean check $(ELCHECKS) elpa package

all: compile $(AUTOLOADS) info

compile: $(ELCFILES)

$(ELCHECKS): check-%: %.el
$(ELCHECKS): check-%: %.el %.elc
@$(BATCH) --eval '(when (check-declare-file "$*.el") (error "check-declare failed"))'
@$(BATCH) \
--eval "(setq byte-compile-error-on-warn t)" \
-f batch-byte-compile $*.el
@$(RM) $*.elc
@if [ -f "$(<:%.el=tests/%-tests.el)" ]; then \
if $(BATCH) --eval "(require 'ert)" 2> /dev/null; then \
echo; \
$(BATCH) -l "$(<:%.el=tests/%-tests.el)" -f ert-run-tests-batch-and-exit; \
else \
echo "ERT not available, skipping unit tests"; \
fi; \
fi
@echo "--"

check: clean $(ELCHECKS)
check: $(ELCHECKS)
@echo "checks passed!"

clean:
Expand Down