Browse Source

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´.
Achim Gratz 6 years ago
parent
commit
e6228c448e
3 changed files with 15 additions and 4 deletions
  1. 1 0
      Makefile
  2. 9 2
      mk/default.mk
  3. 5 2
      mk/targets.mk

+ 1 - 0
Makefile

@@ -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)

+ 9 - 2
mk/default.mk

@@ -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)'

+ 5 - 2
mk/targets.mk

@@ -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