From f724ec0e1ee8b5420fa5df8c1660f029c570809d Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 19 Jun 2011 22:18:55 +0200 Subject: [PATCH] ExtractArchive: Add hpkg support --- build/jam/FileRules | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/build/jam/FileRules b/build/jam/FileRules index 788dcfcd3b..c2193840fc 100644 --- a/build/jam/FileRules +++ b/build/jam/FileRules @@ -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) : package ; + ExtractHPKGArchive1 $(targets) + : 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 { }