build: Add HAIKU_ABSOLUTE_TOP and use it to root BootArchive.

Strictly POSIX-compliant shells (like dash) do not allow sourcing
files in the present directory without "./". The script really should
not know or care about what directory the passed files are in,
so now we add a jam grist to make the passed paths absolute.

Fixes the build on all systems where /bin/sh is dash or a similarly
POSIX-compliant-no-extensions shell (i.e. virtually all Linux.)
This commit is contained in:
Augustin Cavalier 2018-11-02 21:46:22 -04:00
parent 8b4ab45439
commit 68191643b8
2 changed files with 8 additions and 2 deletions

View File

@ -31,6 +31,10 @@ HAIKU_DOWNLOAD_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR)
HAIKU_OPTIONAL_BUILD_PACKAGES_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR)
build_packages ] ;
# Absolutely rooted versions of some of the main directories
HAIKU_ABSOLUTE_TOP ?= [ FDirName $(PWD) $(HAIKU_TOP) ] ;
HAIKU_ABSOLUTE_OUTPUT_DIR ?= [ FDirName $(HAIKU_ABSOLUTE_TOP) generated ] ;
# Cache files for header scanning and jamfile caching
HCACHEFILE = header_cache ;
JCACHEFILE = jamfile_cache ;

View File

@ -1383,7 +1383,8 @@ rule BuildNetBootArchive archive : scripts
SEARCH on $(mainScript) = [ FDirName $(HAIKU_TOP) build scripts ] ;
Depends $(archive) : $(mainScript) $(scripts) ;
BuildNetBootArchive1 $(archive) : $(mainScript) $(scripts) ;
BuildNetBootArchive1 $(archive) : $(mainScript)
$(scripts:R=$(HAIKU_ABSOLUTE_OUTPUT_DIR)) ;
}
actions BuildNetBootArchive1
@ -1474,7 +1475,8 @@ rule BuildFloppyBootArchive archive : scripts
SEARCH on $(mainScript) = [ FDirName $(HAIKU_TOP) build scripts ] ;
Depends $(archive) : $(mainScript) $(scripts) ;
BuildFloppyBootArchive1 $(archive) : $(mainScript) $(scripts) ;
BuildFloppyBootArchive1 $(archive) : $(mainScript)
$(scripts:R=$(HAIKU_ABSOLUTE_OUTPUT_DIR)) ;
}
actions BuildFloppyBootArchive1