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
))
12 _ORGCM_
= dirall single source slint1 slint2
15 .PHONY
: all compile compile-dirty \
16 $(_ORGCM_
) $(_ORGCM_
:%=compile-
%) \
18 install clean cleanauto cleanall cleanelc clean-install
20 # do not clean here, done in toplevel make
21 all compile compile-dirty
:: autoloads
22 ifeq ($(filter-out $(_ORGCM_
),$(ORGCM
)),)
23 $(MAKE
) compile-
$(ORGCM
)
25 $(error ORGCM has illegal value
$(ORGCM
) (valid
: $(_ORGCM_
)))
28 compile-dirall
: dirall
29 compile-single
: single
$(LISPC
)
30 compile-source
: source dirall
31 compile-slint1
: dirall slint1
32 compile-slint2
: source dirall slint1
36 @
$(info ==================== $@
====================)
39 @
$(info ==================== $@
====================)
41 @
$(info ==================== $@
====================)
42 @
$(foreach elc
,$(LISPC
),$(MAKE
) $(elc
) && $(RM
) $(elc
);)
44 @
$(info ==================== $@
====================)
45 @
$(foreach elc
,$(LISPC
),$(RM
) $(elc
); $(MAKE
) $(elc
);)
48 @
$(info Compiling single
$(abspath
$<)...
)
51 autoloads
: cleanauto
$(LISPI
) $(LISPV
)
54 @echo
"org-version: $(ORGVERSION) ($(GITVERSION))"
58 $(LISPI
): $(LISPV
) $(LISPF
)
59 @echo
"org-install: $(ORGVERSION) ($(GITVERSION))"
63 install: $(LISPF
) compile
64 if
[ ! -d
$(DESTDIR
)$(lispdir
) ] ; then \
65 $(MKDIR
) $(DESTDIR
)$(lispdir
) ; \
67 $(CP
) $(LISPC
) $(LISPF
) $(LISPA
) $(DESTDIR
)$(lispdir
)
69 cleanauto
clean cleanall
::
70 $(RM
) $(LISPA
) $(LISPA
:%el
=%elc
)
71 clean cleanall cleanelc
::
75 if
[ -d
$(DESTDIR
)$(lispdir
) ] ; then \
76 $(RM
) $(DESTDIR
)$(lispdir
)/org
*.el
* $(DESTDIR
)$(lispdir
)/ob
*.el
* ; \