From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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 692D43858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52d 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711031581; x=1711636381; darn=sourceware.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=hXnJLbdBnFhsyXBHDFPSC9vms5//Bks17638dTaaJITqL02IDNhJR6Bf7qCtY5UVuk 4dZtSb8FqTE0yOKPqfYBoYm+T7kEdvLLi063aFJplYL+JTPq1gpPJbkCDPWNCE9+4hEX 7lxkx0sB0yazA+k4gTPNsUK8gcG1tlkX3OOkId6msKYxEwIIo27DVZutEnIzL2f+7EX7 r5aTj+GSMf6uk3P5/ytNGTLysEiuUQLd7nNzv1HCbiHirQ5KabjPLSj0YIYOVA0PQfGD a6YWvPbp5+vQYWIrtYe3nk4Be5B5fYBRZDft0TBjjM4uRuvynz/VAWAgmxc/26pDFCtm WoUQ== 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> 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