From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: patch makefile solve a couple debian build problems and a slackware build problem Date: Sun, 10 Jul 2011 22:03:34 +0200 Message-ID: <87fwmdkind.fsf@Rainer.invalid> References: <87k4bqwkyw.fsf@gnu.org> <87sjqejvob.fsf@Rainer.invalid> <87k4bqjnwu.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qg0EJ-000746-Lt for emacs-orgmode@gnu.org; Sun, 10 Jul 2011 16:03:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qg0EH-0004ON-2B for emacs-orgmode@gnu.org; Sun, 10 Jul 2011 16:03:51 -0400 Received: from lo.gmane.org ([80.91.229.12]:40042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qg0EG-0004OA-IB for emacs-orgmode@gnu.org; Sun, 10 Jul 2011 16:03:48 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qg0EE-00018L-Vv for emacs-orgmode@gnu.org; Sun, 10 Jul 2011 22:03:46 +0200 Received: from p57aacda3.dip.t-dialin.net ([87.170.205.163]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jul 2011 22:03:46 +0200 Received: from Stromeko by p57aacda3.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jul 2011 22:03:46 +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 Achim Gratz writes: > I just realize that the Makefile already uses several GNU make > extensions. If it's OK to use them (specifically include files and > conditional variable assignment), that would help to restructure the > Makefile so that it can be customized and maintained more easily. Let > me know if I should work on a proposal in that direction or not. I went ahead with splitting the Makefile up, it now looks like this: --8<---------------cut here---------------start------------->8--- # # Master Makefile for the org-mode distribution # include default.mk -include local.mk .DEFAULT_GOAL := help # Describe valid make targets for org-mode. targets help: @echo @echo "Check the settings in default.mk first. If you need to adjust them, please" @echo "copy default.mk to local.mk and then make your edits in local.mk." @echo @echo "Usage:" @echo @echo "make # compile Org ELisp files" @echo "make clean # clean Elisp and documentation files" @echo "make all # compile Org ELisp files and documentation" @echo @echo "make doc # make all documentation" @echo "make info # make Info documentation" @echo "make html # make HTML documentation" @echo "make pdf # make pdf documentation" @echo "make card # make refcards documentation" @echo @echo "make install # install Org" @echo "make install-lisp # install Org ELisp files" @echo "make install-info # install Org Info file" @echo include maint.mk include standard.mk include deps.mk -include server.mk --8<---------------cut here---------------end--------------->8--- Calling make without a target or with a target of "help" or "targets" will give a short overview on how to set things up and use it. Customization is done by creating a local.mk file that overrides the settings in default.mk. By doing this in your local branch, you never need to worry that some change in the main repository will overwrite your customizations and developing on a local branch with merging should become easier (that was my main reason to always rebase my local branch). Merging back into the main branch requires some care, so the repository should probably be configured to never allow a push that has local.mk in it. The same thing is done for the orgmode server.mk part so that it is not distributed with the standard orgmode repository anymore. For illustration I've also separated the dependencies into deps.mk so that they may be auto-generated (in which case they'd be removed from the repository and get their own target). I'll probably merge maint.mk and standard.mk again, but for now they're separated. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada