From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13663 invoked by alias); 20 Dec 2002 02:23:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13645 invoked from network); 20 Dec 2002 02:23:34 -0000 Received: from unknown (HELO egil.codesourcery.com) (66.92.14.122) by 209.249.29.67 with SMTP; 20 Dec 2002 02:23:34 -0000 Received: from zack by egil.codesourcery.com with local (Exim 3.36 #1 (Debian)) id 18PCoh-00008Z-00; Thu, 19 Dec 2002 18:23:11 -0800 To: Nathanael Nerode Cc: gcc-patches@gcc.gnu.org, binutils@sources.redhat.com, gdb-patches@sources.redhat.com, dj@redhat.com Subject: Re: (toplevel patch) Fix multilib.out dependencies and related problems References: <20021220015902.GA1721@doctormoo> From: Zack Weinberg Date: Thu, 19 Dec 2002 18:24:00 -0000 In-Reply-To: <20021220015902.GA1721@doctormoo> (Nathanael Nerode's message of "Thu, 19 Dec 2002 20:59:02 -0500") Message-ID: <874r99mnsg.fsf@egil.codesourcery.com> User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00572.txt.bz2 Nathanael Nerode writes: >>> Uh, yeah. Make isn't designed to realize that you can change a file >>> and not change the generated file depending on it; this is not an >>> unreasonable assumption in most cases. To put it another way, I >>> don't care very much. >> >>Except that gcc's makefile does this all over the place, and it works >>just fine. I was told about this trick in school - in 1986, on a >>Gould mainframe. It works. >> >>multilib.out : gcc/xgcc >> gcc/xgcc --print-multilibs > multilib.tmp >> $(srcdir)/move-if-change multilib.tmp multilib.out > Right. I'm happy to do this. The Right Thing is ever so slightly more complicated: STAMP = echo timestamp > multilib.out : s-multilib ; @true s-multilib : gcc/xgcc gcc/xgcc --print-multilibs > multilib.tmp $(srcdir)/move-if-change multilib.tmp multilib.out $(STAMP) s-multilib [plus, make sure to delete s-multilib as well as multilib.out on 'make clean'.] What this does for you is avoid running the actual rule for multilib.out if gcc/xgcc hasn't changed. Instead, it only runs the rule for s-multilib, which is a no-op. zw