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.
)
7 ifneq ($(ORG_ADD_CONTRIB
),)
12 $(addprefix ..
/contrib
/lisp
/, \
14 $(notdir $(ORG_ADD_CONTRIB
)))))))
17 LISPV
:= org-version.el
18 LISPI
:= org-loaddefs.el
19 LISPA
:= $(LISPV
) $(LISPI
)
20 LISPB
:= $(LISPA
:%el
=%elc
) org-install.elc
21 LISPF
:= $(filter-out $(LISPA
),$(sort $(wildcard *.el
) $(_ORG_ADD_EL_
)))
22 LISPC
:= $(filter-out $(LISPB
) $(LISPN
:%el
=%elc
),$(LISPF
:%el
=%elc
))
23 _ORGCM_
:= dirall single source slint1 slint2
26 .PHONY
: all compile compile-dirty \
27 $(_ORGCM_
) $(_ORGCM_
:%=compile-
%) \
28 autoloads addcontrib \
29 install clean cleanauto cleanall cleanelc clean-install
31 # do not clean here, done in toplevel make
32 all compile compile-dirty
:: autoloads
33 ifeq ($(filter-out $(_ORGCM_
),$(ORGCM
)),)
34 $(MAKE
) compile-
$(ORGCM
)
36 $(error ORGCM has illegal value
$(ORGCM
) (valid
: $(_ORGCM_
)))
39 compile-dirall
: dirall
40 compile-single
: single
$(LISPC
)
41 compile-source
: source dirall
42 compile-slint1
: dirall slint1
43 compile-slint2
: source dirall slint1
47 @
$(info ==================== $@
====================)
50 @
$(info ==================== $@
====================)
52 @
$(info ==================== $@
====================)
53 @
$(foreach elc
,$(LISPC
),$(MAKE
) $(elc
) && $(RM
) $(elc
);)
55 @
$(info ==================== $@
====================)
56 @
$(foreach elc
,$(LISPC
),$(RM
) $(elc
); $(MAKE
) $(elc
);)
59 @
$(info Compiling single
$(abspath
$<)...
)
63 ifneq ($(ORG_ADD_CONTRIB
),)
64 $(CP
) $(addprefix ..
/contrib
/lisp
/,$(_ORG_ADD_EL_
)) .
67 autoloads
: cleanauto addcontrib
$(LISPI
) $(LISPV
)
70 @echo
"org-version: $(ORGVERSION) ($(GITVERSION))"
74 $(LISPI
): $(LISPV
) $(LISPF
)
75 @echo
"org-loaddefs: $(ORGVERSION) ($(GITVERSION))"
79 install: compile
$(LISPF
)
80 if
[ ! -d
$(DESTDIR
)$(lispdir
) ] ; then \
81 $(MKDIR
) $(DESTDIR
)$(lispdir
) ; \
83 $(CP
) $(LISPC
) $(LISPF
) $(LISPA
) $(DESTDIR
)$(lispdir
)
85 cleanauto
clean cleanall
::
86 $(RM
) $(LISPA
) $(LISPB
)
87 clean cleanall cleanelc
::
91 if
[ -d
$(DESTDIR
)$(lispdir
) ] ; then \
92 $(RM
) $(DESTDIR
)$(lispdir
)/org
*.el
* $(DESTDIR
)$(lispdir
)/ob
*.el
* ; \