Makefile: implement target config-version

* mk/targets.mk: Implement target `config-version´ to show the version
  of Org from both make's and Emacs' perspective.  Run that target at
  the end of all `config-*´ targets.

* mk/default.mk: Add SHOWVER with the appropriate invocation of emacs
  to output the Org version.

* Makefile: Document new target `config-version´ in `helpall´.
This commit is contained in:
Achim Gratz 2012-09-29 10:47:40 +02:00
parent d88344d291
commit e6228c448e
3 changed files with 15 additions and 4 deletions

View File

@ -49,6 +49,7 @@ helpall::
help helpall::
$(info make config - check main configuration)
helpall::
$(info make config-version - check Org version)
$(info make config-test - check test configuration)
$(info make config-exe - check executables configuration)
$(info make config-cmd - check command configuration)

View File

@ -67,9 +67,16 @@ BTEST = $(BATCH) \
# BATCH = $(EMACS) -batch -vanilla # XEmacs
BATCH = $(EMACS) -batch -Q
# Emacs must be started in toplevel directory
BATCHO = $(BATCH) \
--eval '(add-to-list '"'"'load-path "./lisp")'
# How to show Org version
SHOWVER = $(BATCHO) \
--eval '(org-version nil '"'"'full '"'"'message)'
# How to generate local.mk
MAKE_LOCAL_MK = $(BATCH) \
--eval '(add-to-list '"'"'load-path "./lisp")' \
MAKE_LOCAL_MK = $(BATCHO) \
--eval '(load "org-compat.el")' \
--eval '(load "../mk/org-fixup.el")' \
--eval '(org-make-local-mk)'

View File

@ -31,7 +31,7 @@ endif
clean-install cleanelc cleandirs cleanaddcontrib \
cleanlisp cleandoc cleandocs cleantest \
compile compile-dirty uncompiled \
config config-test config-exe config-all config-eol
config config-test config-exe config-all config-eol config-version
CONF_BASE = EMACS DESTDIR ORGCM ORG_MAKE_DOC
CONF_DEST = lispdir infodir datadir testdir
@ -64,7 +64,10 @@ config-cmd config-all::
$(info )
$(info ========= Commands used by make)
$(foreach var,$(CONF_CALL),$(info $(var) = $($(var))$(EOL)))
config config-test config-exe config-all::
config config-test config-exe config-all config-version::
$(info ========= Org version)
$(info make: Org-mode version $(ORGVERSION) ($(GITVERSION) => $(lispdir)))
@echo -n "emacs: " ; $(SHOWVER)
@echo ""
oldorg: compile info # what the old makefile did when no target was specified