From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DgEsE5RF/GVfWRAAWB0awg (envelope-from ) for ; Thu, 21 Mar 2024 10:35:00 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ElU/JytI; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 42D821E0C0; Thu, 21 Mar 2024 10:35:00 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 312011E030 for ; Thu, 21 Mar 2024 10:34:58 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C6485385843A for ; Thu, 21 Mar 2024 14:34:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6485385843A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711031697; bh=s4nusIIhnbt+OrwOItF2mNXZ70HBH7V6F+dPKkEgWCk=; h=References:In-Reply-To:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ElU/JytIKP5mGhDInq+M2Fp7zQX06xrQJqFNC4auzZ4OMwRljdEh7lwHW4exfAPLs 5QhE2KUUZ9DX1vhEM/6+FEudxOmalTEOQiW3ePAVmhbREuAhS05S19kbWJiWwJTwuX L1qfHF9crpL4nYSlOxeUXTwm6CP4m2yOotcoQDzE= Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 692D43858CD1 for ; Thu, 21 Mar 2024 14:33:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 692D43858CD1 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 692D43858CD1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711031592; cv=none; b=u4uxitMtSSQUZ+ar6im+QM1KqpYVNxWafMzzvZXqTBK+Rda5aO2aLtNs2OlzYrk8At76+shFBu7k2KPwvS9O26DhOLcaCHrZLhNUuojE3ES+ztp/fOMbzvqnEQ+R2lDeGdhVkR5oVom1VqM/rEyLLqsRzeSD5J4zlicT+fziXpU= 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=iHfaLNDxv60sdxAij8EDwr3/P7k8Aco+iD2vASZlh2ISZxKKNIP5zQIEhXSDSdOxsWmMEYlCA8ybt+yXrIA4Gzamo8hpxgEoFS2VQqVX3ZKLVXHbRd2sLedhErB74H7ag1gB6E7FeAEro7BjPQf8Kvw5DjQxZR0Ga0Vb13GRH5U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-56b0af675deso1232983a12.1 for ; Thu, 21 Mar 2024 07:33:02 -0700 (PDT) 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=DOS03IODF1C08fVYlDZARx+BDcY90vwxZCPeN4DOyeJXX05DIlDU7zP+6zOwtNMw+N sp/mjV/K6mqG4ttqpfhOaI6T4jifaFZ97tCy+tc7QlntmE5EMQuBncDBcAUA4kCawXUE PlehaMA+qlgchBv/+s7m6JkVU52gwnTnvgXng9TbtoXG9cmwMqCfU0FHunK/H4cyyWZn POSzYeZoXzUVyMrDMAeNFFwhUCylRQJTby6WQhO4Af+QJp5FraX9Ld/yWejtCBcVpk5a SRezwXZ5TrsslnPhoAVJsj/O/yAvlf5UL4mt6PBrsELrcBKkkpa9ZiMOHhgsk3a7dOy7 llTQ== X-Forwarded-Encrypted: i=1; AJvYcCUyW7tMDmdDquNMma3hHw66UAH3eaNm1JemcY8orIZSUslgDsvEQzy9F3i6HUJJicblItjbvNUevl6U3HNvE2S8waE= X-Gm-Message-State: AOJu0Yyx/aWBPBDXHv/UHPzIcIHTjPo5PYh7o5hO/7Dw39Smawb6b6eD D8cGaec8ZalN9mlbPBkQsmyVDPm0WxpoDzowNHyYCf8o6zcbkGVMld8VyCWk+Nl/xB8G43Abtao BnqJWQbxMn9KYLnQLiDzjaUbPzPuQ6qBYCAW55A== 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> 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 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Christophe Lyon via Gdb Reply-To: Christophe Lyon Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" 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