1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

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
This commit is contained in:
Achim Gratz 2011-11-13 11:53:12 +01:00
parent 510a51310b
commit 1e343f7f3b
6 changed files with 49 additions and 28 deletions

1
.gitignore vendored
View File

@ -36,6 +36,7 @@ org-*.zip
manual
org_dual_license.texi
ORGWEBPAGE/Changes.txt
local*.mk
# aspell word and replacement lists

View File

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

View File

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

View File

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

View File

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

View File

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