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 1fa0U8-0008G1-7R for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Jul 2018 15:11:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fa0U5-0008FU-Ih for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Jul 2018 15:11:21 +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 1fa0U5-0008FG-C1 for pgsql-hackers@lists.postgresql.org; Mon, 02 Jul 2018 15:11:21 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fa0Tz-0006cp-IH for pgsql-hackers@postgresql.org; Mon, 02 Jul 2018 15:11:20 +0000 Received: from [192.168.127.1] (port=44803 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1fa0Ts-0003Ic-9Y; Mon, 02 Jul 2018 15:11:08 +0000 Received: from [127.0.0.1] (port=10505 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1fa0Tr-0004xq-KQ; Mon, 02 Jul 2018 15:11:07 +0000 From: Andrew Gierth To: Tom Lane Cc: Peter Eisentraut , pgsql-hackers@postgresql.org, Andres Freund Subject: Re: Should contrib modules install .h files? In-Reply-To: <63655.1530540982@sss.pgh.pa.us> (Tom Lane's message of "Mon, 02 Jul 2018 10:16:22 -0400") Message-ID: <87h8lhoevw.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> <63655.1530540982@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Mon, 02 Jul 2018 16:11:07 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Tom" == Tom Lane writes: >> 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. Tom> So, given that we have to add something to the module makefiles Tom> anyway, we could also add a macro specifying the subdirectory name Tom> to use. (Although in practice this should always be equal to the Tom> contrib/ subdirectory name, so maybe we could extract it on that Tom> basis?) Using the subdir name may work for in-tree contrib/ builds but it's not so good for PGXS, which should not be making assumptions about the build directory name. How about this: it's most likely that modules that install include files will also be using MODULE_big, so use that as the default name; if a makefile that uses only MODULES also wants to install include files, have it define MODULE_NAME (or some such variable) itself. -- Andrew (irc:RhodiumToad)