3 # Additional distribution files
4 DISTFILES_extra
= Makefile request-assign-future.txt contrib etc
8 SUBDIRS
= $(OTHERDIRS
) $(LISPDIRS
)
9 INSTSUB
= $(SUBDIRS
:%=install-
%)
10 ORG_MAKE_DOC ?
= info html pdf
12 ifneq ($(wildcard .git
),)
13 GITVERSION ?
= $(shell git describe
--abbrev
=6 HEAD
)
14 ORGVERSION ?
= $(subst release_
,,$(shell git describe
--abbrev
=0 HEAD
))
15 GITSTATUS ?
= $(shell git status
-uno
--porcelain
)
20 DATE
= $(shell date
+%Y-
%m-
%d
)
22 GITVERSION
:= $(GITVERSION
:.dirty
=).dirty
25 .PHONY
: all oldorg update update2 up0 up1 up2 compile
$(SUBDIRS
) \
26 check test install info html pdf card doc docs
$(INSTSUB
) \
27 autoloads cleanall
clean cleancontrib cleanutils cleanrel clean-install \
28 cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest
29 compile compile-dirty uncompiled
31 oldorg
: compile
info # what the old makefile did when no target was specified
32 uncompiled
: cleanlisp autoloads
# for developing
34 update update2
:: up0
all
38 $(info ======================================================)
39 $(info = Invoke
"make help" for a synopsis of make targets.
=)
40 $(info = Created a default local.mk template.
=)
41 $(info = Setting
"oldorg" as the default target.
=)
42 $(info = Please adapt local.mk to your local setup
! =)
43 $(info ======================================================)
45 -e
'1 i ## Remove the following line to make "all" the default target' \
47 -e
'/-8<-/,/->8-/ {s/^\(\s*[^#]\)/#\1/;p}' \
48 -e
'$$ i ## See default.mk for further configuration options.' \
51 all compile
:: doc lisp
53 compile compile-dirty
:: lisp
56 $(foreach dir, $(SUBDIRS
), $(MAKE
) -C
$(dir) $@
;)
59 check test test-dirty
::
61 TMPDIR
=$(testdir
) $(BTEST
)
62 ifeq ($(TEST_NO_AUTOCLEAN
),) # define this variable to leave $(testdir) around for inspection
72 $(SUDO
) $(MAKE
) install
76 install-info
: install-doc
78 doc docs
: $(ORG_MAKE_DOC
)
84 $(MAKE
) -C
$(@
:install-
%=%) install
90 $(foreach dir, $(SUBDIRS
), $(MAKE
) -C
$(dir) cleanall
;)
96 cleanall
: cleandirs cleantest cleancontrib cleanutils
97 -$(FIND
) .
-name \
*~
-o
-name \
*# -o -name .#\* -exec $(RM) {} \;
100 -$(FIND
) contrib
-name \
*~
-o
-name \
*.elc
-exec
$(RM
) {} \
;
103 -$(FIND
) UTILITIES
-name \
*~
-o
-name \
*.elc
-exec
$(RM
) {} \
;
108 $(RMR
) org-7
*zip org-7
*tar.gz
111 $(MAKE
) -C lisp
clean
112 -$(FIND
) lisp
-name \
*~
-exec
$(RM
) {} \
;
116 -$(FIND
) doc
-name \
*~
-exec
$(RM
) {} \
;