diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2011-11-13 11:53:12 +0100 |
---|---|---|
committer | Achim Gratz <Stromeko@Stromeko.DE> | 2012-04-20 21:04:10 +0200 |
commit | 1e343f7f3bac8e1436f3b1fa5acfe7f8b2b5ccec (patch) | |
tree | 3c09647344590453196aba284e3a7da62f752ad8 | |
parent | 510a51310bb13c7ef8d0a05eb0a25ef2fe2722d0 (diff) | |
download | org-mode-1e343f7f3bac8e1436f3b1fa5acfe7f8b2b5ccec.tar.gz |
update target descriptions, target "all" now automatically cleans .elc before compilation
* targets.mk: target "all" for lisp directory does now the same as
"compile", i.e. it cleans .elc file first
* Makefile: describe all targets and re-arrange the target groups
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 32 | ||||
-rw-r--r-- | default.mk | 11 | ||||
-rw-r--r-- | lisp/Makefile | 29 | ||||
-rw-r--r-- | lisp/org.el | 1 | ||||
-rw-r--r-- | targets.mk | 3 |
6 files changed, 49 insertions, 28 deletions
@@ -36,6 +36,7 @@ org-*.zip manual org_dual_license.texi ORGWEBPAGE/Changes.txt +local*.mk # aspell word and replacement lists @@ -8,24 +8,32 @@ .PHONY: targets help targets help: $(info ) - $(info make - show this help) + $(info make - show this help) + $(info make all - cleanly compile Org ELisp files and documentation) $(info ) - $(info make clean - clean Elisp and documentation files) - $(info make all - compile Org ELisp files and documentation) + $(info Installation) + $(info ============) + $(info make install - install Org, both ELisp and Info files) + $(info make install-lisp - install Org, only ELisp files) + $(info make install-info - install Org, only Info file) $(info ) - $(info make docs - make all documentation) - $(info make info - make Info documentation) - $(info make html - make HTML documentation) - $(info make pdf - make pdf documentation) - $(info make card - make refcards documentation) + $(info Maintenance) + $(info ===========) + $(info make docs - make all documentation) + $(info make info - make Info documentation) + $(info make html - make HTML documentation) + $(info make pdf - make pdf documentation) + $(info make card - make refcards documentation) $(info ) - $(info make install - install Org, both ELisp and Info files) - $(info make install-lisp - install Org ELisp files) - $(info make install-info - install Org Info file) + $(info make clean - clean Org ELisp and documentation files) + $(info make compile - cleanly compile Org ELisp files) + $(info make compile-dirty - compile Org ELisp without cleaning) + $(info ) + $(info make clean-install - remove installed Org ELisp and documentation files) @echo "" include default.mk --include local.mk +-include local.mk # optional local customization include maint.mk include targets.mk include maint-targets.mk @@ -20,11 +20,14 @@ infodir = $(prefix)/info # Using emacs in batch mode. -BATCH = $(EMACS) -batch -q -no-site-file -eval \ - "(setq load-path (cons (expand-file-name \".\") \ - (cons \"$(lispdir)\" load-path)))" +BATCH = $(EMACS) -batch -Q -L . -# Specify the byte-compiler for compiling org-mode files +# How to byte-compile the whole source directory +ELCDIR = $(BATCH) \ + --eval '(defconst org-release "$(ORGVERSION)")' \ + --eval '(batch-byte-recompile-directory 0)' + +# How to byte-compile a single source file ELC = $(BATCH) -f batch-byte-compile # How to make a pdf file from a texinfo file diff --git a/lisp/Makefile b/lisp/Makefile index ac3445f..4aa0226 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -1,3 +1,15 @@ +ORG-INSTALL = $(BATCH) \ + --eval "(require 'autoload)" \ + --eval '(find-file "$(LISPO)")' \ + --eval '(erase-buffer)' \ + --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \ + --eval '(insert "\n(provide (quote org-install))\n")' \ + --eval '(insert "\n(defconst org-release \"$(ORGVERSION)\"\n \"The release version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \ + --eval '(insert "\n(defconst org-git-version \"$(GITVERSION)\"\n \"The Git version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \ + --eval '(save-buffer)' +-include local.mk # optional local customization + +.NOTPARALLEL: # always run this make serially .SUFFIXES: # we don't need default suffix rules ifeq ($(MAKELEVEL), 0) $(error This make needs to be started as a sub-make from the toplevel directory.) @@ -11,21 +23,13 @@ LISPC = $(LISPF:%el=%elc) all \ compile \ -compile-dirty: - $(BATCH) --eval '(batch-byte-recompile-directory 0)' +compile-dirty: cleanauto + $(ELCDIR) autoloads: $(LISPO) org-install.el: $(LISPF) - $(BATCH) \ - --eval "(require 'autoload)" \ - --eval '(find-file "$(LISPO)")' \ - --eval '(erase-buffer)' \ - --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \ - --eval '(insert "\n(provide (quote org-install))\n")' \ - --eval '(insert "\n(defconst org-release \"$(ORGVERSION)\"\n \"The release version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \ - --eval '(insert "\n(defconst org-git-version \"$(GITVERSION)\"\n \"The Git version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \ - --eval '(save-buffer)' + $(ORG-INSTALL) install: $(LISPF) compile autoloads if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ; @@ -34,6 +38,9 @@ install: $(LISPF) compile autoloads clean: $(RM) *.elc +cleanauto: + $(RM) $(LISPO) $(LISPO:%el=%elc) + cleanall: $(RM) *.elc $(LISPO) diff --git a/lisp/org.el b/lisp/org.el index 1380148..8add2f1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -209,6 +209,7 @@ identifier." ;;; Version +(defvaralias 'org-version 'org-release) ;;;###autoload (defun org-version (&optional here) "Show the org-mode version in the echo area. @@ -19,6 +19,7 @@ endif install info html pdf card docs $(INSTSUB) \ autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel +all \ compile:: lisp $(MAKE) -C $< clean @@ -27,7 +28,7 @@ compile-dirty:: lisp $(MAKE) -C $< $@ all \ -clean-install: $(SUBDIRS) +clean-install:: $(SUBDIRS) $(foreach dir, $?, $(MAKE) -C $(dir) $@;) up2: update |