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.
)
9 LISPA
= $(LISPV
) $(LISPI
)
10 LISPF
= $(filter-out $(LISPA
),$(sort $(wildcard *.el
)))
11 LISPC
= $(filter-out $(LISPN
:%el
=%elc
),$(LISPF
:%el
=%elc
))
13 .PHONY
: all compile compile-dirty \
14 dirall source slint1 slint3 slint4 \
15 compile-single compile-source \
16 compile-slint1 compile-slint2 compile-slint3 compile-slint4 \
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-
$(_COMPILE_
)
24 compile-dirall
: dirall
25 compile-single
: $(LISPC
)
26 compile-source
: source dirall
27 compile-slint1
: dirall slint1
28 compile-slint2
: source dirall slint1
29 compile-slint3
: slint3 dirall
30 compile-slint4
: slint4 dirall
34 @
$(info ==================== $@
====================)
37 @
$(info ==================== $@
====================)
38 @
$(foreach elc
,$(LISPC
),$(MAKE
) $(elc
) && $(RM
) $(elc
);)
40 @
$(info ==================== $@
====================)
41 @
$(foreach elc
,$(LISPC
),$(RM
) $(elc
); $(MAKE
) $(elc
);)
43 @
$(info ==================== $@
====================)
44 -@
$(ELINTL
) $(foreach el
,$(LISPF
),$(ELINTF
))
46 @
$(info ==================== $@
====================)
47 -@
$(foreach el
,$(LISPF
),$(ELINTL
) $(ELINTF
);)
50 @
$(info Compiling single
$(abspath
$<)...
)
53 autoloads
: cleanauto
$(LISPI
) $(LISPV
)
56 @echo
"org-version: $(ORGVERSION) ($(GITVERSION))"
60 $(LISPI
): $(LISPV
) $(LISPF
)
61 @echo
"org-install: $(ORGVERSION) ($(GITVERSION))"
65 install: $(LISPF
) compile
66 if
[ ! -d
$(DESTDIR
)$(lispdir
) ] ; then \
67 $(MKDIR
) $(DESTDIR
)$(lispdir
) ; \
69 $(CP
) $(LISPC
) $(LISPF
) $(LISPA
) $(DESTDIR
)$(lispdir
)
71 cleanauto
clean cleanall
::
72 $(RM
) $(LISPA
) $(LISPA
:%el
=%elc
)
73 clean cleanall cleanelc
::
77 if
[ -d
$(DESTDIR
)$(lispdir
) ] ; then \
78 $(RM
) $(DESTDIR
)$(lispdir
)/org
*.el
* $(DESTDIR
)$(lispdir
)/ob
*.el
* ; \