From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29163 invoked by alias); 1 Sep 2009 07:11:33 -0000 Received: (qmail 29139 invoked by uid 22791); 1 Sep 2009 07:11:32 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_72,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f216.google.com (HELO mail-ew0-f216.google.com) (209.85.219.216) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Sep 2009 07:11:25 +0000 Received: by ewy12 with SMTP id 12so4128171ewy.0 for ; Tue, 01 Sep 2009 00:11:22 -0700 (PDT) Received: by 10.210.139.17 with SMTP id m17mr5785245ebd.7.1251789082007; Tue, 01 Sep 2009 00:11:22 -0700 (PDT) Received: from ?192.168.2.99? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 24sm1060698eyx.21.2009.09.01.00.11.20 (version=SSLv3 cipher=RC4-MD5); Tue, 01 Sep 2009 00:11:21 -0700 (PDT) Message-ID: <4A9CCC56.9090008@gmail.com> Date: Tue, 01 Sep 2009 07:11:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Jie Zhang CC: Ralf.Wildenhues@gmx.de, binutils@sourceware.org Subject: Re: Parallel build error for Blackfin target References: <4A9CC410.7060301@analog.com> In-Reply-To: <4A9CC410.7060301@analog.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00015.txt.bz2 Jie Zhang wrote: > Previously > > bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h > $(COMPILE) -c $< $(NO_WERROR) > > Now > > bfin-lex.o: bfin-lex.c > if am__fastdepCC > $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ > bfin-lex.c $(NO_WERROR) > mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po > else > if AMDEP > source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@ > DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ > endif > $(COMPILE) -c bfin-lex.c $(NO_WERROR) > endif > > Should I add back "bfin-parse.h $(srcdir)/config/bfin-defs.h" as the > dependency of bfin-lex.o? Perhaps $(srcdir)/config/bfin-defs.h should be added as a preqrequisite of bfin-parse.c (and hence implicitly of bfin-parse.h). Really the whole thing needs some kind of sentinel or stamp wrapped around it(*); what we've got here is the typical "make doesn't understand when a single rule updates more than one target at once" situation. Running the rule for bfin-parse.c actually also creates bfin-parse.h, which is what necessitates the not-really-true-actually dependency of bfin-parse.h on bfin-parse.c and the corresponding "@true" build rule. See also Paul D. Smith's Rules of Makefiles; this violates #2. cheers, DaveK -- (*) - or perhaps to be converted to a multiple-output pattern rule, the other way to resolve this kind of situation and the one place where make does understand it might generate multiple outputs from a single rule.