summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Goncharov <dgoncharov@users.sf.net>2023-01-28 09:41:49 -0500
committerPaul Smith <psmith@gnu.org>2023-01-28 09:46:23 -0500
commit9709d273b299b3ced3ebd3cdce2cdca907846451 (patch)
tree2503415a4e9cbdd7fead4099be171fa6f2e33818
parenteb0bd1aaece1c0c3d58cb4647443375d22f449d1 (diff)
downloadmake-git-9709d273b299b3ced3ebd3cdce2cdca907846451.tar.gz
* tests/scripts/features/archives: [SV 63688] Quote cmd line vars
-rw-r--r--tests/scripts/features/archives9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/scripts/features/archives b/tests/scripts/features/archives
index a098d222..4284d108 100644
--- a/tests/scripts/features/archives
+++ b/tests/scripts/features/archives
@@ -35,7 +35,7 @@ $redir = '' if $osname eq 'VMS';
# This is the value from src/default.c
my $arflags = $osname eq 'aix' ? '-Xany -rv' : '-rv';
-my $arvar = "AR=$ar";
+my $arvar = "AR=\"$ar\"";
# Newer versions of binutils can be built with --enable-deterministic-archives
# which forces all timestamps (among other things) to always be 0, defeating
@@ -44,7 +44,7 @@ unlink('libxx.a');
$_ = `$ar ${arflags}U libxx.a a1.o $redir`;
if ($? == 0) {
$arflags = "${arflags}U";
- $arvar = "$arvar ARFLAGS=$arflags";
+ $arvar = "$arvar ARFLAGS=\"$arflags\"";
}
# Some versions of ar print different things on creation. Find out.
@@ -255,14 +255,15 @@ create_file('b.c', 'int j;');
utouch(-20, 'a.c', 'b.c');
my $cc = get_config('CC') || 'cc';
-my $vars = "CC=$cc $arvar";
+my $vars = "CC=\"$cc\" $arvar";
run_make_test(q!
mylib.a: mylib.a(a.o b.o)
(%): % ;
%.a: ; $(AR) $(ARFLAGS) $@ $?
%.o : %.c ; @echo Compile $<; $(COMPILE.c) -o $@ $<
-!, $vars, "Compile a.c\nCompile b.c\n$ar $arflags mylib.a a.o b.o\n${create2}rm b.o a.o");
+!,
+ $vars, "Compile a.c\nCompile b.c\n$ar $arflags mylib.a a.o b.o\n${create2}rm b.o a.o");
run_make_test(undef, $arvar, "#MAKE#: 'mylib.a' is up to date.");