commit c501e0299bba8e31cb19f9a49968924a7fb71ec4
parent 256f10c3505df460ccc6c8d903b4f3e0c03c8271
Author: Kyle Milz <krwmilz@gmail.com>
Date: Tue, 20 Jul 2021 20:44:54 +0000
t: be consistent with site.mk use
Diffstat:
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/t/cp_happy.t b/t/cp_happy.t
@@ -10,14 +10,18 @@ use Test::More tests => 9;
my $cmd = Test::Cmd->new( prog => '/usr/bin/make', workdir => '' );
my $html_mk = $cmd->here . '/mk/html.mk';
+$cmd->write( 'site.mk', <<EOF );
+BSDSRCDIR = /tmp
+BSDOBJDIR = destdir
+EOF
+
$cmd->write( 'copy.txt', 'some stuff here' );
$cmd->subdir( 'destdir' );
$cmd->write( 'Makefile', <<EOF );
CP_OBJ = copy.txt
-BSDSRCDIR = /tmp
-BSDOBJDIR = destdir
SRCS =
+.include "site.mk"
.include "$html_mk"
EOF
diff --git a/t/cp_unhappy.t b/t/cp_unhappy.t
@@ -9,6 +9,11 @@ use Test::More tests => 9;
my $cmd = Test::Cmd->new( prog => '/usr/bin/make', workdir => '' );
my $html_mk = $cmd->here . "/mk/html.mk";
+$cmd->write ( 'site.mk', <<EOF );
+BSDSRCDIR = /tmp
+BSDOBJDIR = destdir
+EOF
+
#
# 1) CP_OBJ nonexistent file.
#
@@ -37,10 +42,9 @@ $e = 'cp: .*/cp_dir is a directory \(not copied\)';
$cmd->subdir( 'destdir', 'cp_dir' );
$cmd->write( 'Makefile', <<EOF );
CP_OBJ = cp_dir
-BSDSRCDIR = /tmp
-BSDOBJDIR = destdir
SRCS =
+.include "site.mk"
.include "$html_mk"
EOF