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 1psSUY-0001Pa-JF for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Apr 2023 18:06:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1psSUX-0007mG-7n for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Apr 2023 18:06:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1psSUW-0007m7-Uf for pgsql-hackers@lists.postgresql.org; Fri, 28 Apr 2023 18:06:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1psSUT-002OXA-7O for pgsql-hackers@postgresql.org; Fri, 28 Apr 2023 18:06:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 33SI6bd71439279; Fri, 28 Apr 2023 14:06:37 -0400 From: Tom Lane To: Nikolay Shaplov cc: pgsql-hackers Subject: Re: Build problem with square brackets in build path In-reply-to: <4793552.atqmVPU5g4@thinkpad-pgpro> References: <4793552.atqmVPU5g4@thinkpad-pgpro> Comments: In-reply-to Nikolay Shaplov message dated "Fri, 28 Apr 2023 14:09:59 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1439277.1682705197.1@sss.pgh.pa.us> Date: Fri, 28 Apr 2023 14:06:37 -0400 Message-ID: <1439278.1682705197@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nikolay Shaplov writes: > If you do > mkdir [source] > git clone git://git.postgresql.org/git/postgresql.git [source] > mkdir build; cd build > ../\[source\]/configure > make > you will get > make[1]: *** No rule to make target 'generated-headers'. Stop. > If there are no "[]" in the path to the source, everything is OK. It's generally quite unwise to use shell meta-characters in file or directory names. I give you one example: $ ls ../[source] COPYRIGHT README.git contrib/ GNUmakefile.in aclocal.m4 doc/ HISTORY config/ meson.build Makefile configure* meson_options.txt README configure.ac src/ $ ls ../[source]/*.ac ls: ../[source]/*.ac: No such file or directory This is expected behavior (I leave it as an exercise for the student to figure out why). While it might be possible to make the Postgres build scripts proof against funny characters in the build paths, the effort required would be far out of proportion to the value. Not least because manual operations in such a file tree would misbehave often enough to convince you to change, even if the scripts were all water-tight. regards, tom lane