From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114128 invoked by alias); 15 Nov 2016 18:41:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 114107 invoked by uid 89); 15 Nov 2016 18:41:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,KAM_ASCII_DIVIDERS,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Nov 2016 18:41:52 +0000 Received: by simark.ca (Postfix, from userid 33) id 7FC161E141; Tue, 15 Nov 2016 13:41:50 -0500 (EST) To: Pedro Alves Subject: Re: [PATCH 2/4] Makefile: Replace explicit subdir rules with pattern rules X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 15 Nov 2016 18:41:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <6f62ae95-b0a4-48cc-cc09-63a57fa18c44@redhat.com> References: <20161113034625.8237-1-simon.marchi@polymtl.ca> <20161113034625.8237-3-simon.marchi@polymtl.ca> <0af6b4a0-1c57-59ba-c25f-24a68136a6c5@redhat.com> <6f62ae95-b0a4-48cc-cc09-63a57fa18c44@redhat.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.2 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00386.txt.bz2 On 2016-11-15 13:36, Pedro Alves wrote: > On 11/15/2016 06:00 PM, Simon Marchi wrote: >> On 2016-11-15 12:54, Pedro Alves wrote: >>> On 11/13/2016 03:46 AM, Simon Marchi wrote: >>>> # Need to explicitly specify the compile rule as make will do >>>> nothing >>>> # or try to compile the object file into the sub-directory. >>> >>> Do these comments need adjustment? >> >> I thought they were still true and relevant after the change. What do >> you think? > > But should we at least merge them? Looking at your branch on github, > we end up with: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > # > # gdb/cli/ dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: $(srcdir)/cli/%.c > $(COMPILE) $< > $(POSTCOMPILE) > > # GCC Compile support dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: $(srcdir)/compile/%.c > $(COMPILE) $< > $(POSTCOMPILE) > > # > # GDBTK sub-directory > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the mi directory. > > all-gdbtk: insight$(EXEEXT) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > The last one is strange, for talking about MI. > > > And then a bit further below, we have the same comment several > times again: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > # > # gdb/mi/ dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: $(srcdir)/mi/%.c > $(COMPILE) $< > > # gdb/common/ dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: ${srcdir}/common/%.c > $(COMPILE) $< > $(POSTCOMPILE) > > common-agent.o: $(srcdir)/common/agent.c > $(COMPILE) $(srcdir)/common/agent.c > $(POSTCOMPILE) > > # > # gdb/target/ dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: ${srcdir}/target/%.c > $(COMPILE) $< > $(POSTCOMPILE) > > # > # gdb/arch/ dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: ${srcdir}/arch/%.c > $(COMPILE) $< > $(POSTCOMPILE) > > # gdb/nat/ dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: ${srcdir}/nat/%.c > $(COMPILE) $< > $(POSTCOMPILE) > > # > # gdb/tui/ dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: $(srcdir)/tui/%.c > $(COMPILE) $< > $(POSTCOMPILE) > > # gdb/guile dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > %.o: $(srcdir)/guile/%.c > $(COMPILE) $< > $(POSTCOMPILE) > > # gdb/python/ dependencies > # > # Need to explicitly specify the compile rule as make will do nothing > # or try to compile the object file into the sub-directory. > > # Flags needed to compile Python code > PYTHON_CFLAGS=@PYTHON_CFLAGS@ > > %.o: $(srcdir)/python/%.c > $(COMPILE) $(PYTHON_CFLAGS) $< > $(POSTCOMPILE) > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > I think a single comment talking about needing a compile rule for > each subdir, might be clearer/simpler. > > Also, the cases that are exceptions I think would benefit > from a comment, like e.g., the common-agent.o rule. > > Thanks, > Pedro Alves Agreed, I'll do the change in v2. Thanks, Simon