From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id o4QCAfio3GCAUAAAWB0awg (envelope-from ) for ; Wed, 30 Jun 2021 13:25:12 -0400 Received: by simark.ca (Postfix, from userid 112) id E87161F1F2; Wed, 30 Jun 2021 13:25:11 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3F2E61E54D for ; Wed, 30 Jun 2021 13:25:11 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BFF6E3877022 for ; Wed, 30 Jun 2021 17:25:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFF6E3877022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625073910; bh=ahwAZK5RO5O3erRQ9708mz/SzN4MqJKqx3oU2fXXYQ8=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=i5nA+qhaqSMC1vKM4y07r24CNu9Hs4sZZ6bOKTzBwmW1odzDwPVXEBb7dsVThjxjo o9+W4CR18gbvN74q4SYQ6tleJiSo4sp3U/gS3L0wmMzEit8gYe9pVtGKXUNoK4SsTZ UGQ9P+LiL3ckU2ShlDYTK9ZoeeSIUThwAeokrn+Q= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 68F97386101A for ; Wed, 30 Jun 2021 17:24:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 68F97386101A Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8573133BEF2; Wed, 30 Jun 2021 17:24:50 +0000 (UTC) Date: Wed, 30 Jun 2021 13:24:50 -0400 To: Tom Tromey Subject: Re: [PATCH] sim: fix arch Makefile regen when unified Message-ID: Mail-Followup-To: Tom Tromey , Mike Frysinger via Gdb-patches References: <20210630005125.7075-1-vapier@gentoo.org> <87k0mbp9ma.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87k0mbp9ma.fsf@tromey.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: Mike Frysinger via Gdb-patches Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 30 Jun 2021 11:04, Tom Tromey wrote: > >>>>> "Mike" == Mike Frysinger via Gdb-patches writes: > > Mike> -@SIM_COMMON_BUILD_TRUE@ cd .. && $(SHELL) ./config.status $(arch)/Makefile > Mike> +@SIM_COMMON_BUILD_TRUE@ pwd=`pwd` && subdir=`basename "$$pwd"` && cd .. && \ > Mike> +@SIM_COMMON_BUILD_TRUE@ $(SHELL) ./config.status Make-common.sim $$subdir/Makefile.sim $$subdir/Makefile > > My understanding is that the argument to config.status is the "tag" (aka > filename) of the output -- so the other arguments aren't needed. > If those are also outputs, there should just be new rules for them. Make-common.sim is a common rule shared by all subdirs. subdir/Makefile.sim & subdir/Makefile are separate rules (and files). Makefile.sim uses the existing autotool infra to rewrite the source subdir/Makefile.in (as i don't think i can easily do this myself), and then the final subdir/Makefile blends the Make-common.sim in. $src/common/Make-common.in -> $build/Make-common.sim $src/$arch/Makefile.in -> $build/$arch/Makefile.sim $build/Make-common.sim + $build/$arch/Makefile.sim -> $build/$arch/Makefile it's a bit convoluted still, but it's not exactly new ... the sim code has been doing this for a while. i've moved bits around by merging into a single configure script, but it's still the same number of bits. the long term plan is to convert it over to automake & subdir/local.mk modules, then this code would all go away. -mike