Re: [PATCH] PATH: use double quote

KO Myung-Hun <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Eric Blake wrote:
> On 09/22/2014 08:06 PM, KO Myung-Hun wrote:
> 
>> 
>>> Why are you changing this? I see no difference in the
>>> resulting shell syntax, except that backslashes in
>>> $(abs_builddir) are now handled differently.  You need a lot
>>> more justification for WHY this patch is necessary.
>> 
>> 
>> On OS/2, PATH_SEPARATOR is ';'. If is is not quoted, ';' works as
>> a mark of end of sentence. And how about this for $(abs_builddir)
>> ? At least, it works here.
>> 
>> -  { PATH='$(abs_builddir)/t/wrap'$(PATH_SEPARATOR)$$PATH &&
>> export PATH; } +  {
>> PATH='$(abs_builddir)/t/wrap'"$(PATH_SEPARATOR)$$PATH" && export 
>> PATH; }
> 
> Ah, that's the sentence you were missing from your proposed
> change. Note that $$PATH doesn't need to be quoted, but the
> makefile expansion of $(PATH_SEPARATOR) does; but it would also be
> sufficient to use:
> 
> { PATH='$(abs_builddir)/t/wrap$(PATH_SEPARATOR)'$$PATH && export
> PATH; }
> 
> if we're trying to go for the shortest line.
> 

I attach updated patch.

- -- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (OS/2)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFUKSDVE9YstvghgroRAscRAKC1RlgQvIkWFwt5vM/fIcQlfdmM1QCcCFuW
COAKQBBtdFaaK8C2ZJlAJQI=
=Taip
-----END PGP SIGNATURE-----
0001-PATH-quote-PATH_SEPARATOR-as-well.patch (text/plain, 1.6 KB)
From 46cc4fa9dc49ab98b64bb7e5fa7deaf42a68506c Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <[email protected]>
Date: Sun, 21 Sep 2014 19:57:43 +0900
Subject: [PATCH] PATH: quote $(PATH_SEPARATOR) as well

On OS/2, $(PATH_SEPARATOR) is ';'. Without quote, it is recognized as
a mark of end of sentence.

* Makefile.am: quote $(PATH_SEPARATOR) as well.
* t/Makefile.inc: Likewise.
---
 Makefile.am    |    2 +-
 t/Makefile.inc |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7e1c748..ba4179c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,7 +72,7 @@ generated_file_finalize = $(AM_V_at) \
 # For some tests or targets, we need to have the just-build automake and
 # aclocal scripts avaiable on PATH.
 extend_PATH = \
-  { PATH='$(abs_builddir)/t/wrap'$(PATH_SEPARATOR)$$PATH && export PATH; }
+  { PATH='$(abs_builddir)/t/wrap$(PATH_SEPARATOR)'$$PATH && export PATH; }
 
 # The master location for INSTALL is lib/INSTALL.
 # This is where "make fetch" will install new versions.
diff --git a/t/Makefile.inc b/t/Makefile.inc
index 5f10d90..62613ac 100644
--- a/t/Makefile.inc
+++ b/t/Makefile.inc
@@ -64,9 +64,9 @@ AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
 # in case it is given with a relative name containing no slashes.
 AM_TESTS_ENVIRONMENT += \
   if test $(srcdir) != .; then \
-    PATH='$(abs_srcdir)/%D%/ax'$(PATH_SEPARATOR)$$PATH; \
+    PATH='$(abs_srcdir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \
   fi; \
-  PATH='$(abs_builddir)/%D%/ax'$(PATH_SEPARATOR)$$PATH; \
+  PATH='$(abs_builddir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \
   export PATH;
 
 # Hand-written tests.
-- 
1.7.3.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.