]> Kevux Git Server - fll/commitdiff
Bugfix: Problematic handling of object files.
authorKevin Day <kevin@kevux.org>
Fri, 29 Mar 2024 03:50:21 +0000 (22:50 -0500)
committerKevin Day <kevin@kevux.org>
Fri, 29 Mar 2024 04:09:58 +0000 (23:09 -0500)
The object files are not being compiled correctly when performing a static build.
There may now be multiple object sources files which are now built individually.

The build object sources must be built without source code files.
The logic is relocated into a fake_build_library_static_object() function to build the object files.
These files are then included when static linking.
A new build stage is also added to accommodate this.

Building the objects should not include libraries linked.
Remove the logic that auto-adds the library linkage when building objects.

Break out the "path_sources" Object into multiple sub-parts:
  - "path_sources_headers".
  - "path_sources_library".
  - "path_sources_object".
  - "path_sources_program".
  - "path_sources_script".

Update the documentation and specification files accordingly.

Add missing version dates to the specifications.

Update the bootstrap.sh script with these changes.
Fix incidental problems discovered in the bootstrap.sh script:
  - Remove already compiled warning as it is not needed and is not exhaustive.
  - Improve handling of directory detection and simplify the relating code.
  - The built setting files are now being properly checked (a regression caused them to not be properly checked).

35 files changed:
build/scripts/bootstrap.sh
build/stand_alone/fake.settings
level_3/fake/build/documentation/man/man1/fake.1
level_3/fake/build/documentation/man/man5/fake-defines.5
level_3/fake/build/documentation/man/man5/fake-depedencies.5
level_3/fake/build/documentation/man/man5/fake-fakefile.5
level_3/fake/build/documentation/man/man5/fake-settings.5
level_3/fake/c/main/build.c
level_3/fake/c/main/build.h
level_3/fake/c/main/build/library.c
level_3/fake/c/main/build/library.h
level_3/fake/c/main/build/load.c
level_3/fake/c/main/build/object.c
level_3/fake/c/main/build/object.h
level_3/fake/c/main/build/objects.c [deleted file]
level_3/fake/c/main/build/objects.h [deleted file]
level_3/fake/c/main/build/print/compile.c
level_3/fake/c/main/build/print/compile.h
level_3/fake/c/main/build/program.c
level_3/fake/c/main/build/string.c
level_3/fake/c/main/build/string.h
level_3/fake/c/main/common/type.c
level_3/fake/c/main/common/type.h
level_3/fake/c/main/fake.h
level_3/fake/data/build/settings
level_3/fake/data/documentation/man/man1/fake.1
level_3/fake/data/documentation/man/man5/fake-defines.5
level_3/fake/data/documentation/man/man5/fake-depedencies.5
level_3/fake/data/documentation/man/man5/fake-fakefile.5
level_3/fake/data/documentation/man/man5/fake-settings.5
level_3/fake/data/projects/example/return_code.fakefile
level_3/fake/specifications/defines.txt
level_3/fake/specifications/dependencies.txt
level_3/fake/specifications/fakefile.txt
level_3/fake/specifications/settings.txt

index a5c7550d2683b20c7cc768d143880f3fe5e98bea..5d18f422e51e012b1d043fa197c3fefa9c7c7719 100644 (file)
@@ -461,7 +461,7 @@ bootstrap_main() {
       echo -e "${c_highlight}Building:${c_reset} ${c_notice}${project_label}${c_highlight} with modes: ${c_notice}${modes}${c_highlight}.${c_reset}"
     fi
 
-    if [[ ! -f ${project_built}.prepared ]] ; then
+    if [[ ! -f ${project_built}-${settings_name}.prepared ]] ; then
       bootstrap_prepare_build
 
       if [[ ${?} -ne 0 ]] ; then
@@ -679,159 +679,175 @@ bootstrap_id() {
     "path_program_shared") let key=69;;
     "path_program_static") let key=70;;
     "path_sources") let key=71;;
-    "path_sources_object") let key=72;;
-    "preserve_path_headers") let key=73;;
-    "process_post") let key=74;;
-    "process_pre") let key=75;;
-    "search_exclusive") let key=76;;
-    "search_shared") let key=77;;
-    "search_static") let key=78;;
-    "version_file") let key=79;;
-    "version_major") let key=80;;
-    "version_major_prefix") let key=81;;
-    "version_micro") let key=82;;
-    "version_micro_prefix") let key=83;;
-    "version_minor") let key=84;;
-    "version_minor_prefix") let key=85;;
-    "version_nano") let key=86;;
-    "version_nano_prefix") let key=87;;
-    "version_target") let key=88;;
-
-    "build_compiler-mode") let key=89;;
-    "build_indexer-mode") let key=90;;
-    "build_indexer_arguments-mode") let key=91;;
-    "build_language-mode") let key=92;;
-    "build_libraries-mode") let key=93;;
-    "build_libraries_shared-mode") let key=94;;
-    "build_libraries_static-mode") let key=95;;
-    "build_name-mode") let key=96;;
-    "build_objects_library-mode") let key=97;;
-    "build_objects_library_shared-mode") let key=98;;
-    "build_objects_library_static-mode") let key=99;;
-    "build_objects_program-mode") let key=100;;
-    "build_objects_program_shared-mode") let key=101;;
-    "build_objects_program_static-mode") let key=102;;
-    "build_script-mode") let key=103;;
-    "build_shared-mode") let key=104;;
-    "build_sources_documentation-mode") let key=105;;
-    "build_sources_headers-mode") let key=106;;
-    "build_sources_headers_shared-mode") let key=107;;
-    "build_sources_headers_static-mode") let key=108;;
-    "build_sources_library-mode") let key=109;;
-    "build_sources_library_shared-mode") let key=110;;
-    "build_sources_library_static-mode") let key=111;;
-    "build_sources_object-mode") let key=112;;
-    "build_sources_object_shared-mode") let key=113;;
-    "build_sources_object_static-mode") let key=114;;
-    "build_sources_program-mode") let key=115;;
-    "build_sources_program_shared-mode") let key=116;;
-    "build_sources_program_static-mode") let key=117;;
-    "build_sources_script-mode") let key=118;;
-    "build_sources_setting-mode") let key=119;;
-    "build_static-mode") let key=120;;
-    "defines-mode") let key=121;;
-    "defines_library-mode") let key=122;;
-    "defines_library_shared-mode") let key=123;;
-    "defines_library_static-mode") let key=124;;
-    "defines_object-mode") let key=125;;
-    "defines_object_shared-mode") let key=126;;
-    "defines_object_static-mode") let key=127;;
-    "defines_program-mode") let key=128;;
-    "defines_program_shared-mode") let key=129;;
-    "defines_program_static-mode") let key=130;;
-    "defines_shared-mode") let key=131;;
-    "defines_static-mode") let key=132;;
-    "environment-mode") let key=133;;
-    "flags-mode") let key=134;;
-    "flags_library-mode") let key=135;;
-    "flags_library_shared-mode") let key=136;;
-    "flags_library_static-mode") let key=137;;
-    "flags_object-mode") let key=138;;
-    "flags_object_shared-mode") let key=139;;
-    "flags_object_static-mode") let key=140;;
-    "flags_program-mode") let key=141;;
-    "flags_program_shared-mode") let key=142;;
-    "flags_program_static-mode") let key=143;;
-    "flags_shared-mode") let key=144;;
-    "flags_static-mode") let key=145;;
-    "has_path_standard-mode") let key=146;;
-    "path_headers-mode") let key=147;;
-    "path_language-mode") let key=148;;
-    "path_library_script-mode") let key=149;;
-    "path_library_shared-mode") let key=150;;
-    "path_library_static-mode") let key=151;;
-    "path_object_script-mode") let key=152;;
-    "path_object_shared-mode") let key=153;;
-    "path_object_static-mode") let key=154;;
-    "path_program_script-mode") let key=155;;
-    "path_program_shared-mode") let key=156;;
-    "path_program_static-mode") let key=157;;
-    "path_sources-mode") let key=158;;
-    "path_sources_object-mode") let key=159;;
-    "preserve_path_headers-mode") let key=160;;
-    "process_post-mode") let key=161;;
-    "process_pre-mode") let key=162;;
-    "search_exclusive-mode") let key=163;;
-    "search_shared-mode") let key=164;;
-    "search_static-mode") let key=165;;
-    "version_file-mode") let key=166;;
-    "version_major-mode") let key=167;;
-    "version_major_prefix-mode") let key=168;;
-    "version_micro-mode") let key=169;;
-    "version_micro_prefix-mode") let key=170;;
-    "version_minor-mode") let key=171;;
-    "version_minor_prefix-mode") let key=172;;
-    "version_nano-mode") let key=173;;
-    "version_nano_prefix-mode") let key=174;;
-    "version_target-mode") let key=175;;
-
-    "has-build_compiler") let key=176;;
-    "has-build_indexer") let key=177;;
-    "has-build_indexer_arguments") let key=178;;
-    "has-build_name") let key=179;;
-    "has-has_path_standard") let key=180;;
-    "has-path_library_script") let key=181;;
-    "has-path_library_shared") let key=182;;
-    "has-path_library_static") let key=183;;
-    "has-path_object_script") let key=184;;
-    "has-path_object_shared") let key=185;;
-    "has-path_object_static") let key=186;;
-    "has-path_program_script") let key=187;;
-    "has-path_program_shared") let key=188;;
-    "has-path_program_static") let key=189;;
-    "has-path_sources") let key=190;;
-    "has-path_sources_object") let key=191;;
-    "has-search_exclusive") let key=192;;
-    "has-search_shared") let key=193;;
-    "has-search_static") let key=194;;
-    "has-version_major_prefix") let key=195;;
-    "has-version_micro_prefix") let key=196;;
-    "has-version_minor_prefix") let key=197;;
-    "has-version_nano_prefix") let key=198;;
-
-    "has-build_compiler-mode") let key=199;;
-    "has-build_indexer-mode") let key=200;;
-    "has-build_indexer_arguments-mode") let key=201;;
-    "has-build_name-mode") let key=202;;
-    "has-has_path_standard-mode") let key=203;;
-    "has-path_library_script-mode") let key=204;;
-    "has-path_library_shared-mode") let key=205;;
-    "has-path_library_static-mode") let key=206;;
-    "has-path_object_script-mode") let key=207;;
-    "has-path_object_shared-mode") let key=208;;
-    "has-path_object_static-mode") let key=209;;
-    "has-path_program_script-mode") let key=210;;
-    "has-path_program_shared-mode") let key=211;;
-    "has-path_program_static-mode") let key=212;;
-    "has-path_sources-mode") let key=213;;
-    "has-path_sources_object-mode") let key=214;;
-    "has-search_exclusive-mode") let key=215;;
-    "has-search_shared-mode") let key=216;;
-    "has-search_static-mode") let key=217;;
-    "has-version_major_prefix-mode") let key=218;;
-    "has-version_micro_prefix-mode") let key=219;;
-    "has-version_minor_prefix-mode") let key=220;;
-    "has-version_nano_prefix-mode") let key=221;;
+    "path_sources_headers") let key=72;;
+    "path_sources_library") let key=73;;
+    "path_sources_object") let key=74;;
+    "path_sources_program") let key=75;;
+    "path_sources_script") let key=76;;
+    "preserve_path_headers") let key=77;;
+    "process_post") let key=78;;
+    "process_pre") let key=79;;
+    "search_exclusive") let key=80;;
+    "search_shared") let key=81;;
+    "search_static") let key=82;;
+    "version_file") let key=83;;
+    "version_major") let key=84;;
+    "version_major_prefix") let key=85;;
+    "version_micro") let key=86;;
+    "version_micro_prefix") let key=87;;
+    "version_minor") let key=88;;
+    "version_minor_prefix") let key=89;;
+    "version_nano") let key=90;;
+    "version_nano_prefix") let key=91;;
+    "version_target") let key=92;;
+
+    "build_compiler-mode") let key=93;;
+    "build_indexer-mode") let key=94;;
+    "build_indexer_arguments-mode") let key=95;;
+    "build_language-mode") let key=96;;
+    "build_libraries-mode") let key=97;;
+    "build_libraries_shared-mode") let key=98;;
+    "build_libraries_static-mode") let key=99;;
+    "build_name-mode") let key=100;;
+    "build_objects_library-mode") let key=101;;
+    "build_objects_library_shared-mode") let key=102;;
+    "build_objects_library_static-mode") let key=103;;
+    "build_objects_program-mode") let key=104;;
+    "build_objects_program_shared-mode") let key=105;;
+    "build_objects_program_static-mode") let key=106;;
+    "build_script-mode") let key=107;;
+    "build_shared-mode") let key=108;;
+    "build_sources_documentation-mode") let key=109;;
+    "build_sources_headers-mode") let key=110;;
+    "build_sources_headers_shared-mode") let key=111;;
+    "build_sources_headers_static-mode") let key=112;;
+    "build_sources_library-mode") let key=113;;
+    "build_sources_library_shared-mode") let key=114;;
+    "build_sources_library_static-mode") let key=115;;
+    "build_sources_object-mode") let key=116;;
+    "build_sources_object_shared-mode") let key=117;;
+    "build_sources_object_static-mode") let key=118;;
+    "build_sources_program-mode") let key=119;;
+    "build_sources_program_shared-mode") let key=120;;
+    "build_sources_program_static-mode") let key=121;;
+    "build_sources_script-mode") let key=122;;
+    "build_sources_setting-mode") let key=123;;
+    "build_static-mode") let key=124;;
+    "defines-mode") let key=125;;
+    "defines_library-mode") let key=126;;
+    "defines_library_shared-mode") let key=127;;
+    "defines_library_static-mode") let key=128;;
+    "defines_object-mode") let key=129;;
+    "defines_object_shared-mode") let key=130;;
+    "defines_object_static-mode") let key=131;;
+    "defines_program-mode") let key=132;;
+    "defines_program_shared-mode") let key=133;;
+    "defines_program_static-mode") let key=134;;
+    "defines_shared-mode") let key=135;;
+    "defines_static-mode") let key=136;;
+    "environment-mode") let key=137;;
+    "flags-mode") let key=138;;
+    "flags_library-mode") let key=139;;
+    "flags_library_shared-mode") let key=140;;
+    "flags_library_static-mode") let key=141;;
+    "flags_object-mode") let key=142;;
+    "flags_object_shared-mode") let key=143;;
+    "flags_object_static-mode") let key=144;;
+    "flags_program-mode") let key=145;;
+    "flags_program_shared-mode") let key=146;;
+    "flags_program_static-mode") let key=147;;
+    "flags_shared-mode") let key=148;;
+    "flags_static-mode") let key=149;;
+    "has_path_standard-mode") let key=150;;
+    "path_headers-mode") let key=151;;
+    "path_language-mode") let key=152;;
+    "path_library_script-mode") let key=153;;
+    "path_library_shared-mode") let key=154;;
+    "path_library_static-mode") let key=155;;
+    "path_object_script-mode") let key=156;;
+    "path_object_shared-mode") let key=157;;
+    "path_object_static-mode") let key=158;;
+    "path_program_script-mode") let key=159;;
+    "path_program_shared-mode") let key=160;;
+    "path_program_static-mode") let key=161;;
+    "path_sources-mode") let key=162;;
+    "path_sources_headers-mode") let key=163;;
+    "path_sources_library-mode") let key=164;;
+    "path_sources_object-mode") let key=165;;
+    "path_sources_program-mode") let key=166;;
+    "path_sources_script-mode") let key=167;;
+    "preserve_path_headers-mode") let key=168;;
+    "process_post-mode") let key=169;;
+    "process_pre-mode") let key=170;;
+    "search_exclusive-mode") let key=171;;
+    "search_shared-mode") let key=172;;
+    "search_static-mode") let key=173;;
+    "version_file-mode") let key=174;;
+    "version_major-mode") let key=175;;
+    "version_major_prefix-mode") let key=176;;
+    "version_micro-mode") let key=177;;
+    "version_micro_prefix-mode") let key=178;;
+    "version_minor-mode") let key=179;;
+    "version_minor_prefix-mode") let key=180;;
+    "version_nano-mode") let key=181;;
+    "version_nano_prefix-mode") let key=182;;
+    "version_target-mode") let key=183;;
+
+    "has-build_compiler") let key=184;;
+    "has-build_indexer") let key=185;;
+    "has-build_indexer_arguments") let key=186;;
+    "has-build_name") let key=187;;
+    "has-has_path_standard") let key=188;;
+    "has-path_library_script") let key=189;;
+    "has-path_library_shared") let key=190;;
+    "has-path_library_static") let key=191;;
+    "has-path_object_script") let key=192;;
+    "has-path_object_shared") let key=193;;
+    "has-path_object_static") let key=194;;
+    "has-path_program_script") let key=195;;
+    "has-path_program_shared") let key=196;;
+    "has-path_program_static") let key=197;;
+    "has-path_sources") let key=198;;
+    "has-path_sources_headers") let key=199;;
+    "has-path_sources_library") let key=200;;
+    "has-path_sources_object") let key=201;;
+    "has-path_sources_program") let key=202;;
+    "has-path_sources_script") let key=203;;
+    "has-search_exclusive") let key=204;;
+    "has-search_shared") let key=205;;
+    "has-search_static") let key=206;;
+    "has-version_major_prefix") let key=207;;
+    "has-version_micro_prefix") let key=208;;
+    "has-version_minor_prefix") let key=209;;
+    "has-version_nano_prefix") let key=210;;
+
+    "has-build_compiler-mode") let key=207;;
+    "has-build_indexer-mode") let key=208;;
+    "has-build_indexer_arguments-mode") let key=209;;
+    "has-build_name-mode") let key=210;;
+    "has-has_path_standard-mode") let key=211;;
+    "has-path_library_script-mode") let key=212;;
+    "has-path_library_shared-mode") let key=213;;
+    "has-path_library_static-mode") let key=214;;
+    "has-path_object_script-mode") let key=215;;
+    "has-path_object_shared-mode") let key=216;;
+    "has-path_object_static-mode") let key=217;;
+    "has-path_program_script-mode") let key=218;;
+    "has-path_program_shared-mode") let key=219;;
+    "has-path_program_static-mode") let key=220;;
+    "has-path_sources-mode") let key=221;;
+    "has-path_sources_headers-mode") let key=222;;
+    "has-path_sources_library-mode") let key=223;;
+    "has-path_sources_object-mode") let key=224;;
+    "has-path_sources_program-mode") let key=225;;
+    "has-path_sources_script-mode") let key=226;;
+    "has-search_exclusive-mode") let key=227;;
+    "has-search_shared-mode") let key=228;;
+    "has-search_static-mode") let key=229;;
+    "has-version_major_prefix-mode") let key=230;;
+    "has-version_micro_prefix-mode") let key=231;;
+    "has-version_minor_prefix-mode") let key=232;;
+    "has-version_nano_prefix-mode") let key=233;;
   esac
 }
 
@@ -876,7 +892,7 @@ bootstrap_load_settings() {
   fi
 
   # Single value Objects.
-  for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_object preserve_path_headers process_post process_pre search_exclusive search_shared search_static version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do
+  for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_headers path_sources_library path_sources_object path_sources_program path_sources_script preserve_path_headers process_post process_pre search_exclusive search_shared search_static version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do
 
     bootstrap_id "${i}"
 
@@ -971,7 +987,7 @@ bootstrap_load_settings_mode() {
   for m in ${modes} ; do
 
     # Single value Objects.
-    for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_object preserve_path_headers process_post process_pre search_exclusive search_shared search_static version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do
+    for i in build_compiler build_indexer build_language build_name build_script build_shared build_sources_object build_sources_object_shared build_sources_object_static build_static has_path_standard path_headers path_language path_library_script path_library_shared path_library_static path_object_script path_object_shared path_object_static path_program_script path_program_shared path_program_static path_sources path_sources_headers path_sources_library path_sources_object path_sources_program path_sources_script preserve_path_headers process_post process_pre search_exclusive search_shared search_static version_file version_major version_major_prefix version_micro version_micro_prefix version_minor version_minor_prefix version_nano version_nano_prefix version_target ; do
 
       bootstrap_id "${i}-mode"
 
@@ -1260,6 +1276,21 @@ bootstrap_operation_build() {
   bootstrap_id "path_program_static"
   local path_program_static=${variables[${key}]}
 
+  bootstrap_id "path_sources_headers"
+  local path_sources_headers=${variables[${key}]}
+
+  bootstrap_id "path_sources_library"
+  local path_sources_library=${variables[${key}]}
+
+  bootstrap_id "path_sources_object"
+  local path_sources_object=${variables[${key}]}
+
+  bootstrap_id "path_sources_program"
+  local path_sources_program=${variables[${key}]}
+
+  bootstrap_id "path_sources_script"
+  local path_sources_script=${variables[${key}]}
+
   bootstrap_id "has_path_standard"
   local has_path_standard=${variables[${key}]}
 
@@ -1370,14 +1401,6 @@ bootstrap_operation_build() {
 
   bootstrap_operation_build_prepare_remaining
 
-  if [[ ${build_shared} == "yes" && -f ${project_built_shared}.built || ${build_static} == "yes" && -f ${project_built_static}.built ]] ; then
-    if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
-      echo -e "${c_warning}WARNING: This project has already been built.${c_reset}"
-    fi
-
-    return 0
-  fi
-
   local arguments_include="-I${path_build}includes/"
   local arguments_shared="-L${path_build}libraries/${path_library_shared}"
   local arguments_static="-L${path_build}libraries/${path_library_static}"
@@ -1404,7 +1427,13 @@ bootstrap_operation_build() {
 
   if [[ ${sources_documentation} != "" ]] ; then
     for i in ${sources_documentation} ; do
+
       directory=$(dirname ${i})
+      if [[ ${directory} == "." ]] ; then
+        directory=
+      elif [[ ${directory} != "" ]] ; then
+        directory="${directory}/"
+      fi
 
       if [[ ! -e ${path_documentation}${i} ]] ; then
         if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
@@ -1415,30 +1444,32 @@ bootstrap_operation_build() {
         continue;
       fi
 
-      if [[ ${directory} == "." ]] ; then
-        cp ${verbose_common} -R ${path_documentation}${i} ${path_build}documentation/ || failure=1
-      else
+      if [[ ! -d ${path_build}documentation/${directory} ]] ; then
         mkdir ${verbose_common} -p ${path_build}documentation/${directory} || failure=1
+      fi
 
-        if [[ ${failure} -eq 0 ]] ; then
-          cp ${verbose_common} -R ${path_documentation}${i} ${path_build}documentation/${directory}/ || failure=1
-        fi
+      if [[ ${failure} -eq 0 ]] ; then
+        cp ${verbose_common} -R ${path_documentation}${i} ${path_build}documentation/${directory} || failure=1
       fi
     done
   fi
 
   if [[ ${sources_setting} != "" ]] ; then
     for i in ${sources_setting} ; do
-      directory=$(dirname ${i})
 
+      directory=$(dirname ${i})
       if [[ ${directory} == "." ]] ; then
-        cp ${verbose_common} -R ${path_settings}${i} ${path_build}settings/ || failure=1
-      else
+        directory=
+      elif [[ ${directory} != "" ]] ; then
+        directory="${directory}/"
+      fi
+
+      if [[ ! -d ${path_build}settings/${directory} ]] ; then
         mkdir ${verbose_common} -p ${path_build}settings/${directory} || failure=1
+      fi
 
-        if [[ ${failure} -eq 0 ]] ; then
-          cp ${verbose_common} -R ${path_settings}${i} ${path_build}settings/${directory}/ || failure=1
-        fi
+      if [[ ${failure} -eq 0 ]] ; then
+        cp ${verbose_common} -R ${path_settings}${i} ${path_build}settings/${directory} || failure=1
       fi
     done
   fi
@@ -1446,75 +1477,60 @@ bootstrap_operation_build() {
   if [[ ${failure} -eq 0 && ${sources_headers} != "" ]] ; then
     if [[ ${preserve_path_headers} == "yes" ]] ; then
       for i in ${sources_headers} ; do
-        directory=$(dirname ${i})
 
+        directory=$(dirname ${i})
         if [[ ${directory} == "." ]] ; then
-          cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
-        else
-          if [[ ! -d ${path_build}includes/${path_headers}${directory} ]] ; then
-            mkdir ${verbose_common} -p ${path_build}includes/${path_headers}${directory} || failure=1
-          fi
+          directory=
+        elif [[ ${directory} != "" ]] ; then
+          directory="${directory}/"
+        fi
 
-          if [[ ${failure} -eq 0 ]] ; then
-            cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers}${i} || failure=1
-          fi
+        if [[ ! -d ${path_build}includes/${path_headers}${directory} ]] ; then
+          mkdir ${verbose_common} -p ${path_build}includes/${path_headers}${directory} || failure=1
+        fi
+
+        if [[ ${failure} -eq 0 ]] ; then
+          cp ${verbose_common} -f ${path_sources_headers}${path_language}${i} ${path_build}includes/${path_headers}${directory} || failure=1
         fi
       done
     else
       for i in ${sources_headers} ; do
-        cp ${verbose_common} -f ${path_sources}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
+        cp ${verbose_common} -f ${path_sources_headers}${path_language}${i} ${path_build}includes/${path_headers} || failure=1
       done
     fi
   fi
 
-  if [[ ${failure} -eq 0 && ${build_shared} == "yes" && ! -f ${project_built_shared}.built ]] ; then
+  if [[ ${failure} -eq 0 && ${build_shared} == "yes" && ! -f ${project_built_shared}-${settings_name}.built ]] ; then
     if [[ ${sources_object} != "" || ${sources_object_shared} != "" ]] ; then
-      sources=
-      let count=0
-
-      # Sources object only allows for a single value.
-      if [[ ${sources_object_shared} != "" ]] ; then
-        for i in ${sources_object_shared} ; do
-          let count++
-        done
+      for i in ${sources_object} ${sources_object_shared} ; do
 
-        if [[ ${count} -gt 1 ]] ; then
-          if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
-            echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object_shared${c_warning}' found, only using the first one found is going to be used.${c_reset}"
-          fi
+        directory=$(dirname ${i})
+        if [[ ${directory} == "." ]] ; then
+          directory=
+        elif [[ ${directory} != "" ]] ; then
+          directory="${directory}/"
         fi
 
-        for i in ${sources_object_shared} ; do
-          sources="${path_sources_object}${path_language}${i} "
+        if [[ ! -d ${path_build}objects/${path_object_shared}${directory} ]] ; then
+          mkdir ${verbose_common} -p ${path_build}objects/${path_object_shared}${directory} || failure=1
+        fi
 
-          break
-        done
-      else
-        for i in ${sources_object} ; do
-          let count++
-        done
+        sources="${path_sources_object}${path_language}${i} "
+        n=$(echo $i | sed -e 's|\.[^\.]*$||')
 
-        if [[ ${count} -gt 1 ]] ; then
-          if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
-            echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object${c_warning}' found, only using the first one found is going to be used.${c_reset}"
-          fi
+        if [[ ${verbosity} == "verbose" ]] ; then
+          echo ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_shared}${n}.o ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_object} ${flags_object_shared} ${defines} ${defines_shared} ${defines_object} ${defines_object_shared} ${define_extra}
         fi
 
-        for i in ${sources_object} ; do
-          sources="${path_sources_object}${path_language}${i} "
+        ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_shared}${n}.o ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_object} ${flags_object_shared} ${defines} ${defines_shared} ${defines_object} ${defines_object_shared} ${define_extra} || failure=1
 
+        if [[ ${failure} -ne 0 ]] ; then
           break
-        done
-      fi
-
-      if [[ ${verbosity} == "verbose" ]] ; then
-        echo ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_shared}${build_name}.o ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_object} ${flags_object_shared} ${defines} ${defines_shared} ${defines_object} ${defines_object_shared} ${define_extra}
-      fi
-
-      ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_shared}${build_name}.o ${arguments_shared} ${arguments_include} ${libraries} ${libraries_shared} ${flags} ${flags_shared} ${flags_object} ${flags_object_shared} ${defines} ${defines_shared} ${defines_object} ${defines_object_shared} ${define_extra} || failure=1
+        fi
+      done
     fi
 
