Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fZzdC-0004xf-Ob for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Jul 2018 14:16:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fZzdA-0006KQ-CO for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Jul 2018 14:16:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fZzdA-0006KJ-5p for pgsql-hackers@lists.postgresql.org; Mon, 02 Jul 2018 14:16:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fZzcy-0004sL-P0 for pgsql-hackers@postgresql.org; Mon, 02 Jul 2018 14:16:39 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w62EGMb1002815; Mon, 2 Jul 2018 10:16:22 -0400 From: Tom Lane To: Andrew Gierth cc: Peter Eisentraut , pgsql-hackers@postgresql.org, Andres Freund Subject: Re: Should contrib modules install .h files? In-reply-to: <87lgatohzp.fsf@news-spur.riddles.org.uk> References: <87y3euomjh.fsf@news-spur.riddles.org.uk> <87tvpinfr4.fsf@news-spur.riddles.org.uk> <63444.1530537990@sss.pgh.pa.us> <87lgatohzp.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Mon, 02 Jul 2018 15:10:42 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <63654.1530540982.1@sss.pgh.pa.us> Date: Mon, 02 Jul 2018 10:16:22 -0400 Message-ID: <63655.1530540982@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> FWIW, I agree with Andres' thought that each contrib module should > Tom> have its own subdirectory under $(includedir_server). Otherwise > Tom> we're going to be faced with questions about whether .h files need > Tom> to be renamed because they're not globally unique enough. There > Tom> are already some that are pretty shaky from this standpoint: > I'm not suggesting that all modules should install a .h file or that all > of a module's .h files should be installed. I agree with that, which implies the need for a new macro comparable to DATA and DOCS that lists the .h files to be installed. > A slight snag in trying to use a subdir for each module is that there is > not in fact anywhere in the existing makefiles that uses or assigns such > a name. Indeed some contrib subdirs install multiple modules. So, given that we have to add something to the module makefiles anyway, we could also add a macro specifying the subdirectory name to use. (Although in practice this should always be equal to the contrib/ subdirectory name, so maybe we could extract it on that basis?) regards, tom lane