move all version strings into org-install.el
[org-mode.git] / targets.mk
blobab333a2b3ef281302b539681d00f4a320969b969
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 $(LISPDIRS)
8 INSTSUB = $(SUBDIRS:%=install-%)
10 GITVERSION = $(shell git describe --abbrev=6 HEAD)
11 ORGVERSION = $(subst release_,,$(shell git describe --abbrev=0 HEAD))
12 GITSTATUS = $(shell git status -uno --porcelain)
13 DATE = $(shell date +%Y-%m-%d)
14 ifneq ("$(GITSTATUS)", "")
15 GITVERSION := $(GITVERSION).dirty
16 endif
18 .PHONY: default all up2 update compile lisp doc \
19 install info html pdf card docs $(INSTSUB) \
20 autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel
22 compile:: lisp
23 $(MAKE) -C $< clean
25 compile \
26 compile-dirty:: lisp
27 $(MAKE) -C $< $@
29 all \
30 clean-install: $(SUBDIRS)
31 $(foreach dir, $?, $(MAKE) -C $(dir) $@;)
33 up2: update
34 sudo ${MAKE} install
36 update:
37 git pull
38 ${MAKE} clean
39 ${MAKE} all
41 install: $(INSTSUB)
43 install-info: install-doc
45 docs: info html pdf card
47 info html pdf card:
48 $(MAKE) -C doc $@
50 $(INSTSUB):
51 $(MAKE) -C $(@:install-%=%) install
53 autoloads: lisp maint.mk
54 $(MAKE) -C $< $@
56 cleanall: $(SUBDIRS)
57 $(foreach dir, $?, $(MAKE) -C $(dir) $@;)
58 -$(FIND) . -name \*~ -exec $(RM) {} \;
60 clean: cleanrel
61 $(MAKE) -C lisp clean
62 $(MAKE) -C doc clean
63 -$(FIND) . -name \*~ -exec $(RM) {} \;
65 cleancontrib:
66 -$(FIND) contrib -name \*~ -exec $(RM) {} \;
68 cleanrel:
69 $(RMR) RELEASEDIR
70 $(RMR) org-7.*
71 $(RMR) org-7*zip org-7*tar.gz