Rename `targets` option to `target`.
This commit is contained in:
parent
db82455f03
commit
5f5fbfe082
|
@ -10,7 +10,7 @@ from . import _global
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('targets', default='kiwix-tools', nargs='?', metavar='TARGET',
|
parser.add_argument('target', default='kiwix-tools', nargs='?', metavar='TARGET',
|
||||||
choices=Dependency.all_deps.keys())
|
choices=Dependency.all_deps.keys())
|
||||||
parser.add_argument('--working-dir', default=".")
|
parser.add_argument('--working-dir', default=".")
|
||||||
parser.add_argument('--libprefix', default=None)
|
parser.add_argument('--libprefix', default=None)
|
||||||
|
@ -23,7 +23,7 @@ def parse_args():
|
||||||
parser.add_argument('--skip-source-prepare', action='store_true',
|
parser.add_argument('--skip-source-prepare', action='store_true',
|
||||||
help="Skip the source download part")
|
help="Skip the source download part")
|
||||||
parser.add_argument('--build-deps-only', action='store_true',
|
parser.add_argument('--build-deps-only', action='store_true',
|
||||||
help="Build only the dependencies of the specified targets.")
|
help="Build only the dependencies of the specified target.")
|
||||||
parser.add_argument('--build-nodeps', action='store_true',
|
parser.add_argument('--build-nodeps', action='store_true',
|
||||||
help="Build only the target, not its dependencies.")
|
help="Build only the target, not its dependencies.")
|
||||||
parser.add_argument('--make-dist', action='store_true',
|
parser.add_argument('--make-dist', action='store_true',
|
||||||
|
@ -51,7 +51,7 @@ def parse_args():
|
||||||
help="The size of the zim file.")
|
help="The size of the zim file.")
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
if options.targets == 'kiwix-android-custom':
|
if options.target == 'kiwix-android-custom':
|
||||||
err = False
|
err = False
|
||||||
if not options.android_custom_app:
|
if not options.android_custom_app:
|
||||||
print("You need to specify ANDROID_CUSTOM_APP if you "
|
print("You need to specify ANDROID_CUSTOM_APP if you "
|
||||||
|
|
|
@ -18,7 +18,7 @@ class Builder:
|
||||||
PlatformInfo.get_platform('neutral', self._targets)
|
PlatformInfo.get_platform('neutral', self._targets)
|
||||||
|
|
||||||
platform = PlatformInfo.get_platform(option('target_platform'), self._targets)
|
platform = PlatformInfo.get_platform(option('target_platform'), self._targets)
|
||||||
self.targetDefs = platform.add_targets(option('targets'), self._targets)
|
self.targetDefs = platform.add_targets(option('target'), self._targets)
|
||||||
|
|
||||||
def finalize_target_steps(self):
|
def finalize_target_steps(self):
|
||||||
steps = []
|
steps = []
|
||||||
|
@ -95,7 +95,7 @@ class Builder:
|
||||||
builderDefs = (tDef for tDef in target_steps() if tDef[0] != 'source')
|
builderDefs = (tDef for tDef in target_steps() if tDef[0] != 'source')
|
||||||
for builderDef in builderDefs:
|
for builderDef in builderDefs:
|
||||||
builder = get_target_step(builderDef)
|
builder = get_target_step(builderDef)
|
||||||
if option('make_dist') and builderName == option('targets'):
|
if option('make_dist') and builderName == option('target'):
|
||||||
print("make dist {} ({}):".format(builder.name, builderDef[0]))
|
print("make dist {} ({}):".format(builder.name, builderDef[0]))
|
||||||
builder.make_dist()
|
builder.make_dist()
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -28,7 +28,7 @@ class KiwixAndroid(Dependency):
|
||||||
return deps
|
return deps
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
if option('targets') == 'kiwix-android-custom':
|
if option('target') == 'kiwix-android-custom':
|
||||||
print("SKIP")
|
print("SKIP")
|
||||||
else:
|
else:
|
||||||
super().build()
|
super().build()
|
||||||
|
|
Loading…
Reference in New Issue