mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-15 17:12:28 +00:00
add make-4.3.tar.gz
This commit is contained in:
parent
0a0997a872
commit
19f70a154e
458 changed files with 239669 additions and 0 deletions
92
third_party/make/tests/scripts/functions/realpath
vendored
Normal file
92
third_party/make/tests/scripts/functions/realpath
vendored
Normal file
|
@ -0,0 +1,92 @@
|
|||
# -*-perl-*-
|
||||
$description = "Test the realpath functions.";
|
||||
|
||||
$details = "";
|
||||
|
||||
# Check the local directory's realpath
|
||||
run_make_test('
|
||||
ifneq ($(realpath .),$(CURDIR))
|
||||
$(warning $(realpath .) != $(CURDIR))
|
||||
endif
|
||||
|
||||
ifneq ($(realpath ./),$(CURDIR))
|
||||
$(warning $(realpath ./) != $(CURDIR))
|
||||
endif
|
||||
|
||||
ifneq ($(realpath .///),$(CURDIR))
|
||||
$(warning $(realpath .///) != $(CURDIR))
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: ; @:
|
||||
',
|
||||
'', '');
|
||||
|
||||
# Find the realpath to the root of the partition
|
||||
create_file('root.mk', 'all:;$(info $(realpath /))');
|
||||
my $root = `$make_path -sf root.mk`;
|
||||
unlink('root.mk');
|
||||
chomp $root;
|
||||
|
||||
my $tst = '
|
||||
ifneq ($(realpath /.),#ROOT#)
|
||||
$(warning $(realpath /.) != #ROOT#)
|
||||
endif
|
||||
|
||||
ifneq ($(realpath /./),#ROOT#)
|
||||
$(warning $(realpath /./) != #ROOT#)
|
||||
endif
|
||||
|
||||
ifneq ($(realpath /.///),#ROOT#)
|
||||
$(warning $(realpath /.///) != #ROOT#)
|
||||
endif
|
||||
|
||||
ifneq ($(realpath /..),#ROOT#)
|
||||
$(warning $(realpath /..) != #ROOT#)
|
||||
endif
|
||||
|
||||
ifneq ($(realpath /../),#ROOT#)
|
||||
$(warning $(realpath /../) != #ROOT#)
|
||||
endif
|
||||
|
||||
ifneq ($(realpath /..///),#ROOT#)
|
||||
$(warning $(realpath /..///) != #ROOT#)
|
||||
endif
|
||||
|
||||
ifneq ($(realpath . /..),$(CURDIR) #ROOT#)
|
||||
$(warning $(realpath . /..) != $(CURDIR) #ROOT#)
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: ; @:
|
||||
';
|
||||
$tst =~ s/#ROOT#/$root/g;
|
||||
run_make_test($tst, '', '');
|
||||
|
||||
# On Windows platforms "//" means something special. So, don't do these tests
|
||||
# there.
|
||||
|
||||
if ($port_type ne 'W32') {
|
||||
$tst = '
|
||||
ifneq ($(realpath ///),#ROOT#)
|
||||
$(warning $(realpath ///) != #ROOT#)
|
||||
endif
|
||||
|
||||
ifneq ($(realpath ///.),#ROOT#)
|
||||
$(warning $(realpath ///.) != #ROOT#)
|
||||
endif
|
||||
|
||||
ifneq ($(realpath ///..),#ROOT#)
|
||||
$(warning $(realpath ///..) != #ROOT#)
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: ; @:';
|
||||
$tst =~ s/#ROOT#/$root/g;
|
||||
|
||||
run_make_test($tst, '', '');
|
||||
}
|
||||
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
Loading…
Add table
Add a link
Reference in a new issue