1 .NOTPARALLEL
: # always run this make serially
2 .SUFFIXES
: # we don't need default suffix rules
4 $(error This make needs to be started
as a sub-make from the toplevel directory.
)
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
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
)
26 $(error ORGCM has illegal value
$(ORGCM
) (valid
: $(_ORGCM_
)))
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
37 @
$(info ==================== $@
====================)
40 @
$(info ==================== $@
====================)
42 @
$(info ==================== $@
====================)
43 @
$(foreach elc
,$(LISPC
),$(MAKE
) $(elc
) && $(RM
) $(elc
);)
45 @
$(info ==================== $@
====================)
46 @
$(foreach elc
,$(LISPC
),$(RM
) $(elc
); $(MAKE
) $(elc
);)
49 @
$(info Compiling single
$(abspath
$<)...
)
53 ifneq ($(ORG_ADD_CONTRIB
),)
56 $(addprefix ..
/contrib
/lisp
/, \
58 $(notdir $(ORG_ADD_CONTRIB
)))))) .
61 autoloads
: cleanauto addcontrib
$(LISPI
) $(LISPV
)
64 @echo
"org-version: $(ORGVERSION) ($(GITVERSION))"
68 $(LISPI
): $(LISPV
) $(LISPF
)
69 @echo
"org-loaddefs: $(ORGVERSION) ($(GITVERSION))"
73 install: $(LISPF
) compile
74 if
[ ! -d
$(DESTDIR
)$(lispdir
) ] ; then \
75 $(MKDIR
) $(DESTDIR
)$(lispdir
) ; \
77 $(CP
) $(LISPC
) $(LISPF
) $(LISPA
) $(DESTDIR
)$(lispdir
)
79 cleanauto
clean cleanall
::
80 $(RM
) $(LISPA
) $(LISPB
)
81 clean cleanall cleanelc
::
85 if
[ -d
$(DESTDIR
)$(lispdir
) ] ; then \
86 $(RM
) $(DESTDIR
)$(lispdir
)/org
*.el
* $(DESTDIR
)$(lispdir
)/ob
*.el
* ; \