فهرست منبع

Makefile: implement different compilation methods, rename _COMPILE_ to ORGCM

* default.mk, targets.mk, lisp/Makefile: Rename _COMPILE_ to ORGCM.

* default.mk: Define ORGCM=dirall, show other possible values as
  comments

* targets.mk: Implement target `single´, temporarily set
  ORGCM (overriding configuration).  Show newly introduced
  configuration variables with `check-*´.

* lisp/Makefile: Implement dispatch for compile based on ORGCM.
  Output header that contains the target for easier debugging.

* Makefile: Document target `single´.
Achim Gratz 12 سال پیش
والد
کامیت
226b15baa0
4فایلهای تغییر یافته به همراه35 افزوده شده و 18 حذف شده
  1. 1 0
      Makefile
  2. 7 6
      default.mk
  3. 19 8
      lisp/Makefile
  4. 8 4
      targets.mk

+ 1 - 0
Makefile

@@ -27,6 +27,7 @@ help helpall::
 	$(info make                - build Org ELisp and all documentation)
 	$(info make all            - ditto)
 	$(info make compile        - build Org ELisp files)
+	$(info make single         - build Org ELisp files, single Emacs per source)
 	$(info make autoloads      - create org-install.el to load Org in-place)
 	$(info make test           - build Org ELisp files and run test suite)
 helpall::

+ 7 - 6
default.mk

@@ -132,9 +132,10 @@ SUDO	= sudo
 # 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
+# target method for 'compile'
+ORGCM	= dirall
+# ORGCM	= dirall #   1x slowdown compared to default compilation method
+# ORGCM	= single #   4x one Emacs process per compilation
+# ORGCM	= source #   5x ditto, but remove compiled file immediately
+# ORGCM	= slint1 #   3x possibly elicit more warnings
+# ORGCM	= slint2 #   7x possibly elicit even more warnings

+ 19 - 8
lisp/Makefile

@@ -3,6 +3,7 @@
 ifeq ($(MAKELEVEL), 0)
   $(error This make needs to be started as a sub-make from the toplevel directory.)
 endif
+-include local.mk
 
 LISPV = org-version.el
 LISPI = org-install.el
@@ -10,24 +11,34 @@ LISPA = $(LISPV) $(LISPI)
 LISPF = $(filter-out $(LISPA),$(sort $(wildcard *.el)))
 LISPC = $(filter-out $(LISPN:%el=%elc),$(LISPF:%el=%elc))
 
+_ORGCM_ = dirall single source slint1
 .PHONY:	all compile compile-dirty \
-	compile-single compile-source compile-slint1 compile-slint2 \
+	$(_ORGCM_) $(_ORGCM_:%=compile-%) compile-slint2 \
 	autoloads \
 	install clean cleanauto cleanall cleanelc clean-install
 
 # do not clean here, done in toplevel make
 all compile compile-dirty::	 autoloads
-	$(MAKE) compile-$(_COMPILE_)
+	$(MAKE) compile-$(ORGCM)
 
-compile-dirall:
+compile-dirall:	dirall
+compile-single: single $(LISPC)
+compile-source:	source dirall
+compile-slint1:	dirall slint1
+compile-slint2:	source dirall slint1
+
+# internal
+dirall:
+	@$(info ==================== $@ ====================)
 	@$(ELCDIR)
-compile-single: $(LISPC)
-compile-source: cleanelc
+single:
+	@$(info ==================== $@ ====================)
+source: cleanelc
+	@$(info ==================== $@ ====================)
 	@$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
-compile-slint1:	compile-dirall
+slint1:
+	@$(info ==================== $@ ====================)
 	@$(foreach elc,$(LISPC),$(RM) $(elc); $(MAKE) $(elc);)
-compile-slint2:
-	$(MAKE) compile-source compile-slint1
 
 %.elc:	%.el
 	@$(info Compiling single $(abspath $<)...)

+ 8 - 4
targets.mk

@@ -22,8 +22,9 @@ ifneq ($(GITSTATUS),)
   GITVERSION := $(GITVERSION:.dirty=).dirty
 endif
 
-.PHONY:	all oldorg update update2 up0 up1 up2 compile $(SUBDIRS) \
-	check test install info html pdf card doc docs $(INSTSUB) \
+.PHONY:	all oldorg update update2 up0 up1 up2 single $(SUBDIRS) \
+	check test install $(INSTSUB) \
+	info html pdf card refcard doc docs \
 	autoloads cleanall clean \
 	cleancontrib cleantesting cleanutils
 	cleanrel clean-install cleanelc cleandirs \
@@ -31,11 +32,11 @@ endif
 	compile compile-dirty uncompiled \
 	config config-test config-exe config-all config-eol
 
-CONF_BASE = EMACS DESTDIR
+CONF_BASE = EMACS DESTDIR ORGCM
 CONF_DEST = lispdir infodir datadir testdir
 CONF_TEST = BTEST_PRE BTEST_POST BTEST_OB_LANGUAGES BTEST_EXTRA
 CONF_EXEC = CP MKDIR RM RMR FIND SUDO PDFTEX TEXI2PDF TEXI2HTML MAKEINFO INSTALL_INFO
-CONF_CALL = BATCH BATCHL ELCDIR BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION
+CONF_CALL = BATCH BATCHL ELC ELCDIR BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION
 config-eol:: EOL = \#
 config-eol:: config-all
 config config-all::
@@ -63,6 +64,9 @@ uncompiled:	cleanlisp autoloads	# for developing
 refcard:	card
 update update2::	up0 all
 
+single:	ORGCM=single
+single:	compile
+
 .PRECIOUS:	local.mk
 local.mk:
 	$(info ======================================================)