mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-06-28 05:49:33 +00:00
Move from target logic to steps logic.
This is the big change !!!! Instead of handling target as primary object and prepare/build targets, we are handling build steps. A build step may be a source (preparation) or a build (of the source). Actualy, a step is a tuple (context, Builder or Source). The context define the context of the step. It can be : - 'source', for a Source step - 'neutral' or the name of a platform for Build step. Target becomes a "Class only" class.
This commit is contained in:
@ -7,6 +7,7 @@ from .base import (
|
||||
)
|
||||
|
||||
from kiwixbuild.utils import Remotefile, pj, Defaultdict, SkipCommand
|
||||
from kiwixbuild._global import get_target_step
|
||||
|
||||
class LibMagicBase(Dependency):
|
||||
name = "libmagic"
|
||||
@ -48,7 +49,7 @@ class LibMagic_cross_compile(LibMagicBase):
|
||||
make_target=self.make_target,
|
||||
make_option=self.make_option
|
||||
)
|
||||
libmagic_native_dep = self.buildEnv.targetsDict['libmagic_native']
|
||||
libmagic_native_builder = get_target_step('libmagic_native', self.buildEnv.platformInfo.name)
|
||||
env = Defaultdict(str, os.environ)
|
||||
env['PATH'] = ':'.join([pj(libmagic_native_dep.builder.build_path, 'src'), env['PATH']])
|
||||
env['PATH'] = ':'.join([pj(libmagic_native_builder.build_path, 'src'), env['PATH']])
|
||||
self.buildEnv.run_command(command, self.build_path, context, env=env)
|
||||
|
Reference in New Issue
Block a user