-    if [[ ${sources_library} != "" || ${sources_library_shared} != "" ]] ; then
+    if [[ ${failure} -eq 0 && (${sources_library} != "" || ${sources_library_shared} != "") ]] ; then
       sources=
 
       if [[ ${objects_library} != "" || ${objects_library_shared} != "" ]] ; then
@@ -1524,7 +1540,7 @@ bootstrap_operation_build() {
       fi
 
       for i in ${sources_library} ${sources_library_shared} ; do
-        sources="${sources}${path_sources}${path_language}${i} "
+        sources="${sources}${path_sources_library}${path_language}${i} "
       done
 
       if [[ ${verbosity} == "verbose" ]] ; then
@@ -1560,7 +1576,7 @@ bootstrap_operation_build() {
       fi
     fi
 
-    if [[ ${failure} -eq 0 && ${sources_program} != "" ]] ; then
+    if [[ ${failure} -eq 0 && (${sources_program} != "" ||  ${sources_program_shared} != "") ]] ; then
       sources=
       links=
 
@@ -1575,7 +1591,7 @@ bootstrap_operation_build() {
       fi
 
       for i in ${sources_program} ${sources_program_shared} ; do
-        sources="${sources}${path_sources}${path_language}${i} "
+        sources="${sources}${path_sources_program}${path_language}${i} "
       done
 
       if [[ ${verbosity} == "verbose" ]] ; then
@@ -1590,50 +1606,34 @@ bootstrap_operation_build() {
     fi
   fi
 
-  if [[ ${failure} -eq 0 && ${build_static} == "yes" && ! -f ${project_built_static}.built ]] ; then
+  if [[ ${failure} -eq 0 && ${build_static} == "yes" && ! -f ${project_built_static}-${settings_name}.built ]] ; then
     if [[ ${sources_object} != "" || ${sources_object_static} != "" ]] ; then
-      let count=0
+      for i in ${sources_object} ${sources_object_static} ; do
 
-      # Sources object only allows for a single value.
-      if [[ ${sources_object_static} != "" ]] ; then
-        for i in ${sources_object_static} ; do
-          let count++
-        done
+        directory=$(dirname ${i})
+        if [[ ${directory} == "." ]] ; then
+          directory=
+        elif [[ ${directory} != "" ]] ; then
+          directory="${directory}/"
+        fi
 
-        if [[ ${count} -gt 1 ]] ; then
-          if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
-            echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object_static${c_warning}' found, only using the first one found is going to be used.${c_reset}"
-          fi
+        if [[ ! -d ${path_build}objects/${path_object_shared}${directory} ]] ; then
+          mkdir ${verbose_common} -p ${path_build}objects/${path_object_shared}${directory} || failure=1
         fi
 
-        for i in ${sources_object_static} ; do
-          sources="${path_sources_object}${path_language}${i} "
+        sources="${path_sources_object}${path_language}${i} "
+        n=$(echo $i | sed -e 's|\.[^\.]*$||')
 
-          break
-        done
-      else
-        for i in ${sources_object} ; do
-          let count++
-        done
-
-        if [[ ${count} -gt 1 ]] ; then
-          if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
-            echo -e "${c_warning}WARNING: Multiple '${c_notice}sources_object${c_warning}' found, only using the first one found is going to be used.${c_reset}"
-          fi
+        if [[ ${verbosity} == "verbose" ]] ; then
+          echo ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_static}${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_object} ${flags_object_static} ${defines} ${defines_static} ${defines_object} ${defines_object_static} ${define_extra}
         fi
 
-        for i in ${sources_object} ; do
-          sources="${path_sources_object}${path_language}${i} "
+        ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_static}${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_object} ${flags_object_static} ${defines} ${defines_static} ${defines_object} ${defines_object_static} ${define_extra} || failure=1
 
+        if [[ ${failure} -ne 0 ]] ; then
           break
-        done
-      fi
-
-      if [[ ${verbosity} == "verbose" ]] ; then
-        echo ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_static}${build_name}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_object} ${flags_object_static} ${defines} ${defines_static} ${defines_object} ${defines_object_static} ${define_extra}
-      fi
-
-      ${build_compiler} ${sources} -c -o ${path_build}objects/${path_object_static}${build_name}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_object} ${flags_object_static} ${defines} ${defines_static} ${defines_object} ${defines_object_static} ${define_extra} || failure=1
+        fi
+      done
     fi
 
     if [[ ${sources_library} != "" || ${sources_library_static} != "" ]] ; then
@@ -1646,27 +1646,32 @@ bootstrap_operation_build() {
       fi
 
       for i in ${sources_library} ${sources_library_static} ; do
+
         directory=$(dirname ${i})
-        n=$(basename ${i} | sed -e 's|\.c$||')
+        if [[ ${directory} == "." ]] ; then
+          directory=
+        elif [[ ${directory} != "" ]] ; then
+          directory="${directory}/"
+        fi
 
-        if [[ ${directory} != "." && ! -d ${path_build}objects/${directory} ]] ; then
-          mkdir ${verbose_common} -p ${path_build}objects/${directory}
+        n=$(basename ${i} | sed -e 's|\.[^\.]*$||')
 
-          if [[ ${?} -ne 0 ]] ; then
-            let failure=1
+        if [[ ! -d ${path_build}objects/${directory} ]] ; then
+          mkdir ${verbose_common} -p ${path_build}objects/${directory} || failure=1
 
+          if [[ ${failure} -eq 1 ]] ; then
             break;
           fi
         fi
 
         # These are objects created by the static build step rather than objects created by the object build step.
-        sources="${sources}${path_build}objects/${directory}/${n}.o "
+        sources="${sources}${path_build}objects/${directory}${n}.o "
 
         if [[ ${verbosity} == "verbose" ]] ; then
-          echo ${build_compiler} ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_library} ${flags_library_static} ${defines} ${defines_static} ${defines_library} ${defines_library_static} ${define_extra}
+          echo ${build_compiler} ${path_sources_library}${path_language}${i} -c -static -o ${path_build}objects/${directory}${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_library} ${flags_library_static} ${defines} ${defines_static} ${defines_library} ${defines_library_static} ${define_extra}
         fi
 
-        ${build_compiler} ${path_sources}${path_language}${i} -c -static -o ${path_build}objects/${directory}/${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_library} ${flags_library_static} ${defines} ${defines_static} ${defines_library} ${defines_library_static} ${define_extra} || failure=1
+        ${build_compiler} ${path_sources_library}${path_language}${i} -c -static -o ${path_build}objects/${directory}${n}.o ${arguments_static} ${arguments_include} ${libraries} ${libraries_static} ${flags} ${flags_static} ${flags_library} ${flags_library_static} ${defines} ${defines_static} ${defines_library} ${defines_library_static} ${define_extra} || failure=1
 
         if [[ ${failure} -eq 1 ]] ; then
           break;
