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.
)
10 LISPA
= $(LISPV
) $(LISPI
)
11 LISPF
= $(filter-out $(LISPA
),$(sort $(wildcard *.el
)))
12 LISPC
= $(filter-out $(LISPN
:%el
=%elc
),$(LISPF
:%el
=%elc
))
14 _ORGCM_
= dirall single source slint1
15 .PHONY
: all compile compile-dirty \
16 $(_ORGCM_
) $(_ORGCM_
:%=compile-
%) compile-slint2 \
18 install clean cleanauto cleanall cleanelc clean-install
20 # do not clean here, done in toplevel make
21 all compile compile-dirty
:: autoloads
22 $(MAKE
) compile-
$(ORGCM
)
24 compile-dirall
: dirall
25 compile-single
: single
$(LISPC
)
26 compile-source
: source dirall
27 compile-slint1
: dirall slint1
28 compile-slint2
: source dirall slint1
32 @
$(info ==================== $@
====================)
35 @
$(info ==================== $@
====================)
37 @
$(info ==================== $@
====================)
38 @
$(foreach elc
,$(LISPC
),$(MAKE
) $(elc
) && $(RM
) $(elc
);)
40 @
$(info ==================== $@
====================)
41 @
$(foreach elc
,$(LISPC
),$(RM
) $(elc
); $(MAKE
) $(elc
);)
44 @
$(info Compiling single
$(abspath
$<)...
)
47 autoloads
: cleanauto
$(LISPI
) $(LISPV
)
50 @echo
"org-version: $(ORGVERSION) ($(GITVERSION))"
54 $(LISPI
): $(LISPV
) $(LISPF
)
55 @echo
"org-install: $(ORGVERSION) ($(GITVERSION))"
59 install: $(LISPF
) compile
60 if
[ ! -d
$(DESTDIR
)$(lispdir
) ] ; then \
61 $(MKDIR
) $(DESTDIR
)$(lispdir
) ; \
63 $(CP
) $(LISPC
) $(LISPF
) $(LISPA
) $(DESTDIR
)$(lispdir
)
65 cleanauto
clean cleanall
::
66 $(RM
) $(LISPA
) $(LISPA
:%el
=%elc
)
67 clean cleanall cleanelc
::
71 if
[ -d
$(DESTDIR
)$(lispdir
) ] ; then \
72 $(RM
) $(DESTDIR
)$(lispdir
)/org
*.el
* $(DESTDIR
)$(lispdir
)/ob
*.el
* ; \