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 compile-single compile-source compile-slint1 compile-slint2 \
16 install clean cleanauto cleanall cleanelc clean-install
18 # do not clean here, done in toplevel make
19 all compile compile-dirty
:: autoloads
20 $(MAKE
) compile-
$(_COMPILE_
)
24 compile-single
: $(LISPC
)
25 compile-source
: cleanelc
26 @
$(foreach elc
,$(LISPC
),$(MAKE
) $(elc
) && $(RM
) $(elc
);)
27 compile-slint1
: compile-dirall
28 @
$(foreach elc
,$(LISPC
),$(RM
) $(elc
); $(MAKE
) $(elc
);)
30 $(MAKE
) compile-source compile-slint1
33 @
$(info Compiling single
$(abspath
$<)...
)
36 autoloads
: cleanauto
$(LISPI
) $(LISPV
)
39 @echo
"org-version: $(ORGVERSION) ($(GITVERSION))"
43 $(LISPI
): $(LISPV
) $(LISPF
)
44 @echo
"org-install: $(ORGVERSION) ($(GITVERSION))"
48 install: $(LISPF
) compile
49 if
[ ! -d
$(DESTDIR
)$(lispdir
) ] ; then \
50 $(MKDIR
) $(DESTDIR
)$(lispdir
) ; \
52 $(CP
) $(LISPC
) $(LISPF
) $(LISPA
) $(DESTDIR
)$(lispdir
)
54 cleanauto
clean cleanall
::
55 $(RM
) $(LISPA
) $(LISPA
:%el
=%elc
)
56 clean cleanall cleanelc
::
60 if
[ -d
$(DESTDIR
)$(lispdir
) ] ; then \
61 $(RM
) $(DESTDIR
)$(lispdir
)/org
*.el
* $(DESTDIR
)$(lispdir
)/ob
*.el
* ; \