]> Kevux Git Server - fll/commitdiff
Update: Add -A option to example bootstrap script for android.
authorKevin Day <Kevin@kevux.org>
Sun, 14 Dec 2025 20:41:02 +0000 (14:41 -0600)
committerKevin Day <Kevin@kevux.org>
Sun, 14 Dec 2025 20:41:02 +0000 (14:41 -0600)
The Android system has a terrible interface.
Make the bootstrap process easier by allowing a single parameter to be passed to enable passing android build mode to everything being built.

build/scripts/bootstrap-example.sh

index 6a637126f89265b09728b22da3fcf282a5cf27b4..5d3bb0d1203b189366cbf0689c7abc528e220441 100644 (file)
@@ -9,7 +9,7 @@
 # This only accepts one argument, followed by these optional arguments:
 # 1) One of "Modes" from below.
 # 2) Optional, may be one of: +d, +l, +n, +V, +Q, +E, +N, +D, --enable-shared, --enable-static, --disable-shared, --disable-static.
-# 3) Optional, may be one of: -w, --work, -X.
+# 3) Optional, may be one of: -w, --work, -X, -A.
 # 4) Optional, may be: clang.
 #
 # Modes:
@@ -31,6 +31,8 @@
 # The -w/--work requires the path to the work directory following it.
 # The clang parameter does not need the "-m".
 #
+# The -A represents building with android mode.
+#
 # The -X represents excluding a program when building.
 #
 # This will create a directory at he present working directory of the script caller called "fll" where everything will be installed.
@@ -57,6 +59,8 @@ main() {
   local shared=
   local static=
   local version=0.8.0
+  local mode_android_param=
+  local mode_android_value=
   local mode_compiler_param="-m"
   local mode_compiler_value="gcc"
   local mode_part=
@@ -116,6 +120,9 @@ main() {
     elif [[ ${p} == "+D" ]] ; then
       verbose="+D"
       verbose_common="-v"
+    elif [[ ${p} == "-A" ]] ; then
+       mode_android_param="-m"
+       mode_android_value="android"
     elif [[ ${p} == "-X" ]] ; then
       grab_next="exclude_program"
     elif [[ ${p} == "--enable-static" ]] ; then
@@ -168,7 +175,7 @@ boostrap_process() {
 
         ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
 
-        ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+        ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_thread_param} ${mode_thread_value} ${mode_android_param} ${mode_android_value} ${mode_compiler_param} ${mode_compiler_value} &&
 
         ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} &&
 
@@ -186,7 +193,7 @@ boostrap_process() {
 
     ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
 
-    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_android_param} ${mode_android_value} ${mode_compiler_param} ${mode_compiler_value} &&
 
     ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} &&
 
@@ -196,7 +203,7 @@ boostrap_process() {
 
     ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
 
-    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_android_param} ${mode_android_value} ${mode_compiler_param} ${mode_compiler_value} &&
 
     ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} &&
 
@@ -206,7 +213,7 @@ boostrap_process() {
 
     ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
 
-    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_android_param} ${mode_android_value} ${mode_compiler_param} ${mode_compiler_value} &&
 
     ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}
 
@@ -220,7 +227,7 @@ boostrap_process() {
 
     ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
 
-    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_android_param} ${mode_android_value} ${mode_compiler_param} ${mode_compiler_value} &&
 
     ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}
 
@@ -278,7 +285,7 @@ boostrap_process() {
 
     ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
 
-    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} &&
+    ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_android_param} ${mode_android_value} ${mode_compiler_param} ${mode_compiler_value} &&
 
     ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}
 
@@ -340,7 +347,7 @@ boostrap_process() {
 
         ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
 
-        ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} &&
+        ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_android_param} ${mode_android_value} ${mode_compiler_param} ${mode_compiler_value} &&
 
         ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}
 
@@ -351,7 +358,7 @@ boostrap_process() {
             if [[ ${i} == "${j}-${version}" ]] ; then
               cd ${path_original}package/program/${i} &&
 
-              fake clean make ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} &&
+              fake clean make ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_android_param} ${mode_android_value} ${mode_compiler_param} ${mode_compiler_value} &&
 
               ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}