org-e-ascii: Fix small bug
[org-mode/org-mode-NeilSmithlineMods.git] / targets.mk
bloba3413018825cceb41720620dbedc55fb323036ae
1 .NOTPARALLEL: .PHONY
2 # Additional distribution files
3 DISTFILES_extra= Makefile request-assign-future.txt contrib etc
4 .EXPORT_ALL_VARIABLES:
6 LISPDIRS = lisp
7 SUBDIRS = doc etc $(LISPDIRS)
8 INSTSUB = $(SUBDIRS:%=install-%)
9 ORG_MAKE_DOC ?= info html pdf
11 ifneq ($(wildcard .git),)
12 GITVERSION ?= $(shell git describe --abbrev=6 HEAD)
13 ORGVERSION ?= $(subst release_,,$(shell git describe --abbrev=0 HEAD))
14 GITSTATUS ?= $(shell git status -uno --porcelain)
15 else
16 GITVERSION ?= N/A
17 ORGVERSION ?= N/A
18 endif
19 DATE = $(shell date +%Y-%m-%d)
20 ifneq ($(GITSTATUS),)
21 GITVERSION := $(GITVERSION).dirty
22 endif
24 .PHONY: default all oldorg up2 update compile lisp doc etc \
25 check test install info html pdf card doc docs $(INSTSUB) \
26 autoloads cleanall clean cleancontrib cleanrel clean-install \
27 cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest
29 # backwards compatibility target
30 oldorg: compile autoloads info
32 all \
33 compile:: lisp
34 $(MAKE) -C $< clean
36 compile \
37 compile-dirty:: lisp
38 $(MAKE) -C $< $@
40 all \
41 clean-install::
42 $(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) $@;)
44 check test:: all
46 check test \
47 test-dirty::
48 -$(MKDIR) $(testdir)
49 TMPDIR=$(testdir) $(BTEST)
50 ifeq ($(TEST_NO_AUTOCLEAN),) # define this variable to leave $(testdir) around for inspection
51 $(MAKE) cleantest
52 endif
54 up2: update
55 $(SUDO) $(MAKE) install
57 update:
58 git remote update
59 git pull
60 $(MAKE) check
62 install: $(INSTSUB)
64 install-info: install-doc
66 doc docs: $(ORG_MAKE_DOC)
68 info html pdf card:
69 $(MAKE) -C doc $@
71 $(INSTSUB):
72 $(MAKE) -C $(@:install-%=%) install
74 autoloads: lisp
75 $(MAKE) -C $< $@
77 cleandirs:
78 $(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) cleanall;)
80 clean: cleanrel
81 $(MAKE) -C lisp clean
82 $(MAKE) -C doc clean
84 cleanall: cleandirs cleantest
85 -$(FIND) . -name \*~ -exec $(RM) {} \;
87 cleancontrib:
88 -$(FIND) contrib -name \*~ -exec $(RM) {} \;
90 cleanrel:
91 $(RMR) RELEASEDIR
92 $(RMR) org-7.*
93 $(RMR) org-7*zip org-7*tar.gz
95 cleanelc cleanlisp:
96 $(MAKE) -C lisp clean
97 -$(FIND) lisp -name \*~ -exec $(RM) {} \;
99 cleandoc cleandocs:
100 $(MAKE) -C doc clean
101 -$(FIND) doc -name \*~ -exec $(RM) {} \;
103 cleantest:
104 $(RMR) $(testdir)