#5110: [patch] Configure option to install OptionalPackage's sources --------------------------+------------------------------------------------- Reporter: mmadia | Owner: bonefish Type: enhancement | Status: new Priority: normal | Milestone: R1/alpha2 Component: Build System | Version: R1/alpha1 Keywords: | Blockedby: Platform: All | Blocking: --------------------------+------------------------------------------------- Comment(by mmadia): Replying to [comment:1 bonefish]: > Since DownloadSourceArchive is an exact copy of DownloadOptionalPackage save for not adding the file extension, I'd rather use a common base rule for both, respectively have one rule that doesn't add a file extension and let DownloadOptionalPackage just use it. Is this along what you're thinking? {{{ rule DownloadFileWIP file : url : directory { Echo "rule DownloadFileWIP: Being implemented..." ; # Request the download only once. if [ on $(file) return $(directory) ] { return $(file) ; } # TODO: how do i abstract this: # HAIKU_SOURCE_DOWNLOAD on $(file) = 1 ; # HAIKU_OPTIONAL_PACKAGE_DOWNLOAD on $(file) = 1 ; MakeLocate $(file) : $(HAIKU_DOWNLOAD_DIR) ; DownloadFile $(file) : $(url) ; return $(file) ; } rule DownloadSourceArchive file : url { # download archive local archiveFile = $(file:G=download) ; return [ DownloadFileWIP $(archiveFile) $(url) $(HAIKU_SOURCE_DOWNLOAD) ] ; } rule DownloadOptionalPackage package : url { # download zip file local zipFile = $(package:G=download).zip ; return [ DownloadFileWIP $(zipFile) $(url) $(HAIKU_OPTIONAL_PACKAGE_DOWNLOAD) ] ; } }}} -- Ticket URL: <http://dev.haiku-os.org/ticket/5110#comment:2> Haiku <http://dev.haiku-os.org> Haiku - the operating system.