ExtractArchive: Add hpkg support

This commit is contained in:
Ingo Weinhold 2011-06-19 22:18:55 +02:00
parent 05384d6944
commit f724ec0e1e

View File

@ -235,12 +235,20 @@ rule ExtractArchive directory : entries : archiveFile : grist
Depends $(directory) : $(archiveFile) ;
switch $(archiveFile:S)
{
case .zip : ExtractZipArchive1 $(targets) : $(directory)
$(archiveFile) ;
case .tgz : ExtractTarArchive1 $(targets) : $(directory)
$(archiveFile) ;
case * : Exit "ExtractArchive: Unhandled archive extension:
$(archiveFile:S)" ;
case .zip :
ExtractZipArchive1 $(targets) : $(directory) $(archiveFile) ;
case .tgz :
ExtractTarArchive1 $(targets) : $(directory) $(archiveFile) ;
case .hpkg :
Depends $(targets) : <build>package ;
ExtractHPKGArchive1 $(targets)
: <build>package $(directory) $(archiveFile) ;
case * :
Exit "ExtractArchive: Unhandled archive extension:"
"$(archiveFile:S)" ;
}
INITIALIZED on $(directory) = 1 ;
}
@ -252,6 +260,7 @@ rule ExtractArchive directory : entries : archiveFile : grist
return $(targets) ;
}
actions ExtractZipArchive1
{
mkdir -p $(2[1])
@ -264,6 +273,15 @@ actions ExtractTarArchive1
tar -C $(2[1]) -xf $(2[2])
}
actions ExtractHPKGArchive1
{
mkdir -p "$(2[2])"
$(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)
$(2[1]) extract -C "$(2[2])" "$(2[3])"
}
actions ExtractArchiveDummy
{
}