mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-21 19:42:14 +00:00
Make cabextract build incremental.
This commit is contained in:
parent
83e0ce4091
commit
ca24cd52e5
@ -14,44 +14,6 @@ eclipse.project.name = 'GPL CabExtract'
|
||||
|
||||
project.ext.cabextract = "cabextract-1.6"
|
||||
|
||||
/*********************************************************************************
|
||||
* CabExtract extraction task
|
||||
*
|
||||
* Unpacks the cabextract tar file that's needed for the symbol server. This
|
||||
* is only unpacked for building the tool; once it's built, this unzipped
|
||||
* archive is removed.
|
||||
*********************************************************************************/
|
||||
task unpackCabExtract (type: Copy) {
|
||||
|
||||
from tarTree(file("data/${cabextract}.tar.gz"))
|
||||
into 'build/unpack'
|
||||
|
||||
// Force the task to be executed every time by setting to false.
|
||||
// This is done since configure changes the contents for a platform
|
||||
// NOTE: this can cause the 'build/unpack' to be deleted prior to an unpack
|
||||
outputs.upToDateWhen { false }
|
||||
|
||||
doLast {
|
||||
// Force all unpacked files to have the same timestamp
|
||||
ant.touch() {
|
||||
fileset(dir: file("build/unpack/${cabextract}"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* CabExtract configure task
|
||||
*
|
||||
* Performs configure on a newly unpacked cabextract tar file prior to
|
||||
* performing make.
|
||||
*********************************************************************************/
|
||||
task configureCabExtract (type: Exec) {
|
||||
group "private"
|
||||
workingDir "build/unpack/${cabextract}"
|
||||
executable "./configure"
|
||||
dependsOn unpackCabExtract
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* CabExtract platform specific tasks
|
||||
*
|
||||
@ -66,12 +28,27 @@ if (['linux64', 'osx64'].contains(currentPlatform)) {
|
||||
group "private"
|
||||
workingDir "build/unpack/${cabextract}"
|
||||
executable "make"
|
||||
dependsOn configureCabExtract
|
||||
doLast {
|
||||
inputs.file("data/${cabextract}.tar.gz")
|
||||
outputs.file("build/os/${currentPlatform}/cabextract")
|
||||
// Extract archive and ./configure
|
||||
doFirst {
|
||||
copy {
|
||||
from "build/unpack/${cabextract}/cabextract"
|
||||
into "build/os/${currentPlatform}"
|
||||
from tarTree(file("data/${cabextract}.tar.gz"))
|
||||
into 'build/unpack'
|
||||
}
|
||||
// Force all unpacked files to have the same timestamp
|
||||
ant.touch() {
|
||||
fileset(dir: file("build/unpack/${cabextract}"))
|
||||
}
|
||||
exec {
|
||||
workingDir "build/unpack/${cabextract}"
|
||||
executable "./configure"
|
||||
}
|
||||
}
|
||||
// Move out the built cabextract and delete the extracted files
|
||||
doLast {
|
||||
ant.move file: "build/unpack/${cabextract}/cabextract",
|
||||
todir: "build/os/${currentPlatform}"
|
||||
delete file("build/unpack/${cabextract}")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user