@@ -1683,7 +1688,7 @@ bootstrap_operation_build() {
       fi
     fi
 
-    if [[ ${failure} -eq 0 && ${sources_program} != "" ]] ; then
+    if [[ ${failure} -eq 0 && (${sources_program} != "" || ${sources_program_static} != "") ]] ; then
       sources=
       links=
 
@@ -1698,7 +1703,7 @@ bootstrap_operation_build() {
       fi
 
       for i in ${sources_program} ${sources_program_static} ; do
-        sources="${sources}${path_sources}${path_language}${i} "
+        sources="${sources}${path_sources_program}${path_language}${i} "
       done
 
       if [[ ${verbosity} == "verbose" ]] ; then
@@ -1879,12 +1884,48 @@ bootstrap_operation_build_prepare_defaults() {
     fi
   fi
 
+  bootstrap_id "has-path_sources_headers-mode"
+  if [[ ${variables[${key}]} != "yes" ]] ; then
+
+    bootstrap_id "has-path_sources_headers"
+    if [[ ${variables[${key}]} != "yes" ]] ; then
+      path_sources_headers=${path_sources}
+    fi
+  fi
+
+  bootstrap_id "has-path_sources_library-mode"
+  if [[ ${variables[${key}]} != "yes" ]] ; then
+
+    bootstrap_id "has-path_sources_library"
+    if [[ ${variables[${key}]} != "yes" ]] ; then
+      path_sources_library=${path_sources}
+    fi
+  fi
+
   bootstrap_id "has-path_sources_object-mode"
   if [[ ${variables[${key}]} != "yes" ]] ; then
 
     bootstrap_id "has-path_sources_object"
     if [[ ${variables[${key}]} != "yes" ]] ; then
-      path_sources_object="sources/"
+      path_sources_object=${path_sources}
+    fi
+  fi
+
+  bootstrap_id "has-path_sources_program-mode"
+  if [[ ${variables[${key}]} != "yes" ]] ; then
+
+    bootstrap_id "has-path_sources_program"
+    if [[ ${variables[${key}]} != "yes" ]] ; then
+      path_sources_program=${path_sources}
+    fi
+  fi
+
+  bootstrap_id "has-path_sources_script-mode"
+  if [[ ${variables[${key}]} != "yes" ]] ; then
+
+    bootstrap_id "has-path_sources_script"
+    if [[ ${variables[${key}]} != "yes" ]] ; then
+      path_sources_script=${path_sources}
     fi
   fi
 
@@ -3044,7 +3085,7 @@ bootstrap_operation_clean() {
     fi
   done
 
-  if [[ -f ${project_built}.prepared ]] ; then
+  if [[ -f ${project_built}-${settings_name}.prepared ]] ; then
     rm ${verbose_common} -f ${project_built}-${settings_name}.prepared
   fi
 
index b0a992f9c57d577e7166ff0dd546818be2b22c46..88791c25b6af5ddf510f23947eaa6d0a0022bed0 100644 (file)
@@ -82,7 +82,7 @@ build_sources_program fll/level_2/print.c
 build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/program/print.c fll/level_2/private-program.c
 
 build_sources_program program/fake/main/build.c program/fake/main/clean.c program/fake/main/common.c program/fake/main/fake.c program/fake/main/make.c program/fake/main/print/common.c program/fake/main/print/context.c program/fake/main/print/error.c program/fake/main/print/message.c program/fake/main/print/operation.c program/fake/main/print/warning.c program/fake/main/print/verbose.c program/fake/main/signal.c program/fake/main/skeleton.c program/fake/main/thread.c
-build_sources_program program/fake/main/build/enumeration.c program/fake/main/build/library.c program/fake/main/build/load.c program/fake/main/build/object.c program/fake/main/build/objects.c program/fake/main/build/print/compile.c program/fake/main/build/print/error.c program/fake/main/build/print/message.c program/fake/main/build/print/verbose.c program/fake/main/build/print/warning.c program/fake/main/build/program.c program/fake/main/build/skeleton.c program/fake/main/build/string.c
+build_sources_program program/fake/main/build/enumeration.c program/fake/main/build/library.c program/fake/main/build/load.c program/fake/main/build/object.c program/fake/main/build/print/compile.c program/fake/main/build/print/error.c program/fake/main/build/print/message.c program/fake/main/build/print/verbose.c program/fake/main/build/print/warning.c program/fake/main/build/program.c program/fake/main/build/skeleton.c program/fake/main/build/string.c
 build_sources_program program/fake/main/common/define.c program/fake/main/common/enumeration.c program/fake/main/common/print.c program/fake/main/common/string.c program/fake/main/common/type.c
 build_sources_program program/fake/main/fake/path_generate.c program/fake/main/fake/do.c
 build_sources_program program/fake/main/make/load_fakefile.c program/fake/main/make/load_parameters.c program/fake/main/make/operate_block.c program/fake/main/make/operate.c program/fake/main/make/operate_process.c program/fake/main/make/operate_process_type.c program/fake/main/make/operate_validate.c program/fake/main/make/operate_validate_type.c program/fake/main/make/print/error.c program/fake/main/make/print/message.c program/fake/main/make/print/verbose.c program/fake/main/make/print/warning.c
index 7b0ff962831f70c3f57468b8124110c03382d20b..f896ba19a0a4d17e8fd5cc9cfeaac56c40b1c492 100644 (file)
@@ -135,4 +135,4 @@ Build a skeleton directory structure.
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, GNU LGPL Version 2.1 or later.
+Copyright \(co 2007-2024 Kevin Day, GNU LGPL Version 2.1 or later.
index 32f673d8a22e6908442cdc01b1abe4cd1f7c02ed..ab94c0e1df48e4111a0347a610e3cad6beda8f8d 100644 (file)
@@ -24,4 +24,4 @@ Each Content represents documentation explaining the intent and purpose of that
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, Open Standard License 1.0 or later.
+Copyright \(co 2007-2024 Kevin Day, Open Standard License 1.0 or later.
index e4894d45a1b489c20a3799cf9b42f09c1c78d683..02dcfaab3313f2e7f25259daa3c6d45bde4e6010 100644 (file)
@@ -25,4 +25,4 @@ Future versions of this will clarify what and how Content, such as version numbe
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, Open Standard License 1.0 or later.
+Copyright \(co 2007-2024 Kevin Day, Open Standard License 1.0 or later.
index 0bba7384b5c9385739e917137e1b84a7dea62e12..0f57d47041180eb2ce3702db36325d5503160479 100644 (file)
@@ -756,4 +756,4 @@ The \fBif\fR Section Operation condition \fBparameter\fR:
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, Open Standard License 1.0 or later.
+Copyright \(co 2007-2024 Kevin Day, Open Standard License 1.0 or later.
index 6240615aae49787f6789d96ce8875dd6a551565f..4186234075258c928fd614f4f211c157926b778f 100644 (file)
@@ -673,4 +673,4 @@ All Object names support having a \fB\-\fR and a \fBmode\fR name, such as \fBbui
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, Open Standard License 1.0 or later.
+Copyright \(co 2007-2024 Kevin Day, Open Standard License 1.0 or later.
index 5b11893dd4735b6981ebe13e2a77b0bc82b588dc..1f7b8931c219a05d6cfd7079628166b69a83550f 100644 (file)
@@ -78,9 +78,15 @@ extern "C" {
     }
 
     {
+      f_string_statics_t empty = f_string_statics_t_initialize;
+
       f_string_statics_t * const strings[] = {
-        &data_build->setting.build_libraries,
-        (is_shared) ? &data_build->setting.build_libraries_shared : &data_build->setting.build_libraries_static,
+        (type == fake_build_type_object_e) ? &empty : &data_build->setting.build_libraries,
+        (type == fake_build_type_object_e)
+          ? &empty
+          : (is_shared)
+            ? &data_build->setting.build_libraries_shared
+            : &data_build->setting.build_libraries_static,
         &data_build->setting.flags,
         (is_shared) ? &data_build->setting.flags_shared : &data_build->setting.flags_static,
         (type == fake_build_type_library_e)
@@ -678,7 +684,7 @@ extern "C" {
       }
 
       if (data_build.setting.build_shared) {
-        main->program.child = fake_build_object_shared(data, &data_build, mode, stage.file_object_shared);
+        main->program.child = fake_build_object(data, &data_build, mode, stage.file_object_shared, F_true);
 
         main->program.child = fake_build_library_shared(data, &data_build, mode, stage.file_library_shared);
 
@@ -686,9 +692,9 @@ extern "C" {
       }
 
       if (data_build.setting.build_static) {
-        main->program.child = fake_build_object_static(data, &data_build, mode, stage.file_object_static);
+        main->program.child = fake_build_object(data, &data_build, mode, stage.file_object_static, F_false);
 
-        main->program.child = fake_build_objects_static(data, &data_build, mode, stage.file_objects_static);
+        main->program.child = fake_build_library_static_object(data, &data_build, mode, stage.file_library_static_object);
 
         main->program.child = fake_build_library_static(data, &data_build, mode, stage.file_library_static);
 
@@ -730,7 +736,6 @@ extern "C" {
 
     main->setting.state.status = f_string_dynamic_append_nulless(*setting_path_source, source);
 
-    // @todo add additional languages, java, etc..?
     if (F_status_is_error_not(main->setting.state.status) && data_build->setting.has_path_standard) {
       if (data_build->setting.build_language == fake_build_language_c_e) {
         main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_c_s, source);
index 64855909143a636b1f5385d987bc052138bfd8e6..ea1b40ef8e76a2b880c4d01f5f9712a3a0012fcb 100644 (file)
@@ -226,10 +226,10 @@ extern "C" {
  *     Errors (with error bit) from: fake_build_object_script()
  *     Errors (with error bit) from: fake_build_object_shared()
  *     Errors (with error bit) from: fake_build_object_static()
- *     Errors (with error bit) from: fake_build_objects_static()
  *     Errors (with error bit) from: fake_build_program_script()
  *     Errors (with error bit) from: fake_build_program_shared()
  *     Errors (with error bit) from: fake_build_program_static()
+ *     Errors (with error bit) from: fake_build_library_static_object()
  *     Errors (with error bit) from: fake_build_skeleton()
  * @param setting_file
  *   The name of the settings file to use.
@@ -256,10 +256,9 @@ extern "C" {
  * @see fake_build_load_environment()
  * @see fake_build_load_setting()
  * @see fake_build_load_stage()
+ * @see fake_build_object()
  * @see fake_build_object_script()
- * @see fake_build_object_shared()
- * @see fake_build_object_static()
- * @see fake_build_objects_static()
+ * @see fake_build_program_object_static()
  * @see fake_build_program_script()
  * @see fake_build_program_shared()
  * @see fake_build_program_static()
index 6f49d7eb19cdf799015ab1ee0116dd926ef16e4c..f6ced8ef636579d2a4fd75e455cb6a21843668da 100644 (file)
@@ -382,7 +382,7 @@ extern "C" {
       if (F_status_is_error(main->setting.state.status)) {
         fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
 
-        return 0;
+        break;
       }
     } // for
 
@@ -409,13 +409,19 @@ extern "C" {
 
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
-
-          return 0;
         }
       }
     }
 
     if (F_status_is_error_not(main->setting.state.status)) {
+      fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_static);
+
+      if (F_status_is_error(main->setting.state.status)) {
+        fake_print_error(&main->program.error, macro_fake_f(fake_build_objects_add));
+      }
+    }
+
+    if (F_status_is_error_not(main->setting.state.status)) {
       f_number_unsigned_t j = 0;
 
       const f_string_dynamics_t *sources[2] = {
@@ -449,7 +455,7 @@ extern "C" {
           fake_string_dynamic_reset(&main->cache_argument);
 
           if (main->cache_2.used) {
-            main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &main->cache_2);
+            main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects_static, &main->cache_2);
 
             if (F_status_is_error(main->setting.state.status)) {
               fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_prepend));
@@ -476,7 +482,7 @@ extern "C" {
             }
           }
           else {
-            main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects, &main->cache_argument);
+            main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_static, &main->cache_argument);
 
             if (F_status_is_error_not(main->setting.state.status)) {
               main->setting.state.status = f_string_dynamic_append_nulless(main->cache_1, &main->cache_argument);
@@ -516,6 +522,181 @@ extern "C" {
   }
 #endif // _di_fake_build_library_static_
 
+#ifndef _di_fake_build_library_static_object_
+  int fake_build_library_static_object(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
+
+    if (!data || !data->main || !data_build) return 0;
+    if (data->main->setting.state.status == F_child) return data->main->program.child;
+    if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
+    if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_static.used) return 0;
+
+    fake_main_t * const main = data->main;
+
+    fake_build_print_compile_library_static_object(&main->program.message);
+
+    fake_string_dynamics_reset(&main->cache_arguments);
+
+    int result = main->program.child;
+
+    const f_string_dynamics_t *sources[2] = {
+      &data_build->setting.build_sources_library,
+      &data_build->setting.build_sources_library_static,
+    };
+
+    f_number_unsigned_t i = 0;
+    f_number_unsigned_t j = 0;
+    uint8_t k = 0;
+
+    for (i = 0; i < 2; ++i) {
+
+      for (j = 0; j < sources[i]->used; ++j) {
+
+        if (!sources[i]->array[j].used) continue;
+
+        fake_string_dynamic_reset(&main->cache_1);
+        fake_string_dynamic_reset(&main->cache_2);
+        fake_string_dynamic_reset(&main->cache_argument);
+        fake_string_dynamics_reset(&main->cache_arguments);
+
+        fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_library, &main->cache_1);
+        if (F_status_is_error(main->setting.state.status)) break;
+
+        main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &main->cache_1);
+
+        if (F_status_is_error(main->setting.state.status)) {
+          fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+
+          return 0;
+        }
+
+        fake_build_get_file_name_without_extension(data, sources[i]->array[j], &main->cache_2);
+
+        if (F_status_is_error(main->setting.state.status)) {
+          fake_print_error(&main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
+
+          break;
+        }
+
+        main->setting.state.status = f_file_name_directory(sources[i]->array[j], &main->cache_argument);
+
+        if (F_status_is_error(main->setting.state.status)) {
+          fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
+
+          break;
+        }
+
+        if (main->cache_argument.used) {
+          main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects_static, &main->cache_argument);
+
+          if (F_status_is_error(main->setting.state.status)) {
+            fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_prepend));
+
+            break;
+          }
+
+          main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_argument);
+
+          if (F_status_is_error(main->setting.state.status)) {
+            fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
+
+            break;
+          }
+
+          main->setting.state.status = f_directory_exists(main->cache_argument);
+
+          if (main->setting.state.status == F_false) {
+            fake_build_print_error_exist_not_directory(&main->program.message, main->cache_argument);
+
+            main->setting.state.status = F_status_set_error(F_failure);
+
+            break;
+          }
+
+          if (main->setting.state.status == F_file_found_not) {
+            main->setting.state.status = f_directory_create(main->cache_argument, mode.directory);
+
+            if (F_status_is_error(main->setting.state.status)) {
+              if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+                fake_build_print_error_cannot_create_due_to_parent(&main->program.message, main->cache_argument);
+              }
+              else {
+                fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
+              }
+
+              break;
+            }
+
+            fake_build_print_verbose_create_directory(&main->program.message, main->cache_argument);
+          }
+
+          if (F_status_is_error(main->setting.state.status)) {
+            fake_print_error_file(&main->program.error, macro_fake_f(f_directory_exists), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
+
+            break;
+          }
+        }
+
+        if (main->cache_argument.used) {
+          main->setting.state.status = F_okay;
+        }
+        else {
+          main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_static, &main->cache_argument);
+        }
+
+        if (F_status_is_error_not(main->setting.state.status)) {
+          main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_argument);
+        }
+
+        if (F_status_is_error_not(main->setting.state.status)) {
+          main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
+        }
+
+        if (F_status_is_error(main->setting.state.status)) {
+          fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+
+          return 0;
+        }
+
+        const f_string_static_t values[] = {
+          main->cache_1,
+          fake_build_parameter_object_compile_s,
+          fake_build_parameter_object_static_s,
+          fake_build_parameter_object_output_s,
+          main->cache_argument,
+        };
+
+        for (k = 0; k < 5; ++k) {
+
+          if (!values[k].used) continue;
+
+          main->setting.state.status = fll_execute_arguments_add(values[k], &main->cache_arguments);
+          if (F_status_is_error(main->setting.state.status)) break;
+        } // for
+
+        fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e);
+
+        if (F_status_is_error(main->setting.state.status)) {
+          fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
+
+          break;
+        }
+
+        result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
+
+        if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) break;
+      } // for
+
+      if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) break;
+    } // for
+
+    if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
+      fake_build_touch(data, file_stage);
+    }
+
+    return result;
+  }
+#endif // _di_fake_build_library_static_object_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index c3543394bd63530bcad23c7160f5b4f5fa4cd36c..647f908898a49dbfc351060f5b515189d7d95917 100644 (file)
@@ -146,6 +146,7 @@ extern "C" {
  * @see fll_execute_arguments_add()
  *
  * @see fake_build_get_file_name_without_extension()
+ * @see fake_build_objects_add()
  * @see fake_build_print_compile_library_static()
  * @see fake_build_touch()
  * @see fake_execute()
@@ -154,6 +155,56 @@ extern "C" {
   extern int fake_build_library_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage);
 #endif // _di_fake_build_library_static_
 
+/**
+ * Build the static libraries objects.
+ *
+ * @param data
+ *   The program data.
+ *
+ *   This modifies data.main.cache_1.
+ *   This modifies data.main.cache_2.
+ *   This modifies data.main.cache_argument.
+ *   This modifies data.main.cache_arguments.
+ *
+ *   This alters data.main->setting.state.status:
+ *     F_okay on success.
+ *
+ *     Errors (with error bit) from: f_file_name_directory()
+ *     Errors (with error bit) from: f_string_dynamic_append_assure()
+ *     Errors (with error bit) from: f_string_dynamic_prepend()
+ *     Errors (with error bit) from: fll_execute_arguments_add()
+ *
+ *     Errors (with error bit) from: fake_build_get_file_name_without_extension()
+ *     Errors (with error bit) from: fake_build_print_compile_library_static()
+ *     Errors (with error bit) from: fake_build_touch()
+ *     Errors (with error bit) from: fake_execute()
+ * @param data_build
+ *   The build data.
+ * @param mode
+ *   The file mode.
+ * @param file_stage
+ *   The specific stage file path.
+ *
+ *   Status codes (with error bit) are returned on any problem.
+ *
+ * @return
+ *   The return code of the execution process.
+ *   This generally is only needed when F_child is returned, where this holds the return status of the child process.
+ *
+ * @see f_file_name_directory()
+ * @see f_string_dynamic_append_assure()
+ * @see f_string_dynamic_prepend()
+ * @see fll_execute_arguments_add()
+ *
+ * @see fake_build_get_file_name_without_extension()
+ * @see fake_build_print_compile_library_static()
+ * @see fake_build_touch()
+ * @see fake_execute()
+ */
+#ifndef _di_fake_build_library_static_object_
+  extern int fake_build_library_static_object(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage);
+#endif // _di_fake_build_library_static_object_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 92ca4c2d7d7478cb74a2d3febffabe2d119e1ad8..d5aed39ae03c374929b06b3207c6c406cb8bb397 100644 (file)
@@ -1403,6 +1403,7 @@ extern "C" {
       fake_build_stage_library_script_s,
       fake_build_stage_library_shared_s,
       fake_build_stage_library_static_s,
+      fake_build_stage_library_static_object_s,
       fake_build_stage_object_script_s,
       fake_build_stage_object_shared_s,
       fake_build_stage_object_static_s,
@@ -1423,6 +1424,7 @@ extern "C" {
       &stage->file_library_script,
       &stage->file_library_shared,
       &stage->file_library_static,
+      &stage->file_library_static_object,
       &stage->file_object_script,
       &stage->file_object_shared,
       &stage->file_object_static,
index d5fc6bfdb29f2be4b41f29c0401c3dac38b07d9a..484ac8ef6faee4394304275f4f1d54f8f82e516e 100644 (file)
@@ -17,13 +17,13 @@ extern "C" {
   }
 #endif // _di_fake_build_object_script_
 
-#ifndef _di_fake_build_object_shared_
-  int fake_build_object_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
+#ifndef _di_fake_build_object_
+  int fake_build_object(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, const uint8_t shared) {
 
     if (!data || !data->main || !data_build) return 0;
     if (data->main->setting.state.status == F_child) return data->main->program.child;
     if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
-    if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_shared.used) return 0;
+    if (!data_build->setting.build_sources_object.used && (shared && !data_build->setting.build_sources_object_shared.used || !shared && !data_build->setting.build_sources_object_static.used)) return 0;
 
     fake_main_t * const main = data->main;
 
@@ -35,14 +35,19 @@ extern "C" {
 
     const f_string_dynamics_t *sources[2] = {
       &data_build->setting.build_sources_object,
-      &data_build->setting.build_sources_object_shared,
+      shared ? &data_build->setting.build_sources_object_shared : &data_build->setting.build_sources_object_static,
     };
 
-    fake_build_print_compile_object_shared(&main->program.message);
+    if (shared) {
+      fake_build_print_compile_object_shared(&main->program.message);
+    }
+    else {
+      fake_build_print_compile_object_static(&main->program.message);
+    }
 
     for (i = 0; i < 2; ++i) {
 
-      for (j = 0; j < sources[i]->used; ++j) {
+      for (j = 0; j < sources[i]->used && F_status_is_error_not(main->setting.state.status); ++j) {
 
         fake_string_dynamic_reset(&main->cache_argument);
         fake_string_dynamics_reset(&main->cache_arguments);
@@ -52,7 +57,7 @@ extern "C" {
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_object_add));
 
-          return 0;
+          break;
         }
 
         fake_string_dynamic_reset(&main->cache_argument);
@@ -64,7 +69,7 @@ extern "C" {
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
 
-          return 0;
+          break;
         }
 
         main->setting.state.status = f_file_name_directory(sources[i]->array[j], &main->cache_2);
@@ -72,7 +77,7 @@ extern "C" {
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
 
-          return 0;
+          break;
         }
 
         main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_2);
@@ -80,179 +85,19 @@ extern "C" {
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
 
-          return 0;
+          break;
         }
 
-        main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_shared, &main->cache_argument);
+        main->setting.state.status = f_string_dynamic_append_nulless(shared ? data->path_build_objects_shared : data->path_build_objects_static, &main->cache_argument);
 
         if (F_status_is_error_not(main->setting.state.status)) {
           main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_argument);
         }
 
-        main->setting.state.status = f_directory_exists(main->cache_argument);
-
-        if (main->setting.state.status == F_false) {
-          fake_build_print_error_exist_not_directory(&main->program.message, main->cache_argument);
-
-          main->setting.state.status = F_status_set_error(F_failure);
-
-          return 0;
-        }
-
-        if (main->setting.state.status == F_file_found_not) {
-          main->setting.state.status = f_directory_create(main->cache_argument, mode.directory);
-
-          if (F_status_is_error(main->setting.state.status)) {
-            if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
-              fake_build_print_error_cannot_create_due_to_parent(&main->program.message, main->cache_argument);
-            }
-            else {
-              fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
-            }
-
-            return 0;
-          }
-
-          fake_build_print_verbose_create_directory(&main->program.message, main->cache_argument);
-        }
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error_file(&main->program.error, macro_fake_f(f_directory_exists), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
-
-          return 0;
-        }
-
-        if (F_status_is_error_not(main->setting.state.status)) {
-          main->setting.state.status = f_string_dynamic_append_nulless(main->cache_1, &main->cache_argument);
-        }
-
-        if (F_status_is_error_not(main->setting.state.status)) {
-          main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
-        }
-
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
 
-          return 0;
-        }
-
-        {
-          const f_string_static_t values[] = {
-            fake_build_parameter_object_compile_s,
-            fake_build_parameter_object_output_s,
-            main->cache_argument,
-          };
-
-          for (uint8_t i = 0; i < 3; ++i) {
-
-            if (!values[i].used) continue;
-
-            main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
-            if (F_status_is_error(main->setting.state.status)) break;
-          } // for
-        }
-
-        // The cache_argument should be safe at this point to be reset and reused by this function.
-        fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add));
-
-          return 0;
-        }
-
-        result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(fake_execute));
-
-          return result;
-        }
-
-        if (result && !result_final) {
-          result_final = result;
-        }
-      } // for
-    } // for
-
-    if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
-      fake_build_touch(data, file_stage);
-    }
-
-    return result;
-  }
-#endif // _di_fake_build_object_shared_
-
-#ifndef _di_fake_build_object_static_
-  int fake_build_object_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
-
-    if (!data || !data->main || !data_build) return 0;
-    if (data->main->setting.state.status == F_child) return data->main->program.child;
-    if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
-    if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_static.used) return 0;
-
-    fake_main_t * const main = data->main;
-
-    int result = 0;
-    int result_final = 0;
-
-    f_number_unsigned_t i = 0;
-    f_number_unsigned_t j = 0;
-
-    const f_string_dynamics_t *sources[2] = {
-      &data_build->setting.build_sources_object,
-      &data_build->setting.build_sources_object_static,
-    };
-
-    fake_build_print_compile_object_static(&main->program.message);
-
-    for (i = 0; i < 2; ++i) {
-
-      for (j = 0; j < sources[i]->used; ++j) {
-
-        fake_string_dynamic_reset(&main->cache_argument);
-        fake_string_dynamics_reset(&main->cache_arguments);
-
-        fake_build_sources_object_add(data, data_build, &sources[i]->array[j]);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_object_add));
-
-          return 0;
-        }
-
-        fake_string_dynamic_reset(&main->cache_argument);
-        fake_string_dynamic_reset(&main->cache_1);
-        fake_string_dynamic_reset(&main->cache_2);
-
-        fake_build_get_file_name_without_extension(data, sources[i]->array[j], &main->cache_1);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
-
-          return 0;
-        }
-
-        main->setting.state.status = f_file_name_directory(sources[i]->array[j], &main->cache_2);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
-
-          return 0;
-        }
-
-        main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_2);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
-
-          return 0;
-        }
-
-        main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_static, &main->cache_argument);
-
-        if (F_status_is_error_not(main->setting.state.status)) {
-          main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_argument);
+          break;
         }
 
         main->setting.state.status = f_directory_exists(main->cache_argument);
