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 1q2CEp-0003cJ-1R for pgsql-hackers@arkaria.postgresql.org; Thu, 25 May 2023 14:46:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q2CEn-00068H-Qk for pgsql-hackers@arkaria.postgresql.org; Thu, 25 May 2023 14:46:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2CEn-00066n-HY for pgsql-hackers@lists.postgresql.org; Thu, 25 May 2023 14:46:45 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q2CEk-0025a7-9V for pgsql-hackers@lists.postgresql.org; Thu, 25 May 2023 14:46:44 +0000 Received: from msg.df7cb.de (ipv6-d019d314ec32c1cb.west.clients.hamburg.freifunk.net [IPv6:2a03:2267:2:0:d019:d314:ec32:c1cb]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4QRrVB2X1Zz3F19; Thu, 25 May 2023 16:46:42 +0200 (CEST) Date: Thu, 25 May 2023 16:46:41 +0200 From: Christoph Berg To: Andres Freund , Tom Lane Cc: PostgreSQL Hackers Subject: Re: testing dist tarballs Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1329864.1684964152@sss.pgh.pa.us> <20230524212437.jm6e3iiehtehivbh@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Andres Freund > That's due to MAKELEVEL: > > submake-generated-headers: > ifndef NO_GENERATED_HEADERS > ifeq ($(MAKELEVEL),0) > $(MAKE) -C $(top_builddir)/src/backend generated-headers > endif > endif > > So the distcheck target needs to reset MAKELEVEL=0 - unless somebody has a > better idea? Fwiw, I've had that problem as well in the Debian packages where debian/rules is already a Makefile and calling $(MAKE) from there trips up that logic. The workaround I used is: override_dh_auto_build-arch: # set MAKELEVEL to 0 to force building submake-generated-headers in src/Makefile.global(.in) MAKELEVEL=0 $(MAKE) -C build/src all ... override_dh_auto_test-arch: ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS))) # when tests fail, print newest log files # initdb doesn't like LANG and LC_ALL to contradict, unset LANG and LC_CTYPE here # temp-install wants to be invoked from a top-level make, unset MAKELEVEL here # tell pg_upgrade to create its sockets in /tmp to avoid too long paths unset LANG LC_CTYPE MAKELEVEL; ulimit -c unlimited; \ if ! make -C build check-world \ $(TEMP_CONFIG) \ PGSOCKETDIR="/tmp" \ PG_TEST_EXTRA='ssl' \ PROVE_FLAGS="--verbose"; \ ... (Just mentioning this, not asking it to be changed.) Re: Tom Lane > Andres Freund writes: > > First thing I noticed that 'make dist' doesn't work in a vpath, failing in a > > somewhat obscure way (likely because in a vpath build the the copy from the > > source dir doesn't include GNUMakefile). Do we expect it to work? > > Don't see how it could possibly be useful in a vpath, because you'd have > the real source files and the generated files in different trees. I don't think "make dist" is generally expected to work in vpath builds, that's probably one indirection layer too much. (The "make distcheck" rule generated by automake tests vpath builds, though.) Christoph