Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5dgc-0000Qd-T9 for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Apr 2018 20:46:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5dgb-0003FA-Of for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Apr 2018 20:46:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5dgb-0003Eo-9r for pgsql-hackers@lists.postgresql.org; Mon, 09 Apr 2018 20:46:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5dgU-00026P-Cb for pgsql-hackers@postgresql.org; Mon, 09 Apr 2018 20:46:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w39KkYMo017756; Mon, 9 Apr 2018 16:46:34 -0400 From: Tom Lane To: Michael Paquier cc: Postgres hackers Subject: Re: pgsql: Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers. In-reply-to: <6629.1523294509@sss.pgh.pa.us> References: <20180409010031.GA11599@paquier.xyz> <16609.1523243109@sss.pgh.pa.us> <20180409061354.GD1740@paquier.xyz> <6629.1523294509@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 09 Apr 2018 13:21:49 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17754.1523306794.1@sss.pgh.pa.us> Date: Mon, 09 Apr 2018 16:46:34 -0400 Message-ID: <17755.1523306794@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Michael Paquier writes: >> That takes care of the problem from the root of the directory, but when >> doing the same from src/bin/ then the same issue shows up even if >> src/Makefile is patched to handle install targets. > Hm. Not sure how far we want to go in that direction. It's never really > been the case that you could configure a maintainer-clean tree and then > go and build in any random subdirectory without taking care of the > generated headers. In principle, we could do something like the hack > Peter did with temp-install, where it's basically forced to be a > prerequisite of "make check" in EVERY subdirectory and then we buy back > some of the inefficiency by making it a no-op in child make runs. Not > sure that's a good thing though. After further contemplation I decided that that was, in fact, the only reasonable way to improve matters. If we have multiple subdirectories independently firing the "make generated-headers" action, then we have parallel make hazards of just the same sort I was trying to prevent. So it's really an all-or-nothing proposition. The MAKELEVEL hack plus wiring the prerequisite into the recursion rules is the best way to make that happen. Hence, done that way. regards, tom lane