From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Makefile restructuring Date: Wed, 25 Apr 2012 20:00:29 +0200 Message-ID: <871unbitdu.fsf@Rainer.invalid> References: <87k4bqwkyw.fsf@gnu.org> <87sjqejvob.fsf@Rainer.invalid> <87k4bqjnwu.fsf@Rainer.invalid> <87fwmdkind.fsf@Rainer.invalid> <874o2t81qu.fsf@gnu.org> <87liw43iys.fsf@Rainer.invalid> <8762n8d4ys.fsf@gnu.org> <87ei1u6u3q.fsf_-_@Rainer.invalid> <87hb6i3z1l.fsf@Rainer.invalid> <87k47av6j2.fsf@Rainer.invalid> <87fwhyux4d.fsf@Rainer.invalid> <87397x1i8u.fsf@altern.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN6WQ-0000MP-DV for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 14:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SN6WK-0001xJ-D8 for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 14:00:57 -0400 Received: from plane.gmane.org ([80.91.229.3]:40313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN6WK-0001x2-0G for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 14:00:52 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SN6WF-00041Y-7N for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 20:00:47 +0200 Received: from pd9eb2b6c.dip.t-dialin.net ([217.235.43.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Apr 2012 20:00:47 +0200 Received: from Stromeko by pd9eb2b6c.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Apr 2012 20:00:47 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Bastien writes: > Please test this and report any problem while using make > to install Org. Here's another refinement to make "oldorg" the default target unless local.mk is actively edited by the user. If you already have a local.mk file and would like this behaviour, just insert the following on the first line of local.mk: --8<---------------cut here---------------start------------->8--- oldorg: --8<---------------cut here---------------end--------------->8--- With this patch, the new Makefile produces the same results out-of-the box as the old one (modulo the bugs that got fixed: no need for a "make clean" unless you do something really unusual). The patch also adds a new target "uncompiled" that will remove any compiled lisp files that may be around and just creates the autoloads. If you fancy uncompiled installation, insert this as the first line to local.mk: --8<---------------cut here---------------start------------->8--- uncompiled: --8<---------------cut here---------------end--------------->8--- This will enable a plain and simple "make" to do what you want without taking anything away. If you'd rather do something else with a plain "make", you can add your own target definitions there as well (the first one will always be the default target): --8<---------------cut here---------------start------------->8--- fancy: help info uncompiled fancy-install: help install-info install-lisp help:: $(info My fancyness) $(info ============) $(info ) $(info fancy - show help, update doc and autoloads) --8<---------------cut here---------------end--------------->8--- In this case, plain "make" would do "fancy" and you'd have a new target "fancy install" plus a documentation for these when doing a "make help", "make targets" or "make helpall". The patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Improve-compatibility-with-old-Makefile.patch Content-Description: Improve compatibility with old Makefile >From f9f0c7b4e367259bafac1cb5cbec17dd2cff625a Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Wed, 25 Apr 2012 19:04:29 +0200 Subject: [PATCH] Improve compatibility with old Makefile * targets.mk: change the "local.mk" template so that "oldorg" will be the default target for maximum compatibility. Admonish info message with a reminder to use "make help" for more information on targets and that "oldorg" is the default target for now. Add new convenience target "uncompiled" that will keep the lisp directory free from *.elc files and the autoload files up-to-date. * Makefile: make "targets" and "helpall" depend on "help" so that only "help::" or "helpall::" needs to be written for adding more help messages. Useful when users want to add their own messages to "make help" et al. --- Makefile | 14 ++++++++------ targets.mk | 17 +++++++++++------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 1258d52..66a637c 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,10 @@ all:: # Describe valid make targets for org-mode. -.PHONY: targets help -targets help helpall:: +.PHONY: targets help helpall +targets: help +helpall:: help +help:: $(info ) $(info Getting Help) $(info ============) @@ -61,18 +63,18 @@ helpall:: $(info ) $(info Documentation) $(info =============) -targets help helpall:: +help:: $(info make doc - build all documentation) helpall:: $(info make docs - dito) -targets help helpall:: +help:: $(info make info - build Info documentation) helpall:: $(info make html - build HTML documentation) $(info make pdf - build PDF documentation) $(info make card - build reference cards) $(info make refcard - dito) -targets help helpall:: +help:: $(info ) $(info Installation) $(info ============) @@ -81,7 +83,7 @@ helpall:: $(info make install-etc - build and install files in /etc) $(info make install-lisp - build and install Org Elisp files) $(info make install-info - build and install Info documentation) -targets help helpall:: +help:: @echo "" include targets.mk # toplevel make machinery diff --git a/targets.mk b/targets.mk index e208ad7..4ad5c5f 100644 --- a/targets.mk +++ b/targets.mk @@ -25,19 +25,24 @@ endif check test install info html pdf card doc docs $(INSTSUB) \ autoloads cleanall clean cleancontrib cleanrel clean-install \ cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest \ - compile compile-dirty + compile compile-dirty uncompiled -oldorg: compile autoloads info # what the old makefile did when no target was specified +oldorg: compile autoloads info # what the old makefile did when no target was specified +uncompiled: cleanlisp autoloads # for developing refcard: card update update2:: up0 all .PRECIOUS: local.mk local.mk: - $(info ==========================================) - $(info Created a local.mk template.) - $(info Please adapt local.mk to your local setup!) - $(info ==========================================) + $(info ======================================================) + $(info = Invoke "make help" for a synopsis of make targets. =) + $(info = Created a default local.mk template. =) + $(info = Setting "oldorg" as the default target. =) + $(info = Please adapt local.mk to your local setup! =) + $(info ======================================================) -@$(SED) -n \ + -e '1 i ## Remove the following line to make "all" the default target' \ + -e '1 i oldorg:' \ -e '/-8<-/,/->8-/ {s/^\(\s*[^#]\)/#\1/;p}' \ -e '$$ i ## See default.mk for further configuration options.' \ default.mk > $@ -- 1.7.9.2 --=-=-= Content-Type: text/plain Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for KORG EX-800 and Poly-800MkII V0.9: http://Synth.Stromeko.net/Downloads.html#KorgSDada --=-=-=--