branch: master commit eda515d20906e2599f6fa90dab0f261b53c501f8 Author: Ian D <du...@gnu.org> Commit: Ian D <du...@gnu.org>
Added check and local settings to Makefile --- .bzrignore | 3 ++- Makefile | 29 ++++++++++++++++++++++++++++- Makefile => defaults.mk | 25 +++++-------------------- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/.bzrignore b/.bzrignore index 016d3b1..507633b 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1 +1,2 @@ -*.elc \ No newline at end of file +*.elc +local.mk \ No newline at end of file diff --git a/Makefile b/Makefile index 74e079a..0b504f9 100644 --- a/Makefile +++ b/Makefile @@ -15,11 +15,19 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -EMACS=emacs --batch +# Load defaults +include defaults.mk + +# Load local definitions +include local.mk + +EMACS=$(emacs) --batch -L $(org_path) ALLSRC=org-edna.el SOURCE=$(ALLSRC) TARGET=$(patsubst %.el,%.elc,$(SOURCE)) +.PHONY: clean check local.mk help + all: $(TARGET) compile: $(TARGET) @@ -39,3 +47,22 @@ org-edna-autoloads.el: clean: -rm -f *.elc + +check: + @$(EMACS) \ + -L "." \ + --load "ert" \ + --load "org-edna-tests.el" \ + -f ert-run-tests-batch-and-exit + +local.mk: + @cp -n defaults.mk local.mk + +help: + $(info ) + $(info make all - Default) + $(info make compile - Compile Emacs Lisp Files) + $(info make autoloads - Generate Autoloads) + $(info make clean - Remove generated .elc files) + $(info make check - Run Tests) + @echo "" diff --git a/Makefile b/defaults.mk similarity index 63% copy from Makefile copy to defaults.mk index 74e079a..aed4ab3 100644 --- a/Makefile +++ b/defaults.mk @@ -15,27 +15,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -EMACS=emacs --batch -ALLSRC=org-edna.el -SOURCE=$(ALLSRC) -TARGET=$(patsubst %.el,%.elc,$(SOURCE)) +emacs = emacs -all: $(TARGET) +prefix = /usr/share -compile: $(TARGET) +org_path = $(prefix)/emacs/site-lisp/org -%.elc: %.el - @$(EMACS) \ - -L "." \ - -f batch-byte-compile $< +info_dir = $(prefix)/info -autoloads: org-edna-autoloads.el - -org-edna-autoloads.el: - @$(EMACS) \ - --eval "(require 'package)" \ - --eval "(setq inhibit-message t)" \ - --eval "(package-generate-autoloads \"org-edna\" \"$$(pwd)\")" - -clean: - -rm -f *.elc +lisp_dir = $(prefix)/emacs/site-lisp/