From patchwork Fri Apr 5 12:21:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 88082 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A5F4A3844764 for ; Fri, 5 Apr 2024 12:22:21 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 951873858424 for ; Fri, 5 Apr 2024 12:21:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 951873858424 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 951873858424 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712319707; cv=none; b=QpnQjAg9Wx3YnYde5c3M9nWAayuJE5QIbWml8YXfsKYmezS7DKrr6vWRhfuOayEIqj0pQ0LKJkllGJiza5j5T3Wkt0KGvwyuSWvt/KI6TRP3mP2Rbsp3prJPN7pQ3U/+Mad87OFJWYcDcm1+/hWjZ+6AIyI4LH5E+6YAJB7F5zY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712319707; c=relaxed/simple; bh=X/jgVdQSi3IttcNtCB7JvzBTiOEI4gS1Qj7ZTGnhVRo=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=h8ZbKZSovZ1R4mJF71z4MKOXTpzP7T3E7yb544gtPIFf4f1qJqgWokjgag/HXhf1itgj4NpPxkHZkjBgw7wUrC4eCgwNT+w1SkDZcDJRyfMXae/LnSBf9QE7Zd/6KMAZW6LpVsnJsePkvoY2Qp4ImH5NzvFkc48fikF3j1Iimiw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712319699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jXUZhxtMpLmldkBXBladnvQAfpr4TalZ+O3CYtiY58g=; b=IaFNnDI7ImNREJmVJtpw4qEmHC9ybTcjHOm0yH9fY1zK2rYcX++wEUwCKE7in8mB57deHW fbsGX3VjdDGPtzVDgHtlWFtmP75T8XQhSHRF2i69KUSsdhVdn6t2Fym2Q5fZ26YELEHSu0 +kJUE4ns2J2Jjz+Jyd7zzkBsLUydlxU= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-116-aVvzUohaNTGl3rEMwt7vWA-1; Fri, 05 Apr 2024 08:21:37 -0400 X-MC-Unique: aVvzUohaNTGl3rEMwt7vWA-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-56e1f298b9dso1021057a12.0 for ; Fri, 05 Apr 2024 05:21:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712319696; x=1712924496; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jXUZhxtMpLmldkBXBladnvQAfpr4TalZ+O3CYtiY58g=; b=R78E56dWtM2tqNLLTLQBr7MA4og+GjWmUBBQttLEmLRtJ5/bIW5Q29LSLT21P39Bbe XaKZC3VqZpxv0QEkwLP8hi/U+Y2Ep00jQdD1KJRpz5jcxU3/ki7XlcVOI6tr1unmRscI 6IpQYIcBC8QL0Z50cCDr3Wr1s02ev/rPHiGt1JMKpGsWG0w1grSkbgMxBSGQtUPXffCb n1bdfaDK6n58CbR15bqiBN4P1P1g87FuncTQS5NdZ4XFJLS74X1F3p5a3OF95oDJBZXU 8iYCjDVeKQwMuSvNOwhX2iTTiFcpLoosTq5bVkHRn3sVUXUwz5I8DvRqm16JZD+qr1A9 gK7g== X-Gm-Message-State: AOJu0YzjUrAW6+KL8y/7pgRs5g6aPabSX8kDE2vyZPdEetC15CNCfwzF bD7/tabD5sYOwTX0YNon+JvVD3soUx4JBHPrOVGMUsCHSTVkfZxYHBor/bS/zEFM3obBOIqFZH9 V7yzl/cZ5mQ7vfwxSYznfxjN+m+JY1X5LLB4hyrIOCubwIwurPs8JbXgjq6c1So65/pLfKQZ4Sk dkw2yYRA63axgduja4d1gXCLersUMvSn4q2AsDIUmUrUM= X-Received: by 2002:a50:bb48:0:b0:56c:4f5:7227 with SMTP id y66-20020a50bb48000000b0056c04f57227mr832891ede.41.1712319696200; Fri, 05 Apr 2024 05:21:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHh8MdxJT39V18D1VDWIDB+qU8ydDKqYMpSUUSFbbkzevGPPd4fxnoDoXoNe2s2+17Av9M33w== X-Received: by 2002:a50:bb48:0:b0:56c:4f5:7227 with SMTP id y66-20020a50bb48000000b0056c04f57227mr832870ede.41.1712319695629; Fri, 05 Apr 2024 05:21:35 -0700 (PDT) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id a59-20020a509ec1000000b0056bc0c44f02sm755092edf.96.2024.04.05.05.21.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 05:21:33 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 2/4] gdb/Makefile: rewrite dependencies for config.status target Date: Fri, 5 Apr 2024 13:21:26 +0100 Message-Id: <20e8e8749d8119823ce18d23dffd2e47f9ad5791.1712319537.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org I noticed something weird, the rule for the config.status target looks like this: config.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh $(SHELL) config.status --recheck What bothered me is that 'configure' is specified as being in $(srcdir), while all of the other files are not, even though those files are in the same $(srcdir) as the configure script. However, I tried touching one of those files, and the config.status rule does trigger! This is thanks to the VPATH variable, which is set to $(srcdir), so make looks in $(srcdir) for any dependencies. However, this inconsistency bothers me. Better, I think, to add the $(srcdir) prefix to each of these files. I also spotted that the configure script also includes the files ../bfd/config.bfd, yet that is missing from the include list, so in this commit I plan to add this as a dependency. The configure script also pulls in two TCL and TK related files: . ${TCL_BIN_DIR}/tclConfig.sh . ${TK_BIN_DIR}/tkConfig.sh However, I don't think ${TCL_BIN_DIR} and ${TK_BIN_DIR} are currently visible in GDB's Makefile, so I'm not planning to add these dependencies at this time. In this commit I add a new variable config_status_deps which holds the list of all the dependencies for config.status, with the $(srcdir) prefix included, and then I use this in the config.status rule. After this commit config.status will regenerate if config.bfd changes, which it wouldn't before, but nothing else changes. --- gdb/Makefile.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index df044288b5e..9340becbdc9 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2333,7 +2333,18 @@ nm.h: stamp-nmh ; @true stamp-nmh: config.status $(SHELL) config.status nm.h -config.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh +# Files included from config.status or the configure script. When +# these change the configure script doesn't need regenerating, but its +# output (and so that of config.status) might change. +config_status_deps = \ + $(srcdir)/configure \ + $(srcdir)/configure.nat \ + $(srcdir)/configure.tgt \ + $(srcdir)/configure.host \ + $(srcdir)/../bfd/development.sh \ + $(srcdir)/../bfd/config.bfd + +config.status: $(config_status_deps) $(SHELL) config.status --recheck ACLOCAL = aclocal