Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLJOK-0008Fu-FA for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Aug 2022 07:11:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oLJOJ-0001SJ-EI for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Aug 2022 07:11:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLJOH-0001SA-Ct for pgsql-hackers@lists.postgresql.org; Tue, 09 Aug 2022 07:11:03 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLJOE-00011i-DI for pgsql-hackers@postgresql.org; Tue, 09 Aug 2022 07:11:00 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2FC615C00BF; Tue, 9 Aug 2022 03:10:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 09 Aug 2022 03:10:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1660029057; x=1660115457; bh=VtGbwwa5Zz HoIPV78iIj9OdJTv7F7pZMU1c7K5wcV+0=; b=t3Kdvpk/OvVKSX2wDar6EDUDVU b8ITcjN0kyKtjqcoshregXyw8izEi45zF86IcKPQnuwfbOxd0oVhbIlqSDmcZxs6 CYm/wClluMjC0k8ZfDAE5w/3KChU+qzI/VPfqHrPBMSe30ztpNRxTwJxnppPHmci bbzEtJzZEeuJsp837OcZPZRGHCozlJAky0yXNn1QwD0B8Dw5KXcKPqr9YJofO3vz DDUI7Tp7UylbaSqlVdpWfXo81BaPILgkHuc7G10upmtk2NcDgJt8YTw3Natpxv4l z0YzPI9j6ckSSW5EVD6o4SUczN2r+3oe62IktE4G2spr82P4ma5Pl3ecbkSA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1660029057; x=1660115457; bh=VtGbwwa5ZzHoIPV78iIj9OdJTv7F 7pZMU1c7K5wcV+0=; b=s80WYagwN4UuiZltX5C87j6qyuNKH2nL3RpjH2kktIMG tr6a8Xf5W5B1ho7zOqIHw0O3Mz7jus27fNI/RkfxIQgWIbCQJK1myRABM4FOwB35 IQ6H3wmuRQ/UL4plcq8Ih91TbR44na/jxkb3BLz68frVtLXcIK2JlKnX1V7eIRUk gJIalVie8ibTfrnbaBJRL0767SqeSGXi0ViLac0UCzfl9JZWo93aAx6rmoFWrJGE xZOtsTAK5mFqYGjFkGwMWQSEOHv5bLsGhHBmRfcSEnRSOmOaeWs+sgG4p+v/Kz+d HiaJ/czG1z/WGAFS4JlE+Cpn9cHTQ2N+dXdq0L1f/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdefledguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeff hfeuffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Aug 2022 03:10:56 -0400 (EDT) Date: Tue, 9 Aug 2022 00:10:55 -0700 From: Andres Freund To: pgsql-hackers@postgresql.org, Andrew Dunstan , Magnus Hagander Subject: Re: [RFC] building postgres with meson Message-ID: <20220809071055.rgikv3qn74ypnnbb@awork3.anarazel.de> References: <20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I was looking at re-unifying gendef2.pl that the meson patchset had introduced for temporary ease during hacking with gendef.pl. Testing that I noticed that either I and my machine is very confused, or gendef.pl's check whether it can skip work is bogus. I noticed that, despite having code to avoid rerunning when the input files are older than the .def file, it always runs. # if the def file exists and is newer than all input object files, skip # its creation if (-f $deffile && (-M $deffile > max(map { -M } <$ARGV[0]/*.obj>))) { print "Not re-generating $defname.DEF, file already exists.\n"; exit(0); } My understanding of -M is that it returns the time delta between the file modification and the start of the script. Which makes the use of max() bogus, since it'll return the oldest time any input has been modified, not the newest. And the condition needs to be inverted, because we want to skip the work if $deffile is *newer*, right? Am I missing something here? I'm tempted to just remove the not-regenerating logic - gendef.pl shouldn't run if there's nothing to do, and it'll e.g. not notice if there's an additional input that wasn't there during the last invocation of gendef.pl. Greetings, Andres Freund