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 1fa0f2-0000ZS-2y for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Jul 2018 15:22:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fa0f0-0008D2-GE for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Jul 2018 15:22:38 +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 1fa0f0-0008Cv-9c for pgsql-hackers@lists.postgresql.org; Mon, 02 Jul 2018 15:22:38 +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 1fa0ep-000722-Kl for pgsql-hackers@postgresql.org; Mon, 02 Jul 2018 15:22:37 +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 w62FML4q006275; Mon, 2 Jul 2018 11:22:21 -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: <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> <87h8lhoevw.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Mon, 02 Jul 2018 16:11:07 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <63818.1530544945.1@sss.pgh.pa.us> Date: Mon, 02 Jul 2018 11:22:25 -0400 Message-ID: <63819.1530544945@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> 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. Fair point. > 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. AFAIR, you're supposed to define at most one of those macros anyway, so I don't see why it couldn't be like "use MODULE_big if set, else use MODULE if set, else fail if MODULE_NAME isn't set". regards, tom lane