diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2012-08-19 12:20:47 +0200 |
---|---|---|
committer | Achim Gratz <Stromeko@Stromeko.DE> | 2012-08-21 21:24:21 +0200 |
commit | 3c1c04d8bc8f5c1ef06607a68b632fd071f13485 (patch) | |
tree | 92c33dcb16958f22dd6a0b49d6a41908ae31ee79 | |
parent | 51b9ad93c9b48801f024970aec83a9ea00a62f13 (diff) | |
download | org-mode-3c1c04d8bc8f5c1ef06607a68b632fd071f13485.tar.gz |
Revert "Revert "Makefile: allow for different compilation methods""
This reverts commit 510f6464b06932406051fd0983586f6c1680e098.
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | default.mk | 7 | ||||
-rw-r--r-- | lisp/Makefile | 30 | ||||
-rw-r--r-- | targets.mk | 23 |
4 files changed, 37 insertions, 24 deletions
@@ -32,7 +32,6 @@ help helpall:: helpall:: $(info make test-dirty - check without building first) $(info make compile-dirty - build only stale Org ELisp files) - $(info make compile-single - build using one Emacs process per file) $(info ) $(info Compatibility) $(info =============) @@ -131,3 +131,10 @@ SUDO = sudo # Name of the program to install info files # INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message INSTALL_INFO = install-info + +# target variant for 'compile' +# _COMPILE_ = single # one Emacs process per compilation +# _COMPILE_ = source # ditto, but remove compiled file immediately +# _COMPILE_ = slint1 # possibly elicit more warnings +# _COMPILE_ = slint2 # possibly elicit even more warnings +_COMPILE_ = dirall diff --git a/lisp/Makefile b/lisp/Makefile index ee0caaf..c547810 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -7,23 +7,31 @@ endif LISPV = org-version.el LISPI = org-install.el LISPA = $(LISPV) $(LISPI) -LISPF = $(filter-out $(LISPA),$(wildcard *.el)) +LISPF = $(filter-out $(LISPA),$(sort $(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 +.PHONY: all compile compile-dirty \ + compile-single compile-source compile-slint1 compile-slint2 \ + autoloads \ + install clean cleanauto cleanall cleanelc 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 +all compile compile-dirty:: autoloads + $(MAKE) compile-$(_COMPILE_) + +compile-dirall: + @$(ELCDIR) +compile-single: $(LISPC) +compile-source: cleanelc @$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);) +compile-slint1: compile-dirall + @$(foreach elc,$(LISPC),$(RM) $(elc); $(MAKE) $(elc);) +compile-slint2: + $(MAKE) compile-source compile-slint1 %.elc: %.el - -$(ELC) $(<) + @$(info Compiling single $(abspath $<)...) + -@$(ELC) $< autoloads: cleanauto $(LISPI) $(LISPV) @@ -45,7 +53,7 @@ install: $(LISPF) compile cleanauto clean cleanall:: $(RM) $(LISPA) $(LISPA:%el=%elc) -clean cleanall:: +clean cleanall cleanelc:: $(RM) *.elc clean-install: @@ -28,7 +28,7 @@ endif cleancontrib cleantesting cleanutils cleanrel clean-install cleanelc cleandirs \ cleanlisp cleandoc cleandocs cleantest \ - compile compile-single compile-source compile-dirty uncompiled \ + compile compile-dirty uncompiled \ config config-test config-exe config-all config-eol CONF_BASE = EMACS DESTDIR @@ -75,7 +75,7 @@ local.mk: all compile:: $(foreach dir, doc lisp, $(MAKE) -C $(dir) clean;) -compile compile-dirty compile-single compile-source:: +compile compile-dirty:: $(MAKE) -C lisp $@ all clean-install:: $(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) $@;) @@ -118,26 +118,25 @@ clean: cleanrel $(MAKE) -C lisp clean $(MAKE) -C doc clean -cleanall: cleandirs cleantest cleancontrib cleantesting cleanutils +cleanall: cleandirs cleantest -$(FIND) . -name \*~ -o -name \*# -o -name .#\* -exec $(RM) {} \; + -$(FIND) contrib testing UTILITIES -name \*~ -o -name \*.elc -exec $(RM) {} \; -cleancontrib: - -$(FIND) contrib -name \*~ -o -name \*.elc -exec $(RM) {} \; +cleancontrib cleantesting cleanUTILITIES: + -$(FIND) $(@:clean%=%) -name \*~ -o -name \*.elc -exec $(RM) {} \; -cleantesting: - -$(FIND) testing -name \*~ -o -name \*.elc -exec $(RM) {} \; - -cleanutils: - -$(FIND) UTILITIES -name \*~ -o -name \*.elc -exec $(RM) {} \; +cleanutils: cleanUTILITIES cleanrel: $(RMR) RELEASEDIR $(RMR) org-7.* $(RMR) org-7*zip org-7*tar.gz -cleanelc cleanlisp: +cleanelc: + $(MAKE) -C lisp $@ + +cleanlisp: $(MAKE) -C lisp clean - -$(FIND) lisp -name \*~ -exec $(RM) {} \; cleandoc cleandocs: $(MAKE) -C doc clean |