clean up the code implementing reads of irregular data into R
[org-mode/org-mode-NeilSmithlineMods.git] / targets.mk
blobe208ad750e0468aeb232af2b87bd9cc126cd614b
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: all oldorg update update2 up0 up1 up2 compile $(SUBDIRS) \
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 \
28 compile compile-dirty
30 oldorg: compile autoloads info # what the old makefile did when no target was specified
31 refcard: card
32 update update2:: up0 all
34 .PRECIOUS: local.mk
35 local.mk:
36 $(info ==========================================)
37 $(info Created a local.mk template.)
38 $(info Please adapt local.mk to your local setup!)
39 $(info ==========================================)
40 -@$(SED) -n \
41 -e '/-8<-/,/->8-/ {s/^\(\s*[^#]\)/#\1/;p}' \
42 -e '$$ i ## See default.mk for further configuration options.' \
43 default.mk > $@
45 all \
46 compile:: lisp
47 $(MAKE) -C $< clean
49 compile \
50 compile-dirty:: lisp
51 $(MAKE) -C $< $@
53 all \
54 clean-install::
55 $(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) $@;)
57 check test:: all
59 check test \
60 test-dirty::
61 -$(MKDIR) $(testdir)
62 TMPDIR=$(testdir) $(BTEST)
63 ifeq ($(TEST_NO_AUTOCLEAN),) # define this variable to leave $(testdir) around for inspection
64 $(MAKE) cleantest
65 endif
67 up0 up1 up2::
68 git remote update
69 git pull
70 up1 up2:: all
71 $(MAKE) test-dirty
72 up2 update2::
73 $(SUDO) $(MAKE) install
75 install: $(INSTSUB)
77 install-info: install-doc
79 doc docs: $(ORG_MAKE_DOC)
81 info html pdf card:
82 $(MAKE) -C doc $@
84 $(INSTSUB):
85 $(MAKE) -C $(@:install-%=%) install
87 autoloads: lisp
88 $(MAKE) -C $< $@
90 cleandirs:
91 $(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) cleanall;)
93 clean: cleanrel
94 $(MAKE) -C lisp clean
95 $(MAKE) -C doc clean
97 cleanall: cleandirs cleantest cleancontrib
98 -$(FIND) . -name \*~ -exec $(RM) {} \;
100 cleancontrib:
101 -$(FIND) contrib -name \*~ -exec $(RM) {} \;
103 cleanrel:
104 $(RMR) RELEASEDIR
105 $(RMR) org-7.*
106 $(RMR) org-7*zip org-7*tar.gz
108 cleanelc cleanlisp:
109 $(MAKE) -C lisp clean
110 -$(FIND) lisp -name \*~ -exec $(RM) {} \;
112 cleandoc cleandocs:
113 $(MAKE) -C doc clean
114 -$(FIND) doc -name \*~ -exec $(RM) {} \;
116 cleantest:
117 $(RMR) $(testdir)