guard invocation of org-mode and suppress warning from byte-compiler
[org-mode.git] / lisp / Makefile
blobbe6be5ff35a6b43c3db0e9f486534f40ba95f049
1 .NOTPARALLEL: # always run this make serially
2 .SUFFIXES: # we don't need default suffix rules
3 ifeq ($(MAKELEVEL), 0)
4 $(error This make needs to be started as a sub-make from the toplevel directory.)
5 endif
7 LISPV = org-version.el
8 LISPI = org-install.el
9 LISPA = $(LISPV) $(LISPI)
10 LISPF = $(filter-out $(LISPA),$(wildcard *.el))
11 LISPC = $(LISPF:%el=%elc)
13 .PHONY: all compile compile-dirty \
14 autoloads \
15 install clean cleanauto cleanall clean-install
17 # do not clean here, done in toplevel make
18 all compile:: autoloads
19 all compile compile-dirty:: $(LISPA)
20 $(ELCDIR)
22 autoloads: cleanauto $(LISPA)
24 $(LISPV): $(LISPF)
25 @echo "org-version: $(ORGVERSION) ($(GITVERSION))"
26 @$(RM) $(@)
27 @$(MAKE_ORG_VERSION)
29 $(LISPI): $(LISPV) $(LISPF)
30 @echo "org-install: $(ORGVERSION) ($(GITVERSION))"
31 @$(RM) $(@)
32 @$(MAKE_ORG_INSTALL)
34 install: $(LISPF) compile
35 if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
36 $(MKDIR) $(DESTDIR)$(lispdir) ; \
37 fi ;
38 $(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
40 cleanauto clean cleanall::
41 $(RM) $(LISPA) $(LISPA:%el=%elc)
42 clean cleanall::
43 $(RM) *.elc
45 clean-install:
46 if [ -d $(DESTDIR)$(lispdir) ] ; then \
47 $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
48 fi ;