Closed moteus closed 11 years ago
I've just tried the following little lakefile on LInux:
default{file.group{src='dir/one*',odir='out'}}
where dir
contains one.c
and oneone.c
.
Seems to work fine here:
cp dir/one.c out/one.c
cp dir/oneone.c out/oneone.c
Saying it cannot stat 'src/fileenc/test*' means that it has not expanded that wildcard?
This does not work
install = target('install', {
file.group{odir=LIBDIR; src = AesFileEncrypt };
file.group{odir=J(ROOT, 'test'); src = AesFileEncryptTest };
file.group{odir=J(ROOT, 'test'); src = J('test', '*.*') };
})
This works
install = target('install', {
file.group{odir=LIBDIR; src = AesFileEncrypt };
file.group{odir=J(ROOT, 'test'); src = J('test', '*.*') };
})
Problem appear when i add build and install AesFileEncryptTest
to lakefile.
Now master has worked lakefile. But reference from my post point on non working.
lua-AesFileEncrypt
has no external deps so you can try build.
this command should work
# ROOT/test Where install tests
# LIBDIR Where install c lib
# LUADIR Where install lua lib
lake ROOT=$TEMP/AesFileEncrypt LIBDIR=$TEMP/AesFileEncrypt install
I think i can reproduce this: FS tree has 2 files:
./src/readme
./src/readme.txt
./lakefile
target("install",{
file.group{odir=path.join('.','dst'); src=path.join('.','src','readme.txt')};
file.group{odir=path.join('.','dst'); src=path.join('.','src','readme')};
})
default("install")
lake -v
...
target: .\dst\readme*
.\dst\readme* .\src\readme* -1 -1
copy .\src\readme* .\dst\readme*
...
Command copy .\src\readme* .\dst\readme*
work on windows but may be on *nix it is not correct.
Also I think this is bug in lake.
file.group{odir=path.join('.','dst'); src=path.join('.','src','readme')};
should copy only one file.
Yes, you are right - there is a bug. On Linux I get
cp ./src/readme* ./dst/readme*
cp: target './dst/readme.txt' is not a directory
Which happens because Unix shells expand the '*' wildcard before executing.
Lake should not pass a wildcard to this command! Let me have a look!
That should fix the problem - I was using ext='*'
to flag that a rule should use any extension, but that '*' got added. So, another if-statement...
Now it works. Thanks.
lua-AesFileEncrypt On Windows/MinGW build ok. On BuildHive i get