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 \
28 cleancontrib cleantesting cleanutils
29 cleanrel clean-install cleanelc cleandirs \
30 cleanlisp cleandoc cleandocs cleantest \
31 compile compile-dirty uncompiled \
32 config config-test config-exe config-all config-eol
34 CONF_BASE
= EMACS DESTDIR
35 CONF_DEST
= lispdir
infodir datadir testdir
36 CONF_TEST
= BTEST_PRE BTEST_POST BTEST_OB_LANGUAGES BTEST_EXTRA
37 CONF_EXEC
= CP MKDIR RM RMR FIND SUDO PDFTEX TEXI2PDF TEXI2HTML MAKEINFO INSTALL_INFO
38 CONF_CALL
= BATCH BATCHL ELCDIR BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION
40 config-eol
:: config-all
43 $(info ========= Emacs executable and Installation paths
)
44 $(foreach var
,$(CONF_BASE
),$(info $(var
) = $($(var
))$(EOL
)))
45 $(foreach var
,$(CONF_DEST
),$(info $(var
) = $(DESTDIR
)$($(var
))$(EOL
)))
46 config-test config-all
::
48 $(info ========= Test configuration
)
49 $(foreach var
,$(CONF_TEST
),$(info $(var
) = $($(var
))$(EOL
)))
50 config-exe config-all
::
52 $(info ========= Executables used by make
)
53 $(foreach var
,$(CONF_EXEC
),$(info $(var
) = $($(var
))$(EOL
)))
54 config-cmd config-all
::
56 $(info ========= Commands used by make
)
57 $(foreach var
,$(CONF_CALL
),$(info $(var
) = $($(var
))$(EOL
)))
58 config config-test config-exe config-all
::
61 oldorg
: compile
info # what the old makefile did when no target was specified
62 uncompiled
: cleanlisp autoloads
# for developing
64 update update2
:: up0
all
68 $(info ======================================================)
69 $(info = Invoke
"make help" for a synopsis of make targets.
=)
70 $(info = Created a default local.mk template.
=)
71 $(info = Setting
"oldorg" as the default target.
=)
72 $(info = Please adapt local.mk to your local setup
! =)
73 $(info ======================================================)
77 $(foreach dir, doc lisp
, $(MAKE
) -C
$(dir) clean;)
78 compile compile-dirty
::
81 $(foreach dir, $(SUBDIRS
), $(MAKE
) -C
$(dir) $@
;)
84 check test test-dirty
::
86 TMPDIR
=$(testdir
) $(BTEST
)
87 ifeq ($(TEST_NO_AUTOCLEAN
),) # define this variable to leave $(testdir) around for inspection
97 $(SUDO
) $(MAKE
) install
101 install-info
: install-doc
103 doc docs
: $(ORG_MAKE_DOC
)
109 $(MAKE
) -C
$(@
:install-
%=%) install
115 $(foreach dir, $(SUBDIRS
), $(MAKE
) -C
$(dir) cleanall
;)
118 $(MAKE
) -C lisp
clean
121 cleanall
: cleandirs cleantest cleancontrib cleantesting cleanutils
122 -$(FIND
) .
-name \
*~
-o
-name \
*# -o -name .#\* -exec $(RM) {} \;
125 -$(FIND
) contrib
-name \
*~
-o
-name \
*.elc
-exec
$(RM
) {} \
;
128 -$(FIND
) testing
-name \
*~
-o
-name \
*.elc
-exec
$(RM
) {} \
;
131 -$(FIND
) UTILITIES
-name \
*~
-o
-name \
*.elc
-exec
$(RM
) {} \
;
136 $(RMR
) org-7
*zip org-7
*tar.gz
139 $(MAKE
) -C lisp
clean
140 -$(FIND
) lisp
-name \
*~
-exec
$(RM
) {} \
;
144 -$(FIND
) doc
-name \
*~
-exec
$(RM
) {} \
;