mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-19 08:18:55 +00:00
* default.mk: Re-introduce ELC for single file compilation. * targets.mk: New targets compile-single and compile-single-source that get handed off to lisp/Makefile. * lisp/Makefile: Implement pattern rule using $(ELC). Implement target compile-single that uses a separate Emacs process for each target by invoking the pattern rule. Implement target compile-single-source that additionally removes the compiled file directly after it has been produced, so compilation will always use source files only, never byte-compiled files. * Makefile: Document new targets. These new targets are meant to check for problems with interdependencies in Org.
55 lines
1.4 KiB
Makefile
55 lines
1.4 KiB
Makefile
.NOTPARALLEL: # always run this make serially
|
|
.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-install.el
|
|
LISPA = $(LISPV) $(LISPI)
|
|
LISPF = $(filter-out $(LISPA),$(wildcard *.el))
|
|
LISPC = $(filter-out $(LISPN:%el=%elc),$(LISPF:%el=%elc))
|
|
|
|
.PHONY: all compile compile-dirty compile-single \
|
|
autoloads \
|
|
install clean cleanauto cleanall clean-install
|
|
|
|
# do not clean here, done in toplevel make
|
|
all compile:: autoloads
|
|
all compile compile-dirty:: $(LISPI) $(LISPV)
|
|
$(ELCDIR)
|
|
compile-single: clean autoloads $(LISPC)
|
|
compile-source: clean autoloads
|
|
@$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
|
|
|
|
%.elc: %.el
|
|
-$(ELC) $(<)
|
|
|
|
autoloads: cleanauto $(LISPI) $(LISPV)
|
|
|
|
$(LISPV): $(LISPF)
|
|
@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
|
|
@$(RM) $(@)
|
|
@$(MAKE_ORG_VERSION)
|
|
|
|
$(LISPI): $(LISPV) $(LISPF)
|
|
@echo "org-install: $(ORGVERSION) ($(GITVERSION))"
|
|
@$(RM) $(@)
|
|
@$(MAKE_ORG_INSTALL)
|
|
|
|
install: $(LISPF) compile
|
|
if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
|
|
$(MKDIR) $(DESTDIR)$(lispdir) ; \
|
|
fi ;
|
|
$(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
|
|
|
|
cleanauto clean cleanall::
|
|
$(RM) $(LISPA) $(LISPA:%el=%elc)
|
|
clean cleanall::
|
|
$(RM) *.elc
|
|
|
|
clean-install:
|
|
if [ -d $(DESTDIR)$(lispdir) ] ; then \
|
|
$(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
|
|
fi ;
|