From patchwork Thu Aug 8 16:20:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: frobware X-Patchwork-Id: 18900 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 43E8B248D3 for ; Thu, 8 Aug 2013 16:20:49 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf3832606yhz.11 for ; Thu, 08 Aug 2013 09:20:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=4aswFHJp/6ZQvMX7IRPhiZs/Gd3YWDW7yuCU6U5shS8=; b=eWsx57Heehr1lbf5jG2azgMaItPlBSwBgnhzThr5r3G7C3DmcFp+KEKbsnDeUk11YW gysxZX0T2TSC6EKO05TfKTkjhortZflS+EJgaa3bz+0IR1ROglh/JkUJ9VfzWgMmL/If A2bU10/Z/7fy7TLWNqY/1GQAC10iap0uFss3Kr9rEiCjdpEe6/nLI7Qz+Kg69Ga9R1OP w+QEUUevyEitbaTakO27+mwni15ePEsarQwEXSls3nERY7FKVKWdQUne+yhkRT/nmIuB 6WEH32clToL2XbLZl+/gIoj6VYUNWyinYG53zJgNbUPy3cVyLf/CRAXBswAJmCxfnBjH W2qQ== X-Received: by 10.236.54.135 with SMTP id i7mr3906006yhc.33.1375978848797; Thu, 08 Aug 2013 09:20:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.105.3 with SMTP id gi3ls865415qeb.81.gmail; Thu, 08 Aug 2013 09:20:48 -0700 (PDT) X-Received: by 10.58.135.167 with SMTP id pt7mr3533293veb.75.1375978848649; Thu, 08 Aug 2013 09:20:48 -0700 (PDT) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id fw17si3308112vec.28.2013.08.08.09.20.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 09:20:48 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id h11so3392824vbh.16 for ; Thu, 08 Aug 2013 09:20:48 -0700 (PDT) X-Gm-Message-State: ALoCoQlt6xf5/seBJqUEefw7BCX+m9WL5YMXDE7L5Lj+GIfBKjVwNx0P5vUCde05aLRIccxDNjNc X-Received: by 10.220.164.138 with SMTP id e10mr4486473vcy.27.1375978848560; Thu, 08 Aug 2013 09:20:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp24363vcz; Thu, 8 Aug 2013 09:20:48 -0700 (PDT) X-Received: by 10.14.99.71 with SMTP id w47mr8818691eef.123.1375978847489; Thu, 08 Aug 2013 09:20:47 -0700 (PDT) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by mx.google.com with ESMTPS id l4si11515932eew.281.2013.08.08.09.20.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 09:20:47 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.53 is neither permitted nor denied by best guess record for domain of andrew.mcdermott@linaro.org) client-ip=74.125.83.53; Received: by mail-ee0-f53.google.com with SMTP id b15so1638056eek.12 for ; Thu, 08 Aug 2013 09:20:46 -0700 (PDT) X-Received: by 10.15.63.142 with SMTP id m14mr8941921eex.106.1375978846688; Thu, 08 Aug 2013 09:20:46 -0700 (PDT) Received: from spicy.frobware.com (host86-136-122-180.range86-136.btcentralplus.com. [86.136.122.180]) by mx.google.com with ESMTPSA id m54sm20439502eex.2.2013.08.08.09.20.45 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 09:20:46 -0700 (PDT) From: Andrew McDermott To: devel@acpica.org, patches@linaro.org Cc: Andrew McDermott Subject: [PATCH] generate/unix/iasl: fix parallel build Date: Thu, 8 Aug 2013 17:20:01 +0100 Message-Id: <1375978801-1020-1-git-send-email-andrew.mcdermott@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: andrew.mcdermott@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , A parallel build fails because the rules for generating the YACC derived files get invoked twice, given the current dependency graph, and the simultaneous invocation trashes the generated headers. This commit makes the YACC generated headers depend on the YACC generated source files which serialises that part of the build. By making all $(OBJECTS) depend on the headers we have a dependency graph that will first generate the YACC derived .c's, then the .h's which, when complete, will allow all the $(OBJECTS) to be built in parallel. Signed-off-by: Andrew McDermott --- generate/unix/iasl/Makefile | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/generate/unix/iasl/Makefile b/generate/unix/iasl/Makefile index e9520ed..672e519 100644 --- a/generate/unix/iasl/Makefile +++ b/generate/unix/iasl/Makefile @@ -212,13 +212,10 @@ INTERMEDIATES = \ MISC = \ $(OBJDIR)/aslcompilerparse.h\ $(OBJDIR)/aslcompiler.y.h\ - $(OBJDIR)/aslcompilerparse.output\ $(OBJDIR)/dtparserparse.h\ $(OBJDIR)/dtparser.y.h\ - $(OBJDIR)/dtparserparse.output\ $(OBJDIR)/prparserparse.h\ - $(OBJDIR)/prparser.y.h\ - $(OBJDIR)/prparserparse.output + $(OBJDIR)/prparser.y.h # # Flags specific to iASL compiler @@ -240,21 +237,29 @@ include ../Makefile.rules $(OBJDIR)/aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l $(ASL_COMPILER)/aslsupport.l $(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l -$(OBJDIR)/aslcompilerparse.c $(OBJDIR)/aslcompilerparse.h : $(ASL_COMPILER)/aslcompiler.y +$(OBJDIR)/aslcompilerparse.c : $(ASL_COMPILER)/aslcompiler.y $(YACC) $(YFLAGS) -pAslCompiler -o$@ $? $(OBJDIR)/dtparserlex.c : $(ASL_COMPILER)/dtparser.l $(LEX) $(LFLAGS) -PDtParser -o$@ $? -$(OBJDIR)/dtparserparse.c $(OBJDIR)/dtparserparse.h : $(ASL_COMPILER)/dtparser.y +$(OBJDIR)/dtparserparse.c : $(ASL_COMPILER)/dtparser.y $(YACC) $(YFLAGS) -pDtParser -o$@ $? $(OBJDIR)/prparserlex.c : $(ASL_COMPILER)/prparser.l $(LEX) $(LFLAGS) -PPrParser -o$@ $? -$(OBJDIR)/prparserparse.c $(OBJDIR)/prparserparse.h : $(ASL_COMPILER)/prparser.y +$(OBJDIR)/prparserparse.c : $(ASL_COMPILER)/prparser.y $(YACC) $(YFLAGS) -pPrParser -o$@ $? +$(OBJDIR)/aslcompilerparse.h : $(OBJDIR)/aslcompilerparse.c + touch $@ + +$(OBJDIR)/dtparserparse.h : $(OBJDIR)/dtparserparse.c + touch $@ + +$(OBJDIR)/prparserparse.h: $(OBJDIR)/prparserparse.c + touch $@ # # Rename the headers produced by bison/yacc @@ -279,19 +284,21 @@ $(OBJDIR)/prparser.y.h: $(OBJDIR)/prparserparse.h # by the utilities above and they are not necessarily ANSI C, etc. # $(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< + +$(OBJECTS): $(HEADERS)