introduce new make target "test"
Makefile: add help for target "test" default.mk: more sane location for local data, add $(BTEST) that will run the test in batch mode. Some tests require non-standard packages, introduce $(BTEST_EXTRA) in order to add options so they can be found. targets.mk: new target "test" that implies "all" and then runs all test. Hidden target "test-dirty" runs tests without doing compilation.
This commit is contained in:
parent
b323d9e5c3
commit
4a7ed95010
1
Makefile
1
Makefile
|
@ -26,6 +26,7 @@ targets help:
|
||||||
$(info make pdf - make pdf documentation)
|
$(info make pdf - make pdf documentation)
|
||||||
$(info make card - make refcards documentation)
|
$(info make card - make refcards documentation)
|
||||||
$(info )
|
$(info )
|
||||||
|
$(info make test - build org and run all test suite)
|
||||||
$(info make clean - clean Org ELisp and documentation files)
|
$(info make clean - clean Org ELisp and documentation files)
|
||||||
$(info make compile - cleanly compile Org ELisp files)
|
$(info make compile - cleanly compile Org ELisp files)
|
||||||
$(info make compile-dirty - compile Org ELisp without cleaning)
|
$(info make compile-dirty - compile Org ELisp without cleaning)
|
||||||
|
|
11
default.mk
11
default.mk
|
@ -12,7 +12,7 @@ prefix = /usr/share
|
||||||
lispdir = $(prefix)/emacs/site-lisp/org
|
lispdir = $(prefix)/emacs/site-lisp/org
|
||||||
|
|
||||||
# Where local data files go.
|
# Where local data files go.
|
||||||
datadir = $(lispdir)/etc
|
datadir = $(prefix)/emacs/etc/org
|
||||||
|
|
||||||
# Where info files go.
|
# Where info files go.
|
||||||
infodir = $(prefix)/info
|
infodir = $(prefix)/info
|
||||||
|
@ -22,9 +22,16 @@ infodir = $(prefix)/info
|
||||||
##----------------------------------------------------------------------
|
##----------------------------------------------------------------------
|
||||||
|
|
||||||
# Using emacs in batch mode.
|
# Using emacs in batch mode.
|
||||||
|
|
||||||
BATCH = $(EMACS) -batch -Q -L .
|
BATCH = $(EMACS) -batch -Q -L .
|
||||||
|
|
||||||
|
# run tests
|
||||||
|
BTEST = $(EMACS) -batch \
|
||||||
|
$(BTEST_EXTRA) \
|
||||||
|
-L lisp/ \
|
||||||
|
-l testing/org-test.el \
|
||||||
|
-eval "(setq org-confirm-babel-evaluate nil)" \
|
||||||
|
-f org-test-run-batch-tests
|
||||||
|
|
||||||
# How to byte-compile the whole source directory
|
# How to byte-compile the whole source directory
|
||||||
ELCDIR = $(BATCH) \
|
ELCDIR = $(BATCH) \
|
||||||
--eval '(defconst org-release "$(ORGVERSION)")' \
|
--eval '(defconst org-release "$(ORGVERSION)")' \
|
||||||
|
|
10
targets.mk
10
targets.mk
|
@ -21,8 +21,8 @@ ifneq ($(GITSTATUS),)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: default all up2 update compile lisp doc etc \
|
.PHONY: default all up2 update compile lisp doc etc \
|
||||||
install info html pdf card docs $(INSTSUB) \
|
test install info html pdf card docs $(INSTSUB) \
|
||||||
autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel
|
autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel clean-install
|
||||||
|
|
||||||
all \
|
all \
|
||||||
compile:: lisp
|
compile:: lisp
|
||||||
|
@ -36,6 +36,12 @@ all \
|
||||||
clean-install:: $(SUBDIRS)
|
clean-install:: $(SUBDIRS)
|
||||||
$(foreach dir, $?, $(MAKE) -C $(dir) $@;)
|
$(foreach dir, $?, $(MAKE) -C $(dir) $@;)
|
||||||
|
|
||||||
|
test:: all
|
||||||
|
|
||||||
|
test \
|
||||||
|
test-dirty::
|
||||||
|
$(BTEST)
|
||||||
|
|
||||||
up2: update
|
up2: update
|
||||||
sudo ${MAKE} install
|
sudo ${MAKE} install
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue