From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 6953C3858CDA for ; Thu, 21 Mar 2024 14:33:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6953C3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6953C3858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::636 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711031592; cv=none; b=o30OIl8/utcJ+os7H2r+02wzfz75u5eUZvVPqUbsZcTR07xDkTgiAMCnBd4fizdOyhz/p64nUQmlfVd4oP1Fvt6vzmTcVCXA0+Mi2GTBePMWK9LvDpYqkl728pDd1NoK95zSU9PSjy+y5DbRgcLi7TBkhLEVpnPwcRISMAGRyr0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711031592; c=relaxed/simple; bh=exrS5Cncs8sT4Jed1gLVT5Q84rvADDMDi9EeU5JUwEY=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Sq4TpcvMznwx1ROIeuVixXEl04hS4pNG4+F19dvHIt1wkL6u45brzx+Y9lJXbW9E/NfAF5cyUZzrt8K+UO6hOj6qjs59TZM3HlTre4CmuDihbO9aI6hsx/16GjkOvPGigDDLlaH9JsYzvNlMBOVY3f3rXLdEZo9oUc+KHOUSgGs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a470d7f77eeso106666266b.3 for ; Thu, 21 Mar 2024 07:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711031581; x=1711636381; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s4nusIIhnbt+OrwOItF2mNXZ70HBH7V6F+dPKkEgWCk=; b=a9cT6hVbFhcUj7mBkcZSkxgDU7iNZQnR6TG2zGHtB+HzHe26t4Zlh83dUDbs2rnh6E wgMYsYMWJ/uztNE7tNzRNGiYyCWQM9po95u7+pmjARFAHAVyv87gRFa+1hlQuXXMk//J 3Mt5eI8AUpIpaU9puwKhZsD5tQ/OoZLWasWnMjc+u8ukq+XCGO/vkgKJdjaOfhLp6drJ LsmyeiLFSY4pi/UViANxO0ONImSXmxw2r1rlv5sdzx5r/lnRIUH+aZww4ALtLTycvj8Y OMnz0WY2vOknxeJJAyjoYcHXaq3wdN/L9HSiz4JrXqRsAkG7p2pVjniq1rivaTpYmAJG YNDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711031581; x=1711636381; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s4nusIIhnbt+OrwOItF2mNXZ70HBH7V6F+dPKkEgWCk=; b=t53oxMZI91XwQfLe8MCS8uWC+sTeuISyN4o7BJ+DCEM+gcSSBCts85Bek9OrpLh0Wu ZXsXe2hfZZLW/MO3IWt/Qc/ugs1p9UUk4jywpXv4XIhXsPKrs04wiIRYw91cg9oK/I9D rfiL8yUjVYK3Tu2S+UIEwVIwp8TwK+kbXej5LOQNVlXzg08fjGorGkqWXzoMmaG+oeUe qv5ASVrIDppVebII++ZBpgAmo3ErJCK5V/TOi+2qyZG7RF3XBhu5noRDrrBnvwlHECJo uWzKE1NxSveVGeqxhxeZ8JM3eewfRtl7ddOPp84WNhJEdsNgg2PdzJ88D4UsbUrSSJS4 jzXw== X-Forwarded-Encrypted: i=1; AJvYcCWVGmGmvn/QfJALwGnWh5MX+RyyXcM8fAVUC+ZkIQnzKet4EMw+TATK3G7vKTXLwXi9Tkucvp843vPHMrDdp8M= X-Gm-Message-State: AOJu0YyXmtAo+qGtpzo5a0iTJYCrkvD90H2yBbBtgnedXvY0F5wExX1p lc73PDWlTkeqL09wa13ez8S94m3hWJ+jCQWc/D8mpDQjlcOxgtNmPRr/rX5lBqhdnbckJkUxI9S HqLSZdsqk3HL+W4zaFhq/Ei75pbB8qKnvblpB4MfLFjRLPLZg+wo= X-Google-Smtp-Source: AGHT+IFXQki7aQ3FWXDQC10lePle/W3v3dTheJMQ6HRPwSpcYKmfAbmd1VBOx8kTCG9JmC1ESzMINHOo+Eh1Kisuvnc= X-Received: by 2002:a17:906:46c8:b0:a46:d718:cd28 with SMTP id k8-20020a17090646c800b00a46d718cd28mr3349847ejs.1.1711031580957; Thu, 21 Mar 2024 07:33:00 -0700 (PDT) MIME-Version: 1.0 References: <20240313080237.1143034-1-christophe.lyon@linaro.org> <1eb529f2-3842-4090-a8e2-f713a28f2394@simark.ca> <33f72ef7-f990-437d-8fc4-dba08d7db24b@simark.ca> In-Reply-To: <33f72ef7-f990-437d-8fc4-dba08d7db24b@simark.ca> From: Christophe Lyon Date: Thu, 21 Mar 2024 15:32:51 +0100 Message-ID: Subject: Re: [RFC] add regenerate Makefile target To: Simon Marchi Cc: binutils@sourceware.org, gdb@sourceware.org, gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 20 Mar 2024 at 16:34, Simon Marchi wrote: > > On 3/18/24 13:25, Christophe Lyon wrote: > > Well the rule to regenerate Makefile.in (eg in in opcodes/) is a bit > > more complex > > than just calling automake. IIUC it calls automake --foreign it any of > > *.m4 file from $(am__configure_deps) that is newer than Makefile.in > > (with an early exit in the loop), does nothing if Makefile.am or > > doc/local.mk are newer than Makefile.in, and then calls 'automake > > --foreign Makefile' > > The rules looks complex because they've been generated by automake, this > Makefile.in is not written by hand. And I guess automake has put > `--foreign` there because foreign is used in Makefile.am: Yes, I know :-) > > AUTOMAKE_OPTIONS = foreign no-dist > > But a simple call so `automake -f` (or `autoreconf -f`) just works, as > automake picks up the foreign option from AUTOMAKE_OPTIONS, so a human > or an external script who wants to regenerate things would probably just > use that. Indeed. I guess my concern is: if some change happens to Makefile.am/Makefile.in which would imply that 'autoreconf -f' would not work, how do we make sure autoregen.py (or whatever script) is updated accordingly? Or maybe whatever change is made to Makefile.am/Makefile.in, 'autoreconf -f' is supposed to handle it without additional flag? > > > The bot I want to put in place would regenerate things as they are > > supposed to be, then build and run the testsuite to make sure that > > what is supposed to be committed would work (if the committer > > regenerates everything correctly) > > For your job, would it be fine to just force-regenerate everything and > ignore timestamps (just like the buildbot's autoregen job wants to do)? > It would waste a few cycles, but it would be much simpler. > Yes, that would achieve the purpose: be able to handle as many patches as possible in precommit-CI. And as described earlier, for binutils this currently means: autoregen confgure --enable-maintainer-mode make all (with a low -j value otherwise we have random build failures) and my proposal to workaround the problem with -j is to do make all-bfd all-libiberty regenerate -j1 make all -j XXX Another possibility would be a policy change in how patches are submitted, to require that they contain all the autogenerated files. > Simon