@@ -262,7 +107,7 @@ extern "C" {
 
           main->setting.state.status = F_status_set_error(F_failure);
 
-          return 0;
+          break;
         }
 
         if (main->setting.state.status == F_file_found_not) {
@@ -276,16 +121,15 @@ extern "C" {
               fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
             }
 
-            return 0;
+            break;
           }
 
           fake_build_print_verbose_create_directory(&main->program.message, main->cache_argument);
         }
-
-        if (F_status_is_error(main->setting.state.status)) {
+        else if (F_status_is_error(main->setting.state.status)) {
           fake_print_error_file(&main->program.error, macro_fake_f(f_directory_exists), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
 
-          return 0;
+          break;
         }
 
         if (F_status_is_error_not(main->setting.state.status)) {
@@ -299,32 +143,39 @@ extern "C" {
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
 
-          return 0;
+          break;
         }
 
         {
           const f_string_static_t values[] = {
+            shared ? f_string_empty_s : fake_build_parameter_library_static_s,
             fake_build_parameter_object_compile_s,
             fake_build_parameter_object_output_s,
             main->cache_argument,
           };
 
-          for (uint8_t i = 0; i < 3; ++i) {
+          for (uint8_t i = 0; i < 4; ++i) {
 
             if (!values[i].used) continue;
 
             main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
             if (F_status_is_error(main->setting.state.status)) break;
           } // for
+
+          if (F_status_is_error(main->setting.state.status)) {
+            fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
+
+            break;
+          }
         }
 
         // The cache_argument should be safe at this point to be reset and reused by this function.
-        fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e);
+        fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e);
 
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add));
 
-          return 0;
+          break;
         }
 
         result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
@@ -332,7 +183,9 @@ extern "C" {
         if (F_status_is_error(main->setting.state.status)) {
           fake_print_error(&main->program.error, macro_fake_f(fake_execute));
 
-          return result;
+          result_final = result;
+
+          break;
         }
 
         if (result && !result_final) {
@@ -347,7 +200,7 @@ extern "C" {
 
     return result_final;
   }
-#endif // _di_fake_build_object_static_
+#endif // _di_fake_build_object_
 
 #ifdef __cplusplus
 } // extern "C"
index 2631481c00a80e68d94a3945493fe26494cfdc31..7d021186363b5f6714f925a6ca5446fac11ffb4c 100644 (file)
@@ -49,49 +49,10 @@ extern "C" {
 #endif // _di_fake_build_object_script_
 
 /**
- * Build the shared objects.
+ * Build the shared or static objects.
  *
  * Object files can be compiled differently between shared and static such that a shared object might be compiled with -fPIC and a static object might not be.
- * This represents an object being compiled with the intent to be used in a shared library or program.
- *
- * @param data
- *   The program data.
- *
- *   This modifies data.main.cache_argument.
- *   This modifies data.main.cache_arguments.
- *
- *   This alters data.main->setting.state.status:
- *     F_okay on success.
- *
- *     Errors (with error bit) from: fll_execute_arguments_add().
- *
- *     Errors (with error bit) from: fake_build_arguments_standard_add().
- *     Errors (with error bit) from: fake_build_sources_object_add().
- * @param data_build
- *   The build data.
- * @param mode
- *   The file mode.
- * @param file_stage
- *   The specific stage file path.
- *
- * @return
- *   The return code of the execution process.
- *   This generally is only needed when F_child is returned, where this holds the return status of the child process.
- *
- * @see fll_execute_arguments_add()
- *
- * @see fake_build_arguments_standard_add()
- * @see fake_build_sources_object_add()
- */
-#ifndef _di_fake_build_object_shared_
-  extern int fake_build_object_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage);
-#endif // _di_fake_build_object_shared_
-
-/**
- * Build the static objects.
- *
- * Object files can be compiled differently between shared and static such that a shared object might be compiled with -fPIC and a static object might not be.
- * This represents an object being compiled with the intent to be used in a static library or program.
+ * This represents an object being compiled with the intent to be used in a library or program.
  *
  * @param data
  *   The program data.
@@ -113,6 +74,9 @@ extern "C" {
  *   The file mode.
  * @param file_stage
  *   The specific stage file path.
+ * @param shared
+ *   If F_true, then build a shared object.
+ *   Otherwise, build a static object.
  *
  * @return
  *   The return code of the execution process.
@@ -124,9 +88,9 @@ extern "C" {
  * @see fake_build_sources_object_add()
  * @see fake_execute()
  */
-#ifndef _di_fake_build_object_static_
-  extern int fake_build_object_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage);
-#endif // _di_fake_build_object_static_
+#ifndef _di_fake_build_object_
+  extern int fake_build_object(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, const uint8_t shared);
+#endif // _di_fake_build_object_
 
 #ifdef __cplusplus
 } // extern "C"
diff --git a/level_3/fake/c/main/build/objects.c b/level_3/fake/c/main/build/objects.c
deleted file mode 100644 (file)
index b6a7a54..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-#include "../fake.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fake_build_objects_static_
-  int fake_build_objects_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
-
-    if (!data || !data->main) return 0;
-    if (data->main->setting.state.status == F_child) return data->main->program.child;
-    if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
-    if (!data_build->setting.build_sources_library.used) return 0;
-
-    fake_main_t * const main = data->main;
-
-    fake_build_print_compile_object_static_library(&main->program.message);
-
-    fake_string_dynamics_reset(&main->cache_arguments);
-
-    fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_static);
-
-    if (F_status_is_error(main->setting.state.status)) {
-      fake_print_error(&main->program.error, macro_fake_f(fake_build_objects_add));
-
-      return 0;
-    }
-
-    int result = main->program.child;
-
-    const f_string_dynamics_t *sources[2] = {
-      &data_build->setting.build_sources_library,
-      &data_build->setting.build_sources_library_static,
-    };
-
-    f_number_unsigned_t i = 0;
-    f_number_unsigned_t j = 0;
-    uint8_t k = 0;
-
-    for (i = 0; i < 2; ++i) {
-
-      for (j = 0; j < sources[i]->used; ++j) {
-
-        if (!sources[i]->array[j].used) continue;
-
-        fake_string_dynamic_reset(&main->cache_1);
-        fake_string_dynamic_reset(&main->cache_2);
-        fake_string_dynamic_reset(&main->cache_argument);
-
-        fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_library, &main->cache_1);
-        if (F_status_is_error(main->setting.state.status)) break;
-
-        main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &main->cache_1);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
-
-          return 0;
-        }
-
-        fake_build_get_file_name_without_extension(data, sources[i]->array[j], &main->cache_2);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
-
-          break;
-        }
-
-        main->setting.state.status = f_file_name_directory(sources[i]->array[j], &main->cache_argument);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
-
-          break;
-        }
-
-        if (main->cache_argument.used) {
-          main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &main->cache_argument);
-
-          if (F_status_is_error(main->setting.state.status)) {
-            fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_prepend));
-
-            break;
-          }
-
-          main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_argument);
-
-          if (F_status_is_error(main->setting.state.status)) {
-            fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
-
-            break;
-          }
-
-          main->setting.state.status = f_directory_exists(main->cache_argument);
-
-          if (main->setting.state.status == F_false) {
-            fake_build_print_error_exist_not_directory(&main->program.message, main->cache_argument);
-
-            main->setting.state.status = F_status_set_error(F_failure);
-
-            break;
-          }
-
-          if (main->setting.state.status == F_file_found_not) {
-            main->setting.state.status = f_directory_create(main->cache_argument, mode.directory);
-
-            if (F_status_is_error(main->setting.state.status)) {
-              if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
-                fake_build_print_error_cannot_create_due_to_parent(&main->program.message, main->cache_argument);
-              }
-              else {
-                fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
-              }
-
-              break;
-            }
-
-            fake_build_print_verbose_create_directory(&main->program.message, main->cache_argument);
-          }
-
-          if (F_status_is_error(main->setting.state.status)) {
-            fake_print_error_file(&main->program.error, macro_fake_f(f_directory_exists), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
-
-            break;
-          }
-        }
-
-        if (main->cache_argument.used) {
-          main->setting.state.status = F_okay;
-        }
-        else {
-          main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects, &main->cache_argument);
-        }
-
-        if (F_status_is_error_not(main->setting.state.status)) {
-          main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_argument);
-        }
-
-        if (F_status_is_error_not(main->setting.state.status)) {
-          main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
-        }
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
-
-          return 0;
-        }
-
-        const f_string_static_t values[] = {
-          main->cache_1,
-          fake_build_parameter_object_compile_s,
-          fake_build_parameter_object_static_s,
-          fake_build_parameter_object_output_s,
-          main->cache_argument,
-        };
-
-        for (k = 0; k < 5; ++k) {
-
-          if (!values[k].used) continue;
-
-          main->setting.state.status = fll_execute_arguments_add(values[k], &main->cache_arguments);
-          if (F_status_is_error(main->setting.state.status)) break;
-        } // for
-
-        // The cache_argument should be safe at this point to be reset and reused by this function.
-        fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_library_e);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
-
-          break;
-        }
-
-        result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
-
-        if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) break;
-      } // for
-
-      if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) break;
-    } // for
-
-    if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
-      fake_build_touch(data, file_stage);
-    }
-
-    return result;
-  }
-#endif // _di_fake_build_objects_static_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_3/fake/c/main/build/objects.h b/level_3/fake/c/main/build/objects.h
deleted file mode 100644 (file)
index af932eb..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * FLL - Level 3
- *
- * Project: Featureless Make
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides build objects functionality.
- *
- * This is auto-included and should not need to be explicitly included.
- */
-#ifndef _fake_build_objects_h
-#define _fake_build_objects_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Build static objects that are needed when building a static library.
- *
- * This is neither the "build_sources_object" nor the "build_sources_object_static" property.
- * Instead, this converts the "build_sources_library" and the "build_sources_library_static" into a static object file so that the indexer program (such as GNU ar) can combine these into a static file.
- *
- * @param data
- *   The program data.
- *
- *   This modifies data.main.cache_1.
- *   This modifies data.main.cache_2.
- *   This modifies data.main.cache_argument.
- *   This modifies data.main.cache_arguments.
- *
- *   This alters data.main->settings.state.status:
- *     F_okay on success.
- *
- *     Errors (with error bit) from: f_directory_create().
- *     Errors (with error bit) from: f_directory_exists().
- *     Errors (with error bit) from: f_file_name_directory().
- *     Errors (with error bit) from: f_string_dynamic_append_assure().
- *     Errors (with error bit) from: f_string_dynamic_prepend().
- *     Errors (with error bit) from: fll_execute_arguments_add().
- *
- *     Errors (with error bit) from: fake_build_arguments_standard_add().
- *     Errors (with error bit) from: fake_build_get_file_name_without_extension().
- *     Errors (with error bit) from: fake_build_objects_add().
- *     Errors (with error bit) from: fake_execute().
- * @param data_build
- *   The build data.
- * @param mode
- *   The file mode.
- * @param file_stage
- *   The specific stage file path.
- *
- * @return
- *   The return code of the execution process.
- *   This generally is only needed when F_child is returned, where this holds the return status of the child process.
- *
- * @see f_directory_create()
- * @see f_directory_exists()
- * @see f_file_name_directory()
- * @see f_string_dynamic_append_assure()
- * @see f_string_dynamic_prepend()
- * @see fll_execute_arguments_add()
- *
- * @see fake_build_arguments_standard_add()
- * @see fake_build_get_file_name_without_extension()
- * @see fake_build_objects_add()
- * @see fake_execute()
- */
-#ifndef _di_fake_build_objects_static_
-  extern int fake_build_objects_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage);
-#endif // _di_fake_build_objects_static_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _fake_build_objects_h
index d13549f80ef15aec047cc8f019087cca97a7869e..d09fc7706df32f559d0c05f8be311ccac9540bb2 100644 (file)
@@ -30,6 +30,19 @@ extern "C" {
   }
 #endif // _di_fake_build_print_compile_library_static_
 
+#ifndef _di_fake_build_print_compile_library_static_object_
+  f_status_t fake_build_print_compile_library_static_object(fl_print_t * const print) {
+
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fll_print_dynamic_raw(f_string_eol_s, print->to);
+    fake_print_context_important_simple(print, "Compiling static library object");
+
+    return F_okay;
+  }
+#endif // _di_fake_build_print_compile_library_static_object_
+
 #ifndef _di_fake_build_print_compile_object_shared_
   f_status_t fake_build_print_compile_object_shared(fl_print_t * const print) {
 
@@ -95,6 +108,19 @@ extern "C" {
   }
 #endif // _di_fake_build_print_compile_program_static_
 
+#ifndef _di_fake_build_print_compile_program_static_object_
+  f_status_t fake_build_print_compile_program_static_object(fl_print_t * const print) {
+
+    if (!print) return F_status_set_error(F_output_not);
+    if (print->verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fll_print_dynamic_raw(f_string_eol_s, print->to);
+    fake_print_context_important_simple(print, "Compiling static program object");
+
+    return F_okay;
+  }
+#endif // _di_fake_build_print_compile_program_static_object_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 5257ba2200c546d7b2802a7333aa4ae6e1139bc4..dbf3801bb6de5ea41ea67083df5071abd8477d01 100644 (file)
@@ -61,6 +61,28 @@ extern "C" {
 #endif // _di_fake_build_print_compile_library_static_
 
 /**
+ * Print message when compiling a static library objects.
+ *
+ * @param print
+ *   The output structure to print to.
+ *
+ *   This requires print.custom to be fake_main_t.
+ *
+ *   This does not alter print.custom.setting.state.status.
+ *
+ * @return
+ *   F_okay on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ *   F_output_not (with error bit) if setting is NULL.
+ *
+ * @see fake_print_context_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_library_static_object_
+  extern f_status_t fake_build_print_compile_library_static_object(fl_print_t * const print);
+#endif // _di_fake_build_print_compile_library_static_object_
+
+/**
  * Print message when compiling a shared object.
  *
  * @param print
@@ -170,6 +192,28 @@ extern "C" {
   extern f_status_t fake_build_print_compile_program_static(fl_print_t * const print);
 #endif // _di_fake_build_print_compile_program_static_
 
+/**
+ * Print message when compiling a static program objects.
+ *
+ * @param print
+ *   The output structure to print to.
+ *
+ *   This requires print.custom to be fake_main_t.
+ *
+ *   This does not alter print.custom.setting.state.status.
+ *
+ * @return
+ *   F_okay on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ *   F_output_not (with error bit) if setting is NULL.
+ *
+ * @see fake_print_context_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_program_static_object_
+  extern f_status_t fake_build_print_compile_program_static_object(fl_print_t * const print);
+#endif // _di_fake_build_print_compile_program_static_object_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index ed557b1ec5a157154edd56192c8e29289177d296..56530d8d0a1b25efec423bb6f88a5de28525aedf 100644 (file)
@@ -146,10 +146,10 @@ extern "C" {
     if (F_status_is_error_not(main->setting.state.status)) {
 
       // Only include the library if there are sources that would result in it being built.
-      if (data_build->setting.build_sources_library.used) {
+      if (data_build->setting.build_sources_library.used || data_build->setting.build_sources_library_static.used) {
         fake_string_dynamic_reset(&main->cache_argument);
 
-        main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_prefix_s, &main->cache_argument);
+        main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_libraries_static, &main->cache_argument);
 
         if (F_status_is_error_not(main->setting.state.status)) {
           main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_prefix_s, &main->cache_argument);
index fa092f377221918b534889604933b5aeb2cd1eac..2888a35b1b6ce96e00720a2df2eb9ae177203dc3 100644 (file)
@@ -134,6 +134,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static
   const f_string_static_t fake_build_stage_library_script_s = macro_f_string_static_t_initialize_1(FAKE_build_stage_library_script_s, 0, FAKE_build_stage_library_script_s_length);
   const f_string_static_t fake_build_stage_library_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_stage_library_shared_s, 0, FAKE_build_stage_library_shared_s_length);
   const f_string_static_t fake_build_stage_library_static_s = macro_f_string_static_t_initialize_1(FAKE_build_stage_library_static_s, 0, FAKE_build_stage_library_static_s_length);
+  const f_string_static_t fake_build_stage_library_static_object_s = macro_f_string_static_t_initialize_1(FAKE_build_stage_library_static_object_s, 0, FAKE_build_stage_library_static_object_s_length);
   const f_string_static_t fake_build_stage_object_script_s = macro_f_string_static_t_initialize_1(FAKE_build_stage_object_script_s, 0, FAKE_build_stage_object_script_s_length);
   const f_string_static_t fake_build_stage_object_shared_s = macro_f_string_static_t_initialize_1(FAKE_build_stage_object_shared_s, 0, FAKE_build_stage_object_shared_s_length);
   const f_string_static_t fake_build_stage_object_static_s = macro_f_string_static_t_initialize_1(FAKE_build_stage_object_static_s, 0, FAKE_build_stage_object_static_s_length);
index b6f2d93f2dcffbb7b9e08ee7cc168933abd09676..4dfed26ffec9836e1573cdb8ea51abc8a6dbc090 100644 (file)
@@ -392,6 +392,7 @@ extern "C" {
   #define FAKE_build_stage_library_script_s        "library_script"
   #define FAKE_build_stage_library_shared_s        "library_shared"
   #define FAKE_build_stage_library_static_s        "library_static"
+  #define FAKE_build_stage_library_static_object_s "library_static_object"
   #define FAKE_build_stage_object_script_s         "object_script"
   #define FAKE_build_stage_object_shared_s         "object_shared"
   #define FAKE_build_stage_object_static_s         "object_static"
@@ -401,6 +402,7 @@ extern "C" {
   #define FAKE_build_stage_program_script_s        "program_script"
   #define FAKE_build_stage_program_shared_s        "program_shared"
   #define FAKE_build_stage_program_static_s        "program_static"
+  #define FAKE_build_stage_program_static_object_s "program_static_object"
   #define FAKE_build_stage_separate_s              "-"
   #define FAKE_build_stage_skeleton_s              "skeleton"
   #define FAKE_build_stage_sources_documentation_s "sources_documentation"
@@ -412,6 +414,7 @@ extern "C" {
   #define FAKE_build_stage_library_script_s_length        14
   #define FAKE_build_stage_library_shared_s_length        14
   #define FAKE_build_stage_library_static_s_length        14
+  #define FAKE_build_stage_library_static_object_s_length 21
   #define FAKE_build_stage_object_script_s_length         13
   #define FAKE_build_stage_object_shared_s_length         13
   #define FAKE_build_stage_object_static_s_length         13
@@ -421,6 +424,7 @@ extern "C" {
   #define FAKE_build_stage_program_script_s_length        14
   #define FAKE_build_stage_program_shared_s_length        14
   #define FAKE_build_stage_program_static_s_length        14
+  #define FAKE_build_stage_program_static_object_s_length 21
   #define FAKE_build_stage_separate_s_length              1
   #define FAKE_build_stage_skeleton_s_length              8
   #define FAKE_build_stage_sources_documentation_s_length 21
@@ -432,6 +436,7 @@ extern "C" {
   extern const f_string_static_t fake_build_stage_library_script_s;
   extern const f_string_static_t fake_build_stage_library_shared_s;
   extern const f_string_static_t fake_build_stage_library_static_s;
+  extern const f_string_static_t fake_build_stage_library_static_object_s;
   extern const f_string_static_t fake_build_stage_object_script_s;
   extern const f_string_static_t fake_build_stage_object_shared_s;
   extern const f_string_static_t fake_build_stage_object_static_s;
index b8c9fb4b304b2897d1bcb4816d0f8c05539a80f1..fbeeb263a1fb8cd56d122d70e488add4ca3a52af 100644 (file)
@@ -114,6 +114,7 @@ extern "C" {
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_library_script.string, &build_stage->file_library_script.used, &build_stage->file_library_script.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_library_shared.string, &build_stage->file_library_shared.used, &build_stage->file_library_shared.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_library_static.string, &build_stage->file_library_static.used, &build_stage->file_library_static.size);
+    f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_library_static_object.string, &build_stage->file_library_static_object.used, &build_stage->file_library_static_object.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_object_script.string, &build_stage->file_object_script.used, &build_stage->file_object_script.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_object_shared.string, &build_stage->file_object_shared.used, &build_stage->file_object_shared.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_object_static.string, &build_stage->file_object_static.used, &build_stage->file_object_static.size);
index 71fdaaf41883341a319aa60f4139a56921dcf4b0..91cf445c854ffc38b704856fd10a8e7c1bc2a4dd 100644 (file)
@@ -671,6 +671,7 @@ extern "C" {
  *   - file_library_script:        The script library files.
  *   - file_library_shared:        The shared library files.
  *   - file_library_static:        The static library files.
+ *   - file_library_static_object: The static library object files.
  *   - file_object_script:         The script object files.
  *   - file_object_shared:         The shared object files.
  *   - file_object_static:         The static object files.
@@ -691,6 +692,7 @@ extern "C" {
     f_string_dynamic_t file_library_script;
     f_string_dynamic_t file_library_shared;
     f_string_dynamic_t file_library_static;
+    f_string_dynamic_t file_library_static_object;
     f_string_dynamic_t file_object_script;
     f_string_dynamic_t file_object_shared;
     f_string_dynamic_t file_object_static;
@@ -725,9 +727,10 @@ extern "C" {
     f_string_dynamic_t_initialize, \
     f_string_dynamic_t_initialize, \
     f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
   }
 
-  #define fake_build_stage_total_d 17
+  #define fake_build_stage_total_d 18
 #endif // _di_fake_build_stage_t_
 
 /**
index a031151242670655b5e310502925ad3a5792fd34..c59dbe027cf8b3e2e55750c6b98adf01b6fc92bd 100644 (file)
 #include <program/fake/main/build/library.h>
 #include <program/fake/main/build/load.h>
 #include <program/fake/main/build/object.h>
-#include <program/fake/main/build/objects.h>
 #include <program/fake/main/build/print/compile.h>
 #include <program/fake/main/build/print/error.h>
 #include <program/fake/main/build/print/message.h>
index 141f8c9c2f8cd83f0f1c4bc5bf9909d4864d74d4..152ee04c5fdf870cb862d70bd1958305de047aac 100644 (file)
@@ -43,7 +43,7 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
 build_sources_library main/build.c main/clean.c main/common.c main/fake.c main/make.c main/print/common.c main/print/context.c main/print/error.c main/print/message.c main/print/operation.c main/print/warning.c main/print/verbose.c main/signal.c main/skeleton.c main/thread.c
-build_sources_library main/build/enumeration.c main/build/library.c main/build/load.c main/build/object.c main/build/objects.c main/build/print/compile.c main/build/print/error.c main/build/print/message.c main/build/print/verbose.c main/build/print/warning.c main/build/program.c main/build/skeleton.c main/build/string.c
+build_sources_library main/build/enumeration.c main/build/library.c main/build/load.c main/build/object.c main/build/print/compile.c main/build/print/error.c main/build/print/message.c main/build/print/verbose.c main/build/print/warning.c main/build/program.c main/build/skeleton.c main/build/string.c
 build_sources_library main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c
 build_sources_library main/fake/path_generate.c main/fake/do.c
 build_sources_library main/make/load_fakefile.c main/make/load_parameters.c main/make/operate_block.c main/make/operate.c main/make/operate_process.c main/make/operate_process_type.c main/make/operate_validate.c main/make/operate_validate_type.c main/make/print/error.c main/make/print/message.c main/make/print/verbose.c main/make/print/warning.c
@@ -51,7 +51,7 @@ build_sources_library main/make/load_fakefile.c main/make/load_parameters.c main
 build_sources_program main/main.c
 
 build_sources_headers main/build.h main/clean.h main/common.h main/fake.h main/make.h main/print/common.h main/print/context.h main/print/error.h main/print/message.h main/print/operation.h main/print/warning.h main/print/verbose.h main/signal.h main/skeleton.h main/thread.h
-build_sources_headers main/build/enumeration.h main/build/library.h main/build/load.h main/build/object.h main/build/objects.h main/build/print/compile.h main/build/print/error.h main/build/print/message.h main/build/print/verbose.h main/build/print/warning.h main/build/program.h main/build/skeleton.h main/build/string.h
+build_sources_headers main/build/enumeration.h main/build/library.h main/build/load.h main/build/object.h main/build/print/compile.h main/build/print/error.h main/build/print/message.h main/build/print/verbose.h main/build/print/warning.h main/build/program.h main/build/skeleton.h main/build/string.h
 build_sources_headers main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h
 build_sources_headers main/fake/path_generate.h main/fake/do.h
 build_sources_headers main/make/load_fakefile.h main/make/load_parameters.h main/make/operate_block.h main/make/operate.h main/make/operate_process.h main/make/operate_process_type.h main/make/operate_validate.h main/make/operate_validate_type.h main/make/print/error.h main/make/print/message.h main/make/print/verbose.h main/make/print/warning.h
index 3190cfe518959fa869a14f7ef61df75b4fdd5453..1c2c407b3411fd802f36c6b5859389e55cdc0771 100644 (file)
@@ -138,4 +138,4 @@ Build a skeleton directory structure.
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, GNU LGPL Version 2.1 or later.
+Copyright \(co 2007-2024 Kevin Day, GNU LGPL Version 2.1 or later.
index 32f673d8a22e6908442cdc01b1abe4cd1f7c02ed..182adb8967eacacf1e62c10445f9cac1c9a5c150 100644 (file)
@@ -1,4 +1,4 @@
-.TH fake-defines "5" "March 2023" "FLL - Featureless Make 0.7.0" "File Formats"
+.TH fake-defines "5" "March 2024" "FLL - Featureless Make 0.7.0" "File Formats"
 .SH NAME
 Featureless Make \- "defines" file.
 .SH SYNOPSIS
@@ -24,4 +24,4 @@ Each Content represents documentation explaining the intent and purpose of that
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, Open Standard License 1.0 or later.
+Copyright \(co 2007-2024 Kevin Day, Open Standard License 1.0 or later.
index e4894d45a1b489c20a3799cf9b42f09c1c78d683..d3b0df302609faffe43705b47524f8a50ae15d1d 100644 (file)
@@ -1,4 +1,4 @@
-.TH fake-dependencies "5" "March 2023" "FLL - Featureless Make 0.7.0" "File Formats"
+.TH fake-dependencies "5" "March 2024" "FLL - Featureless Make 0.7.0" "File Formats"
 .SH NAME
 Featureless Make \- "dependencies" file.
 .SH SYNOPSIS
@@ -25,4 +25,4 @@ Future versions of this will clarify what and how Content, such as version numbe
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, Open Standard License 1.0 or later.
+Copyright \(co 2007-2024 Kevin Day, Open Standard License 1.0 or later.
index 0bba7384b5c9385739e917137e1b84a7dea62e12..8c65fadb13e6cd09600d450c2cf159824c1789ac 100644 (file)
@@ -1,4 +1,4 @@
-.TH fake-fakefile "5" "March 2023" "FLL - Featureless Make 0.7.0" "File Formats"
+.TH fake-fakefile "5" "March 2024" "FLL - Featureless Make 0.7.0" "File Formats"
 .SH NAME
 Featureless Make \- "fakefile" file.
 .SH SYNOPSIS
@@ -756,4 +756,4 @@ The \fBif\fR Section Operation condition \fBparameter\fR:
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, Open Standard License 1.0 or later.
+Copyright \(co 2007-2024 Kevin Day, Open Standard License 1.0 or later.
index c1697bfaa40f49b0d971fb4ef5471a746149f3fa..aca3643650473dd0861f4ea7f6454f1a2f4c99e2 100644 (file)
@@ -1,4 +1,4 @@
-.TH fake-settings "5" "March 202" "FLL - Featureless Make 0.7.0" "File Formats"
+.TH fake-settings "5" "March 2024" "FLL - Featureless Make 0.7.0" "File Formats"
 .SH NAME
 Featureless Make \- "settings" file.
 .SH SYNOPSIS
@@ -151,6 +151,13 @@ For specific details on the allowed formatting, see the settings.txt under the s
   The built object does not get linked and therefore no linker arguments apply.
   The built object file is named using the \fBbuild_name\fR with the \fB.o\fR extension added.
   May include a relative sub\-path to each individual source file (such as: \fBlevel_0/a.c\fR).
+    A collection of source files used for generating an object file with the same name as each source file.
+    The source files are located within the path designated by code:"path_sources_object".
+    The built objects do not get linked and therefore no linker arguments apply.
+    The built object files are named using the same name as the file with the file extension changed to the code:".o" extension.
+    May include a relative sub-path to each individual source file (such as: code:"level_0/a.c level_0/b.c").
+    This is different from code:"build_sources_object" in that multiple files are supported and multiple object files are created.
+
 
 \- \fBbuild_sources_object_shared\fR:
   A single source file used for generating an object file.
@@ -160,6 +167,14 @@ For specific details on the allowed formatting, see the settings.txt under the s
   May include a relative sub\-path to each individual source file (such as: \fBlevel_0/a.c\fR).
   These are applied to only shared builds.
 
+    A collection of source files used for generating an object file with the same name as each source file.
+    The source files are located within the path designated by code:"path_sources_object".
+    The built objects do not get linked and therefore no linker arguments apply.
+    The built object files are named using the same name as the file with the file extension changed to the code:".o" extension.
+    May include a relative sub-path to each individual source file (such as: code:"level_0/a.c level_0/b.c").
+    This is different from code:"build_sources_object" in that multiple files are supported and multiple object files are created.
+    These are applied to only shared builds.
+
 \- \fBbuild_sources_object_static\fR:
   A single source file used for generating an object file.
   The source file is located within the path designated by \fBpath_sources_object\fR.
@@ -168,6 +183,14 @@ For specific details on the allowed formatting, see the settings.txt under the s
   May include a relative sub\-path to each individual source file (such as: \fBlevel_0/a.c\fR).
   These are applied to only static builds.
 
+    A collection of source files used for generating an object file with the same name as each source file.
+    The source files are located within the path designated by code:"path_sources_object".
+    The built objects do not get linked and therefore no linker arguments apply.
+    The built object files are named using the same name as the file with the file extension changed to the code:".o" extension.
+    May include a relative sub-path to each individual source file (such as: code:"level_0/a.c level_0/b.c").
+    This is different from code:"build_sources_object" in that multiple files are supported and multiple object files are created.
+    These are applied to only static builds.
+
 \- \fBbuild_sources_objects\fR\:
   A collection of source files used for generating an object file with the same name as each source file.
   The source files are located within the path designated by \fBpath_sources_objects\fR.
@@ -460,8 +483,14 @@ For specific details on the allowed formatting, see the settings.txt under the s
 
   This defaults to \fBsources\fR.
 
+\- \fBpath_sources_library\fR:
+  A sub\-path representing where the library source files are found.
+  This is used by \fBbuild_sources_library\fR.
+
+  This defaults to \fBsources\fR.
+
 \- \fBpath_sources_object\fR:
-  A sub\-path representing where the object source files are found.
+  A sub\-path representing where the header source object files are found.
   This is used by \fBbuild_sources_object\fR.
 
   This defaults to \fBsources\fR.
@@ -721,4 +750,4 @@ All Object names support having a \fB\-\fR and a \fBmode\fR name, such as \fBbui
 Written by Kevin Day.
 .SH COPYRIGHT
 .PP
-Copyright \(co 2007-2023 Kevin Day, Open Standard License 1.0 or later.
+Copyright \(co 2007-2024 Kevin Day, Open Standard License 1.0 or later.
index e6da3ba50d3c28da86167528ccf2eddf39104633..c1c8a572e98c456a920f9f589600ccd375195bb4 100644 (file)
@@ -21,7 +21,7 @@ main:
   print
   print "Simulating Failure Return:"
 
-  # Trigger an error, if "exit" doesn't exist then this is an error but if it does then exit with value 1 to represent an error.
+  # Trigger an error, if "exit" doesn't exist then this is an error but if it does exist, then exit with value 1 to represent an error.
   shell exit 1
 
   print "Return code is 'parameter:"return"'."
index efc35a34ab7a82ef1219af9cc514ffe824ab1d0a..b85fb6b7f03fd59eb00c5f50833c0b80a2d1a7d8 100644 (file)
@@ -1,6 +1,7 @@
 # fss-0002 iki-0000
 #
 # license: open-standard-license-1.0
+# version 2024/03/23
 #
 # This file (assumed to be named defines.txt) can be more easily read using the following iki_read commands:
 #   iki_read defines.txt +Q -w -WW code '"' '"' bold '"' '"'
index ad4266fbb8b2af4f12fbb33791c691776d5ae2cf..0983e5c7f234ee1b4f8ba3f6c2248bf90fe46c78 100644 (file)
@@ -1,6 +1,7 @@
 # fss-0002 iki-0000
 #
 # license: open-standard-license-1.0
+# version 2024/03/23
 #
 # This file (assumed to be named dependencies.txt) can be more easily read using the following iki_read commands:
 #   iki_read dependencies.txt +Q -w -r FLL FLL -WW code '"' '"' bold '"' '"'
index ccfb860f37614599adaf924592cd98c044c05168..dcd3bb41045aaa9fe10556d999a63fd1f1419c34 100644 (file)
@@ -1,6 +1,7 @@
 # fss-0002 iki-0000
 #
 # license: open-standard-license-1.0
+# version 2024/03/23
 #
 # This file (assumed to be named fakefile.txt) can be more easily read using the following iki_read commands:
 #   iki_read fakefile.txt +Q -w -WW character "'" "'" code '"' '"'
index bd9cd20ac20259b63320e2849f3a41c7450b5cef..4121a80abf7df659f37741c99da918a32ebb9a1e 100644 (file)
@@ -1,6 +1,7 @@
 # fss-0002 iki-0000
 #
 # license: open-standard-license-1.0
+# version 2024/03/23
 #
 # This file (assumed to be named settings.txt) can be more easily read using the following iki_read commands:
 #   iki_read settings.txt +Q -w -WW character "'" "'" code '"' '"'