org-mode/lisp/Makefile

86 lines
2.4 KiB
Makefile
Raw Permalink Normal View History

.SUFFIXES: # we don't need default suffix rules
ifeq ($(MAKELEVEL), 0)
$(error This make needs to be started as a sub-make from the toplevel directory.)
endif
LISPV := org-version.el
LISPI := org-loaddefs.el
LISPA := $(LISPV) $(LISPI)
LISPB := $(LISPA:%el=%elc) org-install.elc
LISPF := $(filter-out $(LISPA),$(sort $(wildcard *.el)))
LISPC := $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
LISPN := $(filter-out $(LISPB) $(LISPN:%el=%eln),$(LISPF:%el=%eln))
_ORGCM_ := dirall single native source slint1 slint2
-include local.mk
.PHONY: all compile compile-dirty \
$(_ORGCM_) $(_ORGCM_:%=compile-%) \
autoloads \
install clean cleanauto cleanall cleanelc clean-install
# do not clean here, done in toplevel make
all compile compile-dirty:: | autoloads
ifeq ($(filter-out $(_ORGCM_),$(ORGCM)),)
$(MAKE) compile-$(ORGCM)
else
$(error ORGCM has illegal value $(ORGCM) (valid: $(_ORGCM_)))
endif
compile-dirall: dirall
compile-single: $(LISPC) | single
compile-native: $(LISPN) | native
compile-source: | source dirall
compile-slint1: | dirall slint1
compile-slint2: | source dirall slint1
# internal
dirall:
@$(info ==================== $@ ====================)
@$(ELCDIR)
single:
@$(info ==================== $@ ====================)
native:
@$(info ==================== $@ ====================)
source: cleanelc
@$(info ==================== $@ ====================)
@$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
slint1:
@$(info ==================== $@ ====================)
@$(foreach elc,$(LISPC),$(RM) $(elc); $(MAKE) $(elc);)
%.elc: %.el
@$(info Compiling single $(abspath $<)...)
-@$(ELC) $<
%.eln: %.el
@$(info Native compiling single $(abspath $<)...)
-@$(ELN) $<
autoloads: cleanauto $(LISPI) $(LISPV)
$(LISPV): $(LISPF)
@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
@$(RM) $(@)
@$(MAKE_ORG_VERSION)
$(LISPI): $(LISPV) $(LISPF)
@echo "org-loaddefs: $(ORGVERSION) ($(GITVERSION))"
@$(RM) $(@)
@$(MAKE_ORG_INSTALL)
install: compile $(LISPF)
if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
$(MKDIR) $(DESTDIR)$(lispdir) ; \
fi ;
$(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
cleanauto clean cleanall::
$(RM) $(LISPA) $(LISPB)
clean cleanall cleanelc::
$(RM) *.elc
clean-install:
if [ -d $(DESTDIR)$(lispdir) ] ; then \
Move link-related core functions out of "org.el" * contrib/lisp/org-wl.el (org-wl-store-link-message): * lisp/Makefile (clean-install): * lisp/ob-core.el (org-link-bracket-re): (org-babel-open-src-block-result): (org-babel-read-element): (org-babel-read-link): (org-babel-result-end): * lisp/ob-tangle.el (org-link-bracket-re): (org-babel-tangle-single-block): (org-link-analytic-bracket-re): (org-babel-detangle): (org-babel-tangle-jump-to-org): * lisp/ol.el: * lisp/org-agenda.el (org-agenda-get-some-entry-text): (org-diary): (org-agenda-format-item): (org-agenda-open-link): (org-agenda-switch-to): (org-agenda-to-appt): * lisp/org-bbdb.el (org-bbdb-store-link): * lisp/org-bibtex.el (org-bibtex-store-link): * lisp/org-capture.el (org-capture-fill-template): * lisp/org-clock.el (org-clocktable-write-default): (org-clock-get-table-data): * lisp/org-compat.el (org-doi-server-url): (org-email-link-description-format): (org-make-link-description-function): (org-from-is-user-regexp): (org-descriptive-links): (org-url-hexify-p): (org-context-in-file-links): (org-keep-stored-link-after-insertion): (org-display-internal-link-with-indirect-buffer): (org-confirm-shell-link-function): (org-confirm-shell-link-not-regexp): (org-confirm-elisp-link-function): (org-confirm-elisp-link-not-regexp): (org-file-complete-link): (org-email-link-description): (org-make-link-string): (org-store-link-props): (org-add-link-props): (org-make-link-regexps): (org-angle-link-re): (org-plain-link-re): (org-bracket-link-regexp): (org-bracket-link-analytic-regexp): (org-any-link-re): * lisp/org-docview.el (org-docview-store-link): (org-docview-complete-link): * lisp/org-element.el (org-element-link-parser): * lisp/org-eshell.el (org-eshell-store-link): * lisp/org-eww.el (org-eww-store-link): (org-eww-copy-for-org-mode): * lisp/org-footnote.el (org-footnote-next-reference-or-definition): * lisp/org-gnus.el (org-gnus-article-link): (org-gnus-store-link): * lisp/org-id.el (org-id-store-link): * lisp/org-info.el (org-info-store-link): * lisp/org-irc.el (org-irc-erc-store-link): * lisp/org-mhe.el (org-mhe-store-link): * lisp/org-pcomplete.el (pcomplete/org-mode/searchhead): * lisp/org-protocol.el (org-protocol-do-capture): * lisp/org-rmail.el (org-rmail-store-link): * lisp/org-w3m.el (org-w3m-store-link): (org-w3m-copy-for-org-mode):
2018-11-26 23:04:41 +00:00
$(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* $(DESTDIR)$(lispdir)/ol*.el* $(DESTDIR)$(lispdir)/ox*.el* ; \
fi ;