From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3891 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Build system adjustments for subarchs Date: Tue, 13 Aug 2013 22:25:59 -0400 Message-ID: <20130814022558.GJ221@brightrain.aerifal.cx> References: <20130814010617.GA16011@brightrain.aerifal.cx> 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 1376447172 7255 80.91.229.3 (14 Aug 2013 02:26:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Aug 2013 02:26:12 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3895-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 14 04:26:13 2013 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 1V9Qmp-0003nX-W5 for gllmg-musl@plane.gmane.org; Wed, 14 Aug 2013 04:26:12 +0200 Original-Received: (qmail 32457 invoked by uid 550); 14 Aug 2013 02:26:11 -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 32449 invoked from network); 14 Aug 2013 02:26:11 -0000 Content-Disposition: inline In-Reply-To: <20130814010617.GA16011@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3891 Archived-At: On Tue, Aug 13, 2013 at 09:06:17PM -0400, Rich Felker wrote: > Another idea, using the filesystem, would be to have .sub files in the > asm directories containing the filename of a different asm file to > substitute. This is essentially emulating symlinks, but I don't see a > good way to get make to do automated dependency tracking so that > modifying the pointed-to asm file causes the object file to be > rebuilt. I am exploring this approach further however in hopes that > there might be a way. Actually, this would work great if I could write an abstract rule that says roughly: for each .o target %.o, add dependencies on %.c and $(wildcard */%.s). This would make it so files with asm always get rebuilt if either the base C file or any of the asm versions, for any arch or subarch, has been modified. Obviously in some cases the rebuild would be spurious, but such files are sufficiently small that I don't care; the simplicity of a universal rule with no arch-dependent dependency data to maintain is much more valuable. Unfortunately, I don't know a way to do this with make, but I believe there should be a way... Rich