From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4615 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Out-of-tree builds Date: Thu, 27 Feb 2014 14:29:46 +0100 Message-ID: <20140227132946.GS23551@port70.net> References: <52F3C329.6040208@f-prot.com> <20140206173932.GB1685@port70.net> <20140206190410.GJ15627@brightrain.aerifal.cx> <20140206232706.GC1685@port70.net> <20140206233121.GD1685@port70.net> <20140207010135.GE1685@port70.net> <20140207010755.GL15627@brightrain.aerifal.cx> <20140208024922.GG1685@port70.net> <20140226225614.GR23551@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1393507801 30545 80.91.229.3 (27 Feb 2014 13:30:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Feb 2014 13:30:01 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4619-gllmg-musl=m.gmane.org@lists.openwall.com Thu Feb 27 14:30:10 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WJ12F-0008U6-Iv for gllmg-musl@plane.gmane.org; Thu, 27 Feb 2014 14:29:59 +0100 Original-Received: (qmail 1837 invoked by uid 550); 27 Feb 2014 13:29:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 1816 invoked from network); 27 Feb 2014 13:29:57 -0000 Content-Disposition: inline In-Reply-To: <20140226225614.GR23551@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4615 Archived-At: * Szabolcs Nagy [2014-02-26 23:56:14 +0100]: > third try, with configure changes and some simplifications > > (configure detects out-of-tree build and copies the Makefile, > there is an ifndef block in the Makefile to add extra rules > for directory creation) hm the makefile shouldn't be copied, it's enough to link it or create one with "include $srcdir/Makefile" (so if the source repo is updated the new makefile will be used for the out-of-tree build) > +if test -f Makefile ; then > +echo "using existing Makefile" > +else > +cp $srcdir/Makefile . || fail "$0: cannot create Makefile" > +fi > + else printf "creating Makefile... " echo "include $srcdir/Makefile" >Makefile echo "done" fi