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-
%) \
17 autoloads addcontrib \
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
$<)...
)
52 ifneq ($(ORG_ADD_CONTRIB
),)
55 $(addprefix ..
/contrib
/lisp
/, \
57 $(notdir $(ORG_ADD_CONTRIB
)))))) .
60 autoloads
: cleanauto addcontrib
$(LISPI
) $(LISPV
)
63 @echo
"org-version: $(ORGVERSION) ($(GITVERSION))"
67 $(LISPI
): $(LISPV
) $(LISPF
)
68 @echo
"org-install: $(ORGVERSION) ($(GITVERSION))"
72 install: $(LISPF
) compile
73 if
[ ! -d
$(DESTDIR
)$(lispdir
) ] ; then \
74 $(MKDIR
) $(DESTDIR
)$(lispdir
) ; \
76 $(CP
) $(LISPC
) $(LISPF
) $(LISPA
) $(DESTDIR
)$(lispdir
)
78 cleanauto
clean cleanall
::
79 $(RM
) $(LISPA
) $(LISPA
:%el
=%elc
)
80 clean cleanall cleanelc
::
84 if
[ -d
$(DESTDIR
)$(lispdir
) ] ; then \
85 $(RM
) $(DESTDIR
)$(lispdir
)/org
*.el
* $(DESTDIR
)$(lispdir
)/ob
*.el
* ; \