Meta: Update makem.sh, Makefile

This commit is contained in:
Adam Porter 2019-09-09 09:00:56 -05:00
parent 7cdc134f0d
commit 91771c41e6
2 changed files with 9 additions and 12 deletions

View file

@ -13,11 +13,5 @@ endif
# * Rules # * Rules
# Unless/until I add Cask support to makem.sh, I'm keeping this,
# because Cask lets me run the tests with a different version of Org
# than I have installed personally.
cask:
@cask exec buttercup -L .
%: %:
@./makem.sh $(VERBOSE) $(@) @./makem.sh $(VERBOSE) $(@)

View file

@ -272,6 +272,7 @@ function debug {
function error { function error {
echo_color red "ERROR ($(ts)): $@" >&2 echo_color red "ERROR ($(ts)): $@" >&2
((errors++)) ((errors++))
return 1
} }
function die { function die {
error "$@" error "$@"
@ -353,7 +354,11 @@ function all {
} }
function compile { function compile {
[[ $compile ]] || return 0
unset compile # Only compile once.
verbose 1 "Compiling..." verbose 1 "Compiling..."
debug "Byte-compile files: ${project_byte_compile_files[@]}"
batch-byte-compile "${project_byte_compile_files[@]}" \ batch-byte-compile "${project_byte_compile_files[@]}" \
&& success "Compiling finished without errors." \ && success "Compiling finished without errors." \
@ -409,6 +414,8 @@ function tests {
} }
function test-buttercup { function test-buttercup {
compile || die "Compilation required for tests."
verbose 1 "Running Buttercup tests..." verbose 1 "Running Buttercup tests..."
local buttercup_file="$(elisp-buttercup-file)" local buttercup_file="$(elisp-buttercup-file)"
@ -423,14 +430,10 @@ function test-buttercup {
} }
function test-ert { function test-ert {
# Run ERT tests. compile || die "Compilation required for tests."
debug "Test files: ${project_test_files[@]}"
debug "Byte-compile files: ${project_byte_compile_files[@]}"
debug "Compile: $compile"
[[ $compile ]] && compile
verbose 1 "Running ERT tests..." verbose 1 "Running ERT tests..."
debug "Test files: ${project_test_files[@]}"
run_emacs \ run_emacs \
$(load-files-args "${project_test_files[@]}") \ $(load-files-args "${project_test_files[@]}") \