org-element: Allow duals keywords with only secondary value
[org-mode.git] / lisp / Makefile
blobe2f17689a3318814a1b24dc4771ea65a78fc1263
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-loaddefs.el
9 LISPA = $(LISPV) $(LISPI)
10 LISPB = $(LISPA:%el=%elc) org-install.elc
11 LISPF = $(filter-out $(LISPA),$(sort $(wildcard *.el)))
12 LISPC = $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
13 _ORGCM_ = dirall single source slint1 slint2
14 -include local.mk
16 .PHONY: all compile compile-dirty \
17 $(_ORGCM_) $(_ORGCM_:%=compile-%) \
18 autoloads addcontrib \
19 install clean cleanauto cleanall cleanelc clean-install
21 # do not clean here, done in toplevel make
22 all compile compile-dirty:: autoloads
23 ifeq ($(filter-out $(_ORGCM_),$(ORGCM)),)
24 $(MAKE) compile-$(ORGCM)
25 else
26 $(error ORGCM has illegal value $(ORGCM) (valid: $(_ORGCM_)))
27 endif
29 compile-dirall: dirall
30 compile-single: single $(LISPC)
31 compile-source: source dirall
32 compile-slint1: dirall slint1
33 compile-slint2: source dirall slint1
35 # internal
36 dirall:
37 @$(info ==================== $@ ====================)
38 @$(ELCDIR)
39 single:
40 @$(info ==================== $@ ====================)
41 source: cleanelc
42 @$(info ==================== $@ ====================)
43 @$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
44 slint1:
45 @$(info ==================== $@ ====================)
46 @$(foreach elc,$(LISPC),$(RM) $(elc); $(MAKE) $(elc);)
48 %.elc: %.el
49 @$(info Compiling single $(abspath $<)...)
50 -@$(ELC) $<
52 addcontrib:
53 ifneq ($(ORG_ADD_CONTRIB),)
54 $(CP) $(wildcard \
55 $(addsuffix .el, \
56 $(addprefix ../contrib/lisp/, \
57 $(basename \
58 $(notdir $(ORG_ADD_CONTRIB)))))) .
59 endif
61 autoloads: cleanauto addcontrib $(LISPI) $(LISPV)
63 $(LISPV): $(LISPF)
64 @echo "org-version: $(ORGVERSION) ($(GITVERSION))"
65 @$(RM) $(@)
66 @$(MAKE_ORG_VERSION)
68 $(LISPI): $(LISPV) $(LISPF)
69 @echo "org-loaddefs: $(ORGVERSION) ($(GITVERSION))"
70 @$(RM) $(@)
71 @$(MAKE_ORG_INSTALL)
73 install: $(LISPF) compile
74 if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
75 $(MKDIR) $(DESTDIR)$(lispdir) ; \
76 fi ;
77 $(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
79 cleanauto clean cleanall::
80 $(RM) $(LISPA) $(LISPB)
81 clean cleanall cleanelc::
82 $(RM) *.elc
84 clean-install:
85 if [ -d $(DESTDIR)$(lispdir) ] ; then \
86 $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
87 fi ;