*_nix.v support

pull/1163/head
Alexander Medvednikov 2019-07-15 19:19:53 +02:00
parent b36a9f7e55
commit 449fd372f9
7 changed files with 5 additions and 19 deletions

View File

@ -669,11 +669,8 @@ fn (v &V) v_files_from_dir(dir string) []string {
if v.pref.is_verbose { if v.pref.is_verbose {
println('v_files_from_dir ("$dir")') println('v_files_from_dir ("$dir")')
} }
// println(files.len)
// println(files)
files.sort() files.sort()
for file in files { for file in files {
v.log('F=$file')
if !file.ends_with('.v') && !file.ends_with('.vh') { if !file.ends_with('.v') && !file.ends_with('.vh') {
continue continue
} }
@ -687,18 +684,10 @@ fn (v &V) v_files_from_dir(dir string) []string {
continue continue
} }
if file.ends_with('_mac.v') && v.os != .mac { if file.ends_with('_mac.v') && v.os != .mac {
lin_file := file.replace('_mac.v', '_lin.v') continue
// println('lin_file="$lin_file"') }
// If there are both _mac.v and _lin.v, don't use _mav.v if file.ends_with('_nix.v') && v.os == .windows {
if os.file_exists('$dir/$lin_file') { continue
continue
}
else if v.os == .windows {
continue
}
else {
// If there's only _mav.v, then it can be used on Linux too
}
} }
res << '$dir/$file' res << '$dir/$file'
} }

View File

@ -1,3 +0,0 @@
module os
#include <dirent.h>