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).
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
"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
}
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}"
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"
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}]}
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}"
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
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
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
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
fi
fi
- if [[ ${failure} -eq 0 && ${sources_program} != "" ]] ; then
+ if [[ ${failure} -eq 0 && (${sources_program} != "" || ${sources_program_shared} != "") ]] ; then
sources=
links=
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
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
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;
fi
fi
- if [[ ${failure} -eq 0 && ${sources_program} != "" ]] ; then
+ if [[ ${failure} -eq 0 && (${sources_program} != "" || ${sources_program_static} != "") ]] ; then
sources=
links=
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
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
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
build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/private-program.c
build_sources_program program/fake/fake.c program/fake/common.c
-build_sources_program program/fake/private-build.c program/fake/private-build-library.c program/fake/private-build-load.c program/fake/private-build-object.c program/fake/private-build-objects.c program/fake/private-build-program.c program/fake/private-build-skeleton.c
+build_sources_program program/fake/private-build.c program/fake/private-build-library.c program/fake/private-build-load.c program/fake/private-build-object.c program/fake/private-build-program.c program/fake/private-build-skeleton.c
build_sources_program program/fake/private-clean.c program/fake/private-common.c program/fake/private-make.c program/fake/private-print.c program/fake/private-skeleton.c
build_sources_program program/fake/private-make-load_fakefile.c program/fake/private-make-load_parameters.c
build_sources_program program/fake/private-make-operate.c program/fake/private-make-operate_block.c program/fake/private-make-operate_process.c program/fake/private-make-operate_process_type.c program/fake/private-make-operate_validate.c program/fake/private-make-operate_validate_type.c
return 0;
}
- *status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared, &arguments);
+ *status = fake_build_sources_add(data, data_build, &data_build->setting.path_sources_library, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared, &arguments);
if (F_status_is_error(*status)) {
fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true);
}
if (F_status_is_error_not(*status)) {
+ *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, &arguments);
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true);
+ }
+ }
+
+ if (F_status_is_error_not(*status)) {
f_string_static_t source = f_string_static_t_initialize;
f_array_length_t j = 0;
for (j = 0; j < sources[i]->used; ++j) {
source_path.used = 0;
+ file_name.used = 0;
*status = fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
}
if (source_path.used) {
- *status = f_string_dynamic_prepend(data->path_build_objects, &source_path);
+ *status = f_string_dynamic_prepend(data->path_build_objects_static, &source_path);
if (F_status_is_error(*status)) {
fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_prepend", F_true);
source.used = source_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
}
else {
- source.used = data->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
+ source.used = data->path_build_objects_static.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
}
f_char_t source_string[source.used + 1];
memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
}
else {
- memcpy(source_string, data->path_build_objects.string, sizeof(f_char_t) * data->path_build_objects.used);
- memcpy(source_string + data->path_build_objects.used, file_name.string, sizeof(f_char_t) * file_name.used);
- memcpy(source_string + data->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ memcpy(source_string, data->path_build_objects_static.string, sizeof(f_char_t) * data->path_build_objects_static.used);
+ memcpy(source_string + data->path_build_objects_static.used, file_name.string, sizeof(f_char_t) * file_name.used);
+ memcpy(source_string + data->path_build_objects_static.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
}
*status = fll_execute_arguments_add(source, &arguments);
}
#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, f_status_t * const status) {
+
+ if (*status == F_child) return data->main->child;
+ if (F_status_is_error(*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;
+
+ if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) {
+ fll_print_format("%r%[Compiling static library objects.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
+ }
+
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
+ f_string_dynamic_t destination_path = f_string_dynamic_t_initialize;
+ f_string_static_t destination = f_string_static_t_initialize;
+ f_string_static_t source = f_string_static_t_initialize;
+
+ int result = data->main->child;
+
+ const f_string_dynamics_t *sources[2] = {
+ &data_build->setting.build_sources_library,
+ &data_build->setting.build_sources_library_static,
+ };
+
+ f_array_length_t i = 0;
+ f_array_length_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;
+
+ file_name.used = 0;
+ destination_path.used = 0;
+ arguments.used = 0 ;
+
+ fake_build_path_source_length(data, data_build, &data_build->setting.path_sources_library, &source);
+
+ f_char_t source_string[source.used + sources[i]->array[j].used + 1];
+ source.string = source_string;
+
+ fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_library, &source);
+
+ memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
+ source.used += sources[i]->array[j].used;
+ source.string[source.used] = 0;
+
+ *status = fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true);
+
+ break;
+ }
+
+ *status = f_file_name_directory(sources[i]->array[j], &destination_path);
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true);
+
+ break;
+ }
+
+ if (destination_path.used) {
+ *status = f_string_dynamic_prepend(data->path_build_objects_static, &destination_path);
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_prepend", F_true);
+
+ break;
+ }
+
+ *status = f_string_dynamic_append_assure(f_path_separator_s, &destination_path);
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true);
+
+ break;
+ }
+
+ *status = f_directory_exists(destination_path);
+
+ if (*status == F_false) {
+ if (data->main->error.verbosity != f_console_verbosity_quiet_e) {
+ flockfile(data->main->error.to.stream);
+
+ fl_print_format("%r%[%QThe path '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, destination_path, data->main->error.notable);
+ fl_print_format("%[' exists but is not a directory.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s);
+
+ funlockfile(data->main->error.to.stream);
+ }
+
+ *status = F_status_set_error(F_failure);
+
+ break;
+ }
+
+ if (*status == F_file_found_not) {
+ *status = f_directory_create(destination_path, mode.directory);
+
+ if (F_status_is_error(*status)) {
+ if (F_status_set_fine(*status) == F_file_found_not) {
+ flockfile(data->main->error.to.stream);
+
+ fl_print_format("%r%[%QThe path '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, destination_path, data->main->error.notable);
+ fl_print_format("%[' could not be created, a parent directory does not exist.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s);
+
+ funlockfile(data->main->error.to.stream);
+ }
+ else {
+ fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ }
+
+ break;
+ }
+
+ if (data->main->error.verbosity >= f_console_verbosity_verbose_e) {
+ fll_print_format("Directory '%Q' created.%r", data->main->output.to.stream, destination_path, f_string_eol_s);
+ }
+ }
+
+ if (F_status_is_error(*status)) {
+ fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
+
+ break;
+ }
+
+ destination.used = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
+ }
+ else {
+ destination.used = data->path_build_objects_static.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
+ }
+
+ f_char_t destination_string[destination.used + 1];
+ destination.string = destination_string;
+ destination_string[destination.used] = 0;
+
+ if (destination_path.used) {
+ memcpy(destination_string, destination_path.string, sizeof(f_char_t) * destination_path.used);
+ memcpy(destination_string + destination_path.used, file_name.string, sizeof(f_char_t) * file_name.used);
+ memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ }
+ else {
+ memcpy(destination_string, data->path_build_objects_static.string, sizeof(f_char_t) * data->path_build_objects_static.used);
+ memcpy(destination_string + data->path_build_objects_static.used, file_name.string, sizeof(f_char_t) * file_name.used);
+ memcpy(destination_string + data->path_build_objects_static.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ }
+
+ const f_string_static_t values[] = {
+ source,
+ fake_build_parameter_object_compile_s,
+ fake_build_parameter_object_static_s,
+ fake_build_parameter_object_output_s,
+ destination,
+ };
+
+ for (k = 0; k < 5; ++k) {
+
+ if (!values[k].used) continue;
+
+ *status = fll_execute_arguments_add(values[k], &arguments);
+ if (F_status_is_error(*status)) break;
+ } // for
+
+ fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e, &arguments, status);
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
+
+ break;
+ }
+
+ result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+
+ macro_f_string_dynamics_t_delete_simple(arguments);
+
+ if (F_status_is_error(*status) || *status == F_child) break;
+ } // for
+
+ if (F_status_is_error(*status) || *status == F_child) break;
+ } // for
+
+ f_string_dynamic_resize(0, &file_name);
+ f_string_dynamic_resize(0, &destination_path);
+ f_string_dynamics_resize(0, &arguments);
+
+ if (F_status_is_error_not(*status) && *status != F_child) {
+ fake_build_touch(data, file_stage, status);
+ }
+
+ return result;
+ }
+#endif // _di_fake_build_library_static_object_
+
#ifdef __cplusplus
} // extern "C"
#endif
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, f_status_t * const status) F_attribute_visibility_internal_d;
#endif // _di_fake_build_library_static_
+/**
+ * Build the static libraries object.
+ *
+ * @param data
+ * The program data.
+ * @param data_build
+ * The build data.
+ * @param mode
+ * The file mode.
+ * @param file_stage
+ * The specific stage file path.
+ * @param status
+ * F_none on success.
+ *
+ * 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.
+ */
+#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, f_status_t * const status) F_attribute_visibility_internal_d;
+#endif // _di_fake_build_library_static_object_
+
#ifdef __cplusplus
} // extern "C"
#endif
f_string_dynamics_t build_name = f_string_dynamics_t_initialize;
f_string_dynamics_t build_script = f_string_dynamics_t_initialize;
f_string_dynamics_t build_shared = f_string_dynamics_t_initialize;
- f_string_dynamics_t build_sources_object = f_string_dynamics_t_initialize;
- f_string_dynamics_t build_sources_object_shared = f_string_dynamics_t_initialize;
- f_string_dynamics_t build_sources_object_static = f_string_dynamics_t_initialize;
f_string_dynamics_t build_static = f_string_dynamics_t_initialize;
f_string_dynamics_t has_path_standard = f_string_dynamics_t_initialize;
f_string_dynamics_t path_headers = f_string_dynamics_t_initialize;
f_string_dynamics_t path_program_shared = f_string_dynamics_t_initialize;
f_string_dynamics_t path_program_static = f_string_dynamics_t_initialize;
f_string_dynamics_t path_sources = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_sources_headers = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_sources_library = f_string_dynamics_t_initialize;
f_string_dynamics_t path_sources_object = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_sources_program = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_sources_script = f_string_dynamics_t_initialize;
f_string_dynamics_t preserve_path_headers = f_string_dynamics_t_initialize;
f_string_dynamics_t process_post = f_string_dynamics_t_initialize;
f_string_dynamics_t process_pre = f_string_dynamics_t_initialize;
fake_build_setting_name_path_program_shared_s,
fake_build_setting_name_path_program_static_s,
fake_build_setting_name_path_sources_s,
+ fake_build_setting_name_path_sources_headers_s,
+ fake_build_setting_name_path_sources_library_s,
fake_build_setting_name_path_sources_object_s,
+ fake_build_setting_name_path_sources_program_s,
+ fake_build_setting_name_path_sources_script_s,
fake_build_setting_name_preserve_path_headers_s,
fake_build_setting_name_process_post_s,
fake_build_setting_name_process_pre_s,
&setting->build_sources_library,
&setting->build_sources_library_shared,
&setting->build_sources_library_static,
- &build_sources_object,
- &build_sources_object_shared,
- &build_sources_object_static,
+ &setting->build_sources_object,
+ &setting->build_sources_object_shared,
+ &setting->build_sources_object_static,
&setting->build_sources_program,
&setting->build_sources_program_shared,
&setting->build_sources_program_static,
&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,
F_false, // setting->build_libraries_static
F_false, // build_name
F_false, // setting->build_objects_library
- F_false, // setting->build_objects_library_shar
- F_false, // setting->build_objects_library_stat
+ F_false, // setting->build_objects_library_shared
+ F_false, // setting->build_objects_library_static
F_false, // setting->build_objects_program
- F_false, // setting->build_objects_program_shar
- F_false, // setting->build_objects_program_stat
+ F_false, // setting->build_objects_program_shared
+ F_false, // setting->build_objects_program_static
F_false, // build_script
F_false, // build_shared
F_false, // setting->build_sources_documentation
F_false, // setting->build_sources_headers
- F_false, // setting->build_sources_headers_shar
- F_false, // setting->build_sources_headers_stat
+ F_false, // setting->build_sources_headers_shared
+ F_false, // setting->build_sources_headers_static
F_false, // setting->build_sources_library
- F_false, // setting->build_sources_library_shar
- F_false, // setting->build_sources_library_stat
- F_false, // build_sources_object
- F_false, // build_sources_object_shared
- F_false, // build_sources_object_static
+ F_false, // setting->build_sources_library_shared
+ F_false, // setting->build_sources_library_static
+ F_false, // setting->build_sources_object
+ F_false, // setting->build_sources_object_shared
+ F_false, // setting->build_sources_object_static
F_false, // setting->build_sources_program
- F_false, // setting->build_sources_program_shar
- F_false, // setting->build_sources_program_stat
+ F_false, // setting->build_sources_program_shared
+ F_false, // setting->build_sources_program_static
F_false, // setting->build_sources_script
F_false, // setting->build_sources_setting
F_false, // build_static
F_false, // path_program_shared
F_false, // path_program_static
F_false, // path_sources
+ F_false, // path_sources_headers
+ F_false, // path_sources_library
F_false, // path_sources_object
+ F_false, // path_sources_program
+ F_false, // path_sources_script
F_false, // preserve_path_headers
F_false, // process_post
F_false, // process_pre
fake_build_setting_name_build_name_s,
fake_build_setting_name_build_script_s,
fake_build_setting_name_build_shared_s,
- fake_build_setting_name_build_sources_object_s,
- fake_build_setting_name_build_sources_object_shared_s,
- fake_build_setting_name_build_sources_object_static_s,
fake_build_setting_name_build_static_s,
fake_build_setting_name_has_path_standard_s,
fake_build_setting_name_path_headers_s,
fake_build_setting_name_path_program_shared_s,
fake_build_setting_name_path_program_static_s,
fake_build_setting_name_path_sources_s,
+ fake_build_setting_name_path_sources_headers_s,
+ fake_build_setting_name_path_sources_library_s,
fake_build_setting_name_path_sources_object_s,
+ fake_build_setting_name_path_sources_program_s,
+ fake_build_setting_name_path_sources_script_s,
fake_build_setting_name_preserve_path_headers_s,
fake_build_setting_name_process_post_s,
fake_build_setting_name_process_pre_s,
&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_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,
0, // build_name
&setting->build_script, // build_script
&setting->build_shared, // build_shared
- 0, // build_sources_object
- 0, // build_sources_object_shared
- 0, // build_sources_object_static
&setting->build_static, // build_static
&setting->has_path_standard, // has_path_standard
0, // path_headers
0, // path_program_shared
0, // path_program_static
0, // path_sources
+ 0, // path_sources_headers
+ 0, // path_sources_library
0, // path_sources_object
+ 0, // path_sources_program
+ 0, // path_sources_script
&setting->preserve_path_headers, // preserve_path_headers
0, // process_post
0, // process_pre
&setting->build_name, // build_name
0, // build_script
0, // build_shared
- &setting->build_sources_object, // build_sources_object
- &setting->build_sources_object_shared, // build_sources_object_shared
- &setting->build_sources_object_static, // build_sources_object_static
0, // build_static
0, // has_path_standard
&setting->path_headers, // path_headers
&setting->path_program_shared, // path_program_shared
&setting->path_program_static, // path_program_static
&setting->path_sources, // path_sources
+ &setting->path_sources_headers, // path_sources_headers
+ &setting->path_sources_library, // path_sources_library
&setting->path_sources_object, // path_sources_object
+ &setting->path_sources_program, // path_sources_program
+ &setting->path_sources_script, // path_sources_script
0, // preserve_path_headers
&setting->process_post, // process_post
&setting->process_pre, // process_pre
settings_matches[7], // build_name
settings_matches[14], // build_script
settings_matches[15], // build_shared
- settings_matches[23], // build_sources_object
- settings_matches[24], // build_sources_object_shared
- settings_matches[25], // build_sources_object_static
settings_matches[31], // build_static
settings_matches[57], // has_path_standard
settings_matches[60], // path_headers
settings_matches[69], // path_program_shared
settings_matches[70], // path_program_static
settings_matches[71], // path_sources
- settings_matches[72], // path_sources_object
- settings_matches[73], // preserve_path_headers
- settings_matches[74], // process_post
- settings_matches[75], // process_pre
- settings_matches[76], // search_exclusive
- settings_matches[77], // search_shared
- settings_matches[78], // search_static
- settings_matches[79], // version_file
- settings_matches[80], // version_major
- settings_matches[81], // version_major_prefix
- settings_matches[82], // version_micro
- settings_matches[83], // version_micro_prefix
- settings_matches[84], // version_minor
- settings_matches[85], // version_minor_prefix
- settings_matches[86], // version_nano
- settings_matches[87], // version_nano_prefix
- settings_matches[88], // version_target
+ settings_matches[72], // path_sources_headers
+ settings_matches[73], // path_sources_library
+ settings_matches[74], // path_sources_object
+ settings_matches[75], // path_sources_program
+ settings_matches[76], // path_sources_script
+ settings_matches[77], // preserve_path_headers
+ settings_matches[78], // process_post
+ settings_matches[79], // process_pre
+ settings_matches[80], // search_exclusive
+ settings_matches[81], // search_shared
+ settings_matches[82], // search_static
+ settings_matches[83], // version_file
+ settings_matches[84], // version_major
+ settings_matches[85], // version_major_prefix
+ settings_matches[86], // version_micro
+ settings_matches[87], // version_micro_prefix
+ settings_matches[88], // version_minor
+ settings_matches[80], // version_minor_prefix
+ settings_matches[90], // version_nano
+ settings_matches[91], // version_nano_prefix
+ settings_matches[92], // version_target
};
const f_string_static_t settings_single_string_default[] = {
f_string_empty_s, // build_name
f_string_empty_s, // build_script
f_string_empty_s, // build_shared
- f_string_empty_s, // build_sources_object
- f_string_empty_s, // build_sources_object_shared
- f_string_empty_s, // build_sources_object_static
f_string_empty_s, // build_static
fake_build_setting_default_yes_s, // has_path_standard
f_string_empty_s, // path_headers
fake_path_part_shared_s, // path_program_shared
fake_path_part_static_s, // path_program_static
data->path_sources, // path_sources
+ f_string_empty_s, // path_sources_headers
+ f_string_empty_s, // path_sources_library
f_string_empty_s, // path_sources_object
+ f_string_empty_s, // path_sources_program
+ f_string_empty_s, // path_sources_script
f_string_empty_s, // preserve_path_headers
f_string_empty_s, // process_post
f_string_empty_s, // process_pre
0, // build_name
0, // build_script
0, // build_shared
- 0, // build_sources_object
- 0, // build_sources_object_shared
- 0, // build_sources_object_static
0, // build_static
0, // has_path_standard
0, // path_headers
0, // path_program_shared
0, // path_program_static
0, // path_sources
+ 0, // path_sources_headers
+ 0, // path_sources_library
0, // path_sources_object
+ 0, // path_sources_program
+ 0, // path_sources_script
0, // preserve_path_headers
0, // process_post
0, // process_pre
0, // build_name
0, // build_script
0, // build_shared
- 0, // build_sources_object
- 0, // build_sources_object_shared
- 0, // build_sources_object_static
0, // build_static
0, // has_path_standard
0, // path_headers
0, // path_program_shared
0, // path_program_static
0, // path_sources
+ 0, // path_sources_headers
+ 0, // path_sources_library
0, // path_sources_object
+ 0, // path_sources_program
+ 0, // path_sources_script
0, // preserve_path_headers
0, // process_post
0, // process_pre
f_string_empty_s, // build_name
f_string_empty_s, // build_script
f_string_empty_s, // build_shared
- f_string_empty_s, // build_sources_object
- f_string_empty_s, // build_sources_object_shared
- f_string_empty_s, // build_sources_object_static
f_string_empty_s, // build_static
f_string_empty_s, // has_path_standard
f_string_empty_s, // path_headers
f_string_empty_s, // path_program_shared
f_string_empty_s, // path_program_static
f_string_empty_s, // path_sources
+ f_string_empty_s, // path_sources_headers
+ f_string_empty_s, // path_sources_library
f_string_empty_s, // path_sources_object
+ f_string_empty_s, // path_sources_program
+ f_string_empty_s, // path_sources_script
f_string_empty_s, // preserve_path_headers
f_string_empty_s, // process_post
f_string_empty_s, // process_pre
3, // build_name
1, // build_script
1, // build_shared
- 3, // build_sources_object
- 3, // build_sources_object_shared
- 3, // build_sources_object_static
1, // build_static
1, // has_path_standard
2, // path_headers
2, // path_program_shared
2, // path_program_static
2, // path_sources
+ 2, // path_sources_headers
+ 2, // path_sources_library
2, // path_sources_object
+ 2, // path_sources_program
+ 2, // path_sources_script
1, // preserve_path_headers
3, // process_post
3, // process_pre
5, // version_target
};
- for (f_array_length_t i = 0; i < 40; ++i) {
+ for (f_array_length_t i = 0; i < 41; ++i) {
// Assign the default for literal and path types.
if (!settings_single_matches[i] && settings_single_destination[i]) {
}
}
}
+
+ // Handle special defaults for path sources.
+ if (F_status_is_error_not(*status)) {
+
+ // [72] path_sources_headers.
+ if (!settings_matches[72]) {
+ setting->path_sources_headers.used = 0;
+
+ *status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_headers);
+ }
+
+ // [73] path_sources_library.
+ if (!settings_matches[73] && F_status_is_error_not(*status)) {
+ setting->path_sources_library.used = 0;
+
+ *status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_library);
+ }
+
+ // [74] path_sources_object.
+ if (!settings_matches[74] && F_status_is_error_not(*status)) {
+ setting->path_sources_object.used = 0;
+
+ *status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_object);
+ }
+
+ // [75] path_sources_program.
+ if (!settings_matches[75] && F_status_is_error_not(*status)) {
+ setting->path_sources_program.used = 0;
+
+ *status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_program);
+ }
+
+ // [76] path_sources_script.
+ if (!settings_matches[76] && F_status_is_error_not(*status)) {
+ setting->path_sources_script.used = 0;
+
+ *status = f_string_dynamic_append_nulless(setting->path_sources, &setting->path_sources_script);
+ }
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ }
+ }
+
+ if (F_status_is_error_not(*status)) {
+ if (checks && !setting->version_file) {
+ setting->version_file = fake_build_version_type_micro_e;
+
+ if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) {
+ flockfile(data->main->warning.to.stream);
+
+ fl_print_format("%[%QThe setting '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.prefix, data->main->warning.context);
+ fl_print_format("%[%Q%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_setting_name_version_file_s, data->main->warning.notable);
+ fl_print_format("%[' in the file '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+ fl_print_format("%[%Q%]", data->main->warning.to.stream, data->main->warning.notable, path_file, data->main->warning.notable);
+ fl_print_format("%[' is required, defaulting to '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+ fl_print_format("%[%Q%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_version_micro_s, data->main->warning.notable);
+ fl_print_format("%['.%]%r", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context, f_string_eol_s);
+
+ funlockfile(data->main->warning.to.stream);
+ }
+ }
+
+ if (checks && !setting->version_target) {
+ setting->version_target = fake_build_version_type_major_e;
+
+ if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) {
+ flockfile(data->main->warning.to.stream);
+
+ fl_print_format("%[%QThe setting '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.prefix, data->main->warning.context);
+ fl_print_format("%[%Q%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_setting_name_version_target_s, data->main->warning.notable);
+ fl_print_format("%[' in the file '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+ fl_print_format("%[%Q%]", data->main->warning.to.stream, data->main->warning.notable, path_file, data->main->warning.notable);
+ fl_print_format("%[' is required, defaulting to '%]", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context);
+ fl_print_format("%[%Q%]", data->main->warning.to.stream, data->main->warning.notable, fake_build_version_major_s, data->main->warning.notable);
+ fl_print_format("%['.%]%r", data->main->warning.to.stream, data->main->warning.context, data->main->warning.context, f_string_eol_s);
+
+ funlockfile(data->main->warning.to.stream);
+ }
+ }
+ }
}
f_string_dynamics_resize(0, &build_compiler);
f_string_dynamics_resize(0, &build_name);
f_string_dynamics_resize(0, &build_script);
f_string_dynamics_resize(0, &build_shared);
- f_string_dynamics_resize(0, &build_sources_object);
- f_string_dynamics_resize(0, &build_sources_object_shared);
- f_string_dynamics_resize(0, &build_sources_object_static);
f_string_dynamics_resize(0, &build_static);
f_string_dynamics_resize(0, &has_path_standard);
f_string_dynamics_resize(0, &path_headers);
f_string_dynamics_resize(0, &path_program_shared);
f_string_dynamics_resize(0, &path_program_static);
f_string_dynamics_resize(0, &path_sources);
+ f_string_dynamics_resize(0, &path_sources_headers);
+ f_string_dynamics_resize(0, &path_sources_library);
f_string_dynamics_resize(0, &path_sources_object);
+ f_string_dynamics_resize(0, &path_sources_program);
+ f_string_dynamics_resize(0, &path_sources_script);
f_string_dynamics_resize(0, &preserve_path_headers);
f_string_dynamics_resize(0, &process_post);
f_string_dynamics_resize(0, &process_pre);
f_string_dynamics_resize(0, &version_nano);
f_string_dynamics_resize(0, &version_nano_prefix);
f_string_dynamics_resize(0, &version_target);
+
+ if (F_status_is_error_not(*status)) {
+ *status = F_none;
+ }
}
#endif // _di_fake_build_load_setting_process_
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,
&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,
}
#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, f_status_t * const status) {
+#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, f_status_t * const status) {
if (*status == F_child) return data->main->child;
if (F_status_is_error(*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;
if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) {
- fll_print_format("%r%[Compiling shared object.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
+ if (shared) {
+ fll_print_format("%r%[Compiling shared object.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
+ }
+ else {
+ fll_print_format("%r%[Compiling static object.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
+ }
}
+ 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,
+ shared ? &data_build->setting.build_sources_object_shared : &data_build->setting.build_sources_object_static,
+ };
+
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ f_string_dynamic_t cache_1 = f_string_dynamic_t_initialize;
+ f_string_dynamic_t cache_2 = f_string_dynamic_t_initialize;
+ f_string_dynamic_t cache_3 = f_string_dynamic_t_initialize;
- *status = fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_shared, &arguments);
+ for (i = 0; i < 2; ++i) {
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_object_add", F_true);
+ for (j = 0; j < sources[i]->used && F_status_is_error_not(*status); ++j) {
- f_string_dynamics_resize(0, &arguments);
+ while (arguments.used) {
+ arguments.array[--arguments.used].used = 0;
+ } // while
- return 0;
- }
+ *status = fake_build_sources_object_add(data, data_build, &sources[i]->array[j], &arguments);
- {
- f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
- parameter_file_name_path.used = data->path_build_objects_shared.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used;
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_object_add", F_true);
- f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
- parameter_file_name_path.string = parameter_file_name_path_string;
- parameter_file_name_path_string[parameter_file_name_path.used] = 0;
+ break;
+ }
- memcpy(parameter_file_name_path_string, data->path_build_objects_shared.string, sizeof(f_char_t) * data->path_build_objects_shared.used);
- memcpy(parameter_file_name_path_string + data->path_build_objects_shared.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
- memcpy(parameter_file_name_path_string + data->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ cache_1.used = 0;
+ cache_2.used = 0;
+ cache_3.used = 0;
- const f_string_static_t values[] = {
- fake_build_parameter_object_compile_s,
- fake_build_parameter_object_output_s,
- parameter_file_name_path,
- };
+ fake_build_get_file_name_without_extension(data, sources[i]->array[j], &cache_1);
- for (uint8_t i = 0; i < 3; ++i) {
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true);
- if (!values[i].used) continue;
+ break;
+ }
- *status = fll_execute_arguments_add(values[i], &arguments);
- if (F_status_is_error(*status)) break;
- } // for
- }
+ *status = f_file_name_directory(sources[i]->array[j], &cache_2);
- fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e, &arguments, status);
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true);
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true);
+ break;
+ }
- macro_f_string_dynamics_t_delete_simple(arguments);
+ *status = f_string_dynamic_append_assure(f_path_separator_s, &cache_2);
- return 0;
- }
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true);
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+ break;
+ }
- macro_f_string_dynamics_t_delete_simple(arguments);
+ *status = f_string_dynamic_append_nulless(shared ? data->path_build_objects_shared : data->path_build_objects_static, &cache_3);
- if (F_status_is_error_not(*status) && *status != F_child) {
- fake_build_touch(data, file_stage, status);
- }
+ if (F_status_is_error_not(*status)) {
+ *status = f_string_dynamic_append_nulless(cache_2, &cache_3);
+ }
- return result;
- }
-#endif // _di_fake_build_object_shared_
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
-#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, f_status_t * const status) {
+ break;
+ }
- if (*status == F_child) return data->main->child;
- if (F_status_is_error(*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;
+ *status = f_directory_exists(cache_3);
- if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) {
- fll_print_format("%r%[Compiling static object.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
- }
+ if (*status == F_false) {
+ fll_error_file_print(data->main->error, F_file_type_not_directory, "f_directory_exists", F_true, cache_3, f_file_operation_find_s, fll_error_file_type_directory_e);
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ *status = F_status_set_error(F_failure);
- *status = fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_static, &arguments);
+ break;
+ }
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_object_add", F_true);
+ if (*status == F_file_found_not) {
+ *status = f_directory_create(cache_3, mode.directory);
- f_string_dynamics_resize(0, &arguments);
+ if (F_status_is_error(*status)) {
+ if (F_status_set_fine(*status) == F_file_found_not) {
+ flockfile(data->main->error.to.stream);
- return 0;
- }
+ fl_print_format("%[%QThe path '%]", data->main->error.to.stream, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, cache_3, data->main->error.notable);
+ fl_print_format("%[' could not be created, a parent directory is invalid or does not exist.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s);
- {
- f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
- parameter_file_name_path.used = data->path_build_objects_static.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used;
+ funlockfile(data->main->error.to.stream);
+ }
+ else {
+ fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_create", F_true, cache_3, f_file_operation_create_s, fll_error_file_type_directory_e);
+ }
- f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
- parameter_file_name_path.string = parameter_file_name_path_string;
- parameter_file_name_path_string[parameter_file_name_path.used] = 0;
+ break;
+ }
+ }
+ else if (F_status_is_error(*status)) {
+ fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_exists", F_true, cache_3, f_file_operation_create_s, fll_error_file_type_directory_e);
- memcpy(parameter_file_name_path_string, data->path_build_objects_static.string, sizeof(f_char_t) * data->path_build_objects_static.used);
- memcpy(parameter_file_name_path_string + data->path_build_objects_static.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
- memcpy(parameter_file_name_path_string + data->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ break;
+ }
- const f_string_static_t values[] = {
- fake_build_parameter_object_compile_s,
- fake_build_parameter_object_output_s,
- parameter_file_name_path,
- };
+ if (F_status_is_error_not(*status)) {
+ *status = f_string_dynamic_append_nulless(cache_1, &cache_3);
+ }
- for (uint8_t i = 0; i < 3; ++i) {
+ if (F_status_is_error_not(*status)) {
+ *status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &cache_3);
+ }
- if (!values[i].used) continue;
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
- *status = fll_execute_arguments_add(values[i], &arguments);
- if (F_status_is_error(*status)) break;
- } // for
- }
+ break;
+ }
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e, &arguments, status);
+ {
+ 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,
+ cache_3,
+ };
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true);
+ for (uint8_t i = 0; i < 4; ++i) {
- macro_f_string_dynamics_t_delete_simple(arguments);
+ if (!values[i].used) continue;
- return 0;
- }
+ *status = fll_execute_arguments_add(values[i], &arguments);
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
+
+ break;
+ }
+ } // for
+ }
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+ fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e, &arguments, status); // @todo don't add linkage for object.
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true);
+
+ break;
+ }
+
+ result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+
+ if (F_status_is_error(*status)) {
+ fll_error_print(data->main->error, F_status_set_fine(*status), "fake_execute", F_true);
+
+ break;
+ }
+
+ if (result && !result_final) {
+ result_final = result;
+ }
+ } // for
+ } // for
+ macro_f_string_dynamic_t_delete_simple(cache_1);
+ macro_f_string_dynamic_t_delete_simple(cache_2);
+ macro_f_string_dynamic_t_delete_simple(cache_3);
macro_f_string_dynamics_t_delete_simple(arguments);
if (F_status_is_error_not(*status) && *status != F_child) {
fake_build_touch(data, file_stage, status);
}
- return result;
+ return result_final;
}
-#endif // _di_fake_build_object_static_
+#endif // _di_fake_build_object_
#ifdef __cplusplus
} // 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.
* @param status
* F_none on success.
*
* 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.
*/
-#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, f_status_t * const status) F_attribute_visibility_internal_d;
-#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.
- *
- * @param data
- * The program data.
- * @param data_build
- * The build data.
- * @param mode
- * The file mode.
- * @param file_stage
- * The specific stage file path.
- * @param status
- * F_none on success.
- *
- * 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.
- */
-#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, f_status_t * const status) F_attribute_visibility_internal_d;
-#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, f_status_t * const status) F_attribute_visibility_internal_d;
+#endif // _di_fake_build_object_
#ifdef __cplusplus
} // extern "C"
+++ /dev/null
-#include "fake.h"
-#include "private-common.h"
-#include "private-fake.h"
-#include "private-build.h"
-#include "private-build-objects.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, f_status_t * const status) {
-
- if (*status == F_child) return data->main->child;
- if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true) return 0;
- if (!data_build->setting.build_sources_library.used) return 0;
-
- if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) {
- fll_print_format("%r%[Compiling objects for static library.%]%r", data->main->output.to.stream, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
- }
-
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
-
- *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, &arguments);
-
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true);
-
- f_string_dynamics_resize(0, &arguments);
-
- return 0;
- }
-
- f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
- f_string_dynamic_t destination_path = f_string_dynamic_t_initialize;
- f_string_static_t destination = f_string_static_t_initialize;
- f_string_static_t source = f_string_static_t_initialize;
-
- int result = data->main->child;
-
- const f_string_dynamics_t *sources[2] = {
- &data_build->setting.build_sources_library,
- &data_build->setting.build_sources_library_static,
- };
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- for (i = 0; i < 2; ++i) {
-
- for (j = 0; j < sources[i]->used; ++j) {
-
- if (!sources[i]->array[j].used) continue;
-
- file_name.used = 0;
- destination_path.used = 0;
-
- fake_build_path_source_length(data, data_build, &data_build->setting.path_sources, &source);
-
- f_char_t source_string[source.used + sources[i]->array[j].used + 1];
- source.string = source_string;
-
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &source);
-
- memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
- source.used += sources[i]->array[j].used;
- source.string[source.used] = 0;
-
- *status = fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
-
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true);
-
- break;
- }
-
- *status = f_file_name_directory(sources[i]->array[j], &destination_path);
-
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true);
-
- break;
- }
-
- if (destination_path.used) {
- *status = f_string_dynamic_prepend(data->path_build_objects, &destination_path);
-
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_prepend", F_true);
-
- break;
- }
-
- *status = f_string_dynamic_append_assure(f_path_separator_s, &destination_path);
-
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true);
-
- break;
- }
-
- *status = f_directory_exists(destination_path);
-
- if (*status == F_false) {
- if (data->main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(data->main->error.to.stream);
-
- fl_print_format("%r%[%QThe path '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
- fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, destination_path, data->main->error.notable);
- fl_print_format("%[' exists but is not a directory.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s);
-
- funlockfile(data->main->error.to.stream);
- }
-
- *status = F_status_set_error(F_failure);
-
- break;
- }
-
- if (*status == F_file_found_not) {
- *status = f_directory_create(destination_path, mode.directory);
-
- if (F_status_is_error(*status)) {
- if (F_status_set_fine(*status) == F_file_found_not) {
- flockfile(data->main->error.to.stream);
-
- fl_print_format("%r%[%QThe path '%]", data->main->error.to.stream, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
- fl_print_format("%[%Q%]", data->main->error.to.stream, data->main->error.notable, destination_path, data->main->error.notable);
- fl_print_format("%[' could not be created, a parent directory does not exist.%]%r", data->main->error.to.stream, data->main->error.context, data->main->error.context, f_string_eol_s);
-
- funlockfile(data->main->error.to.stream);
- }
- else {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
- }
-
- break;
- }
-
- if (data->main->error.verbosity >= f_console_verbosity_verbose_e) {
- fll_print_format("Directory '%Q' created.%r", data->main->output.to.stream, destination_path, f_string_eol_s);
- }
- }
-
- if (F_status_is_error(*status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
-
- break;
- }
-
- destination.used = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
- }
- else {
- destination.used = data->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
- }
-
- f_char_t destination_string[destination.used + 1];
- destination.string = destination_string;
- destination_string[destination.used] = 0;
-
- if (destination_path.used) {
- memcpy(destination_string, destination_path.string, sizeof(f_char_t) * destination_path.used);
- memcpy(destination_string + destination_path.used, file_name.string, sizeof(f_char_t) * file_name.used);
- memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
- }
- else {
- memcpy(destination_string, data->path_build_objects.string, sizeof(f_char_t) * data->path_build_objects.used);
- memcpy(destination_string + data->path_build_objects.used, file_name.string, sizeof(f_char_t) * file_name.used);
- memcpy(destination_string + data->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
- }
-
- const f_string_static_t values[] = {
- source,
- fake_build_parameter_object_compile_s,
- fake_build_parameter_object_static_s,
- fake_build_parameter_object_output_s,
- destination,
- };
-
- for (uint8_t k = 0; k < 5; ++k) {
-
- if (!values[k].used) continue;
-
- *status = fll_execute_arguments_add(values[k], &arguments);
- if (F_status_is_error(*status)) break;
- } // for
-
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_library_e, &arguments, status);
-
- if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
-
- break;
- }
-
- result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
-
- macro_f_string_dynamics_t_delete_simple(arguments);
-
- if (F_status_is_error(*status) || *status == F_child) break;
- } // for
-
- if (F_status_is_error(*status) || *status == F_child) break;
- } // for
-
- f_string_dynamic_resize(0, &file_name);
- f_string_dynamic_resize(0, &destination_path);
- f_string_dynamics_resize(0, &arguments);
-
- if (F_status_is_error_not(*status) && *status != F_child) {
- fake_build_touch(data, file_stage, status);
- }
-
- return result;
- }
-#endif // _di_fake_build_objects_static_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 3
- *
- * Project: Featureless Make
- * API Version: 0.6
- * Licenses: lgpl-2.1-or-later
- */
-#ifndef _PRIVATE_build_objects_h
-#define _PRIVATE_build_objects_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Build static options 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.
- * @param data_build
- * The build data.
- * @param mode
- * The file mode.
- * @param file_stage
- * The specific stage file path.
- * @param status
- * F_none on success.
- *
- * 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.
- */
-#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, f_status_t * const status) F_attribute_visibility_internal_d;
-#endif // _di_fake_build_objects_static_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_build_objects_h
return 0;
}
- *status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared, &arguments);
+ *status = fake_build_sources_add(data, data_build, &data_build->setting.path_sources_program, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared, &arguments);
if (F_status_is_error(*status)) {
fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true);
return 0;
}
- *status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static, &arguments);
+ *status = fake_build_sources_add(data, data_build, &data_build->setting.path_sources_program, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static, &arguments);
if (F_status_is_error(*status)) {
fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true);
source_library.used = 0;
// 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) {
memcpy(source_library_string, data->path_build_libraries_static.string, sizeof(f_char_t) * data->path_build_libraries_static.used);
source_library.used += data->path_build_libraries_static.used;
#include "private-build-library.h"
#include "private-build-load.h"
#include "private-build-object.h"
-#include "private-build-objects.h"
#include "private-build-program.h"
#include "private-build-skeleton.h"
#include "private-print.h"
f_array_length_t i = 0;
- for (i = 0; i < data_build->setting.build_libraries.used && F_status_is_error_not(*status); ++i) {
+ if (type != fake_build_type_object_e) {
+ for (i = 0; i < data_build->setting.build_libraries.used && F_status_is_error_not(*status); ++i) {
- if (!data_build->setting.build_libraries.array[i].used) continue;
+ if (!data_build->setting.build_libraries.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build->setting.build_libraries.array[i], arguments);
- } // for
+ *status = fll_execute_arguments_add(data_build->setting.build_libraries.array[i], arguments);
+ } // for
- if (is_shared) {
- for (i = 0; i < data_build->setting.build_libraries_shared.used && F_status_is_error_not(*status); ++i) {
+ if (is_shared) {
+ for (i = 0; i < data_build->setting.build_libraries_shared.used && F_status_is_error_not(*status); ++i) {
- if (!data_build->setting.build_libraries_shared.array[i].used) continue;
+ if (!data_build->setting.build_libraries_shared.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build->setting.build_libraries_shared.array[i], arguments);
- } // for
- }
- else {
- for (i = 0; i < data_build->setting.build_libraries_static.used && F_status_is_error_not(*status); ++i) {
+ *status = fll_execute_arguments_add(data_build->setting.build_libraries_shared.array[i], arguments);
+ } // for
+ }
+ else {
+ for (i = 0; i < data_build->setting.build_libraries_static.used && F_status_is_error_not(*status); ++i) {
- if (!data_build->setting.build_libraries_static.array[i].used) continue;
+ if (!data_build->setting.build_libraries_static.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build->setting.build_libraries_static.array[i], arguments);
- } // for
+ *status = fll_execute_arguments_add(data_build->setting.build_libraries_static.array[i], arguments);
+ } // for
+ }
}
for (i = 0; i < data_build->setting.flags.used && F_status_is_error_not(*status); ++i) {
data->settings,
data->path_build,
data->path_data,
- data_build->setting.path_sources,
+ data_build->setting.path_sources_script,
data->path_under,
data->path_work,
};
if (data_build.setting.build_script) {
f_string_static_t source = f_string_static_t_initialize;
- fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources, &source);
+ fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources_script, &source);
f_char_t source_string[source.used + fake_path_part_script_s.used + 1];
source.string = source_string;
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &source);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources_script, &source);
memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(f_char_t) * fake_path_part_script_s.used);
source.used += fake_path_part_script_s.used;
if (data_build.setting.build_sources_headers.used) {
f_string_static_t source = f_string_static_t_initialize;
- fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources, &source);
+ fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources_headers, &source);
f_char_t source_string[source.used + 1];
source.string = source_string;
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &source);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources_headers, &source);
f_string_static_t path_headers = f_string_static_t_initialize;
path_headers.used = data->path_build_includes.used + data_build.setting.path_headers.used;
}
if (data_build.setting.build_shared) {
- data->main->child = fake_build_object_shared(data, &data_build, mode, stage.file_object_shared, &status);
+ data->main->child = fake_build_object(data, &data_build, mode, stage.file_object_shared, F_true, &status);
data->main->child = fake_build_library_shared(data, &data_build, mode, stage.file_library_shared, &status);
}
if (data_build.setting.build_static) {
- data->main->child = fake_build_object_static(data, &data_build, mode, stage.file_object_static, &status);
+ data->main->child = fake_build_object(data, &data_build, mode, stage.file_object_static, F_false, &status);
- data->main->child = fake_build_objects_static(data, &data_build, mode, stage.file_objects_static, &status);
+ data->main->child = fake_build_library_static_object(data, &data_build, mode, stage.file_library_static_object, &status);
data->main->child = fake_build_library_static(data, &data_build, mode, stage.file_library_static, &status);
if (data_build.setting.build_script) {
f_string_static_t source = f_string_static_t_initialize;
- fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources, &source);
+ fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources_script, &source);
f_char_t source_string[source.used + fake_path_part_script_s.used + 1];
source.string = source_string;
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &source);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources_script, &source);
memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(f_char_t) * fake_path_part_script_s.used);
source.used += fake_path_part_script_s.used;
#endif // _di_fake_build_path_source_string_
#ifndef _di_fake_build_sources_add_
- f_status_t fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) {
+ f_status_t fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const source_path, f_string_statics_t * const generic, f_string_statics_t * const specific, f_string_dynamics_t * const arguments) {
f_status_t status = F_none;
f_array_length_t i = 0;
if (!sources[i]->array[j].used) continue;
- fake_build_path_source_length(data, data_build, &data_build->setting.path_sources, &source);
+ fake_build_path_source_length(data, data_build, source_path, &source);
f_char_t source_string[source.used + sources[i]->array[j].used + 1];
source.string = source_string;
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &source);
+ fake_build_path_source_string(data, data_build, source_path, &source);
memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
source.used += sources[i]->array[j].used;
#endif // _di_fake_build_sources_add_
#ifndef _di_fake_build_sources_object_add_
- f_status_t fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific, f_string_dynamics_t *arguments) {
+ f_status_t fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const file, f_string_dynamics_t * const arguments) {
- if (!generic->used && !specific->used) return F_none;
+ if (!file) return F_none;
f_string_static_t source = f_string_static_t_initialize;
fake_build_path_source_length(data, data_build, &data_build->setting.path_sources_object, &source);
- if (specific->used) {
- source.used += specific->used;
- }
- else {
- source.used += generic->used;
- }
+ source.used += file->used;
f_char_t source_string[source.used + 1];
source.string = source_string;
fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_object, &source);
- if (specific->used) {
- memcpy(source_string + source.used, specific->string, sizeof(f_char_t) * specific->used);
- source.used += specific->used;
- }
- else {
- memcpy(source_string + source.used, generic->string, sizeof(f_char_t) * generic->used);
- source.used += generic->used;
- }
+ memcpy(source_string + source.used, file->string, sizeof(f_char_t) * file->used);
+ source.used += file->used;
source_string[source.used] = 0;
* The source path from the build settings file.
* @param source
* The static string.
- * The path_sources.string is not expected to be defined at this point.
- * The path_sources.used is updated.
- * The path_sources.size is ignored.
+ * The source.string is not expected to be defined at this point.
+ * The source.used is updated.
+ * The source.size is ignored.
*/
#ifndef _di_fake_build_path_source_length_
extern void fake_build_path_source_length(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_static_t * const source) F_attribute_visibility_internal_d;
* The source path from the build settings file.
* @param source
* The static string.
- * The path_sources.string is expected to be defined and set to a size from path_sources.used + 1.
- * The path_sources.used is updated.
- * The path_sources.size is ignored.
+ * The source.string is expected to be defined and set to a size from source.used + 1.
+ * The source.used is updated.
+ * The source.size is ignored.
*/
#ifndef _di_fake_build_path_source_string_
extern void fake_build_path_source_string(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_static_t * const source) F_attribute_visibility_internal_d;
* The program data.
* @param data_build
* The build data.
+ * @param source_path
+ * The source path to use, such as data_build.setting.path_sources.
* @param generic
* The generic sources to add.
* @param specific
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_sources_add_
- extern f_status_t fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d;
+ extern f_status_t fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const source_path, f_string_statics_t * const generic, f_string_statics_t * const specific, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_build_sources_add_
/**
* The program data.
* @param data_build
* The build data.
- * @param generic
- * The generic sources to add.
- * @param specific
- * The specific sources to add.
+ * @param file
+ * The source object file to add.
* @param arguments
* The execute arguments array being updated.
*
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_sources_object_add_
- extern f_status_t fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d;
+ extern f_status_t fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const file, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_build_sources_object_add_
/**
const f_string_static_t fake_build_setting_name_path_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_program_shared_s, 0, FAKE_build_setting_name_path_program_shared_s_length);
const f_string_static_t fake_build_setting_name_path_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_program_static_s, 0, FAKE_build_setting_name_path_program_static_s_length);
const f_string_static_t fake_build_setting_name_path_sources_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_s, 0, FAKE_build_setting_name_path_sources_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_headers_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_headers_s, 0, FAKE_build_setting_name_path_sources_headers_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_library_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_library_s, 0, FAKE_build_setting_name_path_sources_library_s_length);
const f_string_static_t fake_build_setting_name_path_sources_object_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_object_s, 0, FAKE_build_setting_name_path_sources_object_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_program_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_program_s, 0, FAKE_build_setting_name_path_sources_program_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_script_s, 0, FAKE_build_setting_name_path_sources_script_s_length);
const f_string_static_t fake_build_setting_name_preserve_path_headers_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_preserve_path_headers_s, 0, FAKE_build_setting_name_preserve_path_headers_s_length);
const f_string_static_t fake_build_setting_name_process_post_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_process_post_s, 0, FAKE_build_setting_name_process_post_s_length);
const f_string_static_t fake_build_setting_name_process_pre_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_process_pre_s, 0, FAKE_build_setting_name_process_pre_s_length);
const f_string_static_t fake_build_stage_library_script_s = macro_f_string_static_t_initialize(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(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(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(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(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(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(FAKE_build_stage_object_static_s, 0, FAKE_build_stage_object_static_s_length);
* build_compiler: The build_compiler setting.
* build_indexer: The build_indexer setting.
* build_name: The build_name setting.
- * build_sources_object: The build_sources_object setting.
- * build_sources_object_shared: The build_sources_object_shared setting.
- * build_sources_object_static: The build_sources_object_static setting.
* path_headers: The path_headers setting.
* path_language: The path_language setting.
* path_library_script: The path_library_script setting.
* path_program_shared: The path_program_shared setting.
* path_program_static: The path_program_static setting.
* path_sources: The path_sources setting.
+ * path_sources_headers: The path_sources_headers setting.
+ * path_sources_library: The path_sources_library setting.
* path_sources_object: The path_sources_object setting.
+ * path_sources_program: The path_sources_program setting.
+ * path_sources_script: The path_sources_script setting.
* process_post: The process_post setting.
* process_pre: The process_pre setting.
* version_major: The version_major setting.
* build_sources_library: The build_sources_library setting.
* build_sources_library_shared: The build_sources_library_shared setting.
* build_sources_library_static: The build_sources_library_static setting.
+ * build_sources_object: The build_sources_object setting.
+ * build_sources_object_shared: The build_sources_object_shared setting.
+ * build_sources_object_static: The build_sources_object_static setting.
* build_sources_program: The build_sources_program setting.
* build_sources_program_shared: The build_sources_program_shared setting.
* build_sources_program_static: The build_sources_program_static setting.
f_string_dynamic_t build_compiler;
f_string_dynamic_t build_indexer;
f_string_dynamic_t build_name;
- f_string_dynamic_t build_sources_object;
- f_string_dynamic_t build_sources_object_shared;
- f_string_dynamic_t build_sources_object_static;
f_string_dynamic_t path_headers;
f_string_dynamic_t path_language;
f_string_dynamic_t path_library_script;
f_string_dynamic_t path_program_shared;
f_string_dynamic_t path_program_static;
f_string_dynamic_t path_sources;
+ f_string_dynamic_t path_sources_headers;
+ f_string_dynamic_t path_sources_library;
f_string_dynamic_t path_sources_object;
+ f_string_dynamic_t path_sources_program;
+ f_string_dynamic_t path_sources_script;
f_string_dynamic_t process_post;
f_string_dynamic_t process_pre;
f_string_dynamic_t version_major;
f_string_dynamics_t build_objects_library;
f_string_dynamics_t build_objects_library_shared;
f_string_dynamics_t build_objects_library_static;
+ f_string_dynamics_t build_sources_object;
+ f_string_dynamics_t build_sources_object_shared;
+ f_string_dynamics_t build_sources_object_static;
f_string_dynamics_t build_objects_program;
f_string_dynamics_t build_objects_program_shared;
f_string_dynamics_t build_objects_program_static;
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
macro_f_string_dynamic_t_delete_simple(setting.build_compiler) \
macro_f_string_dynamic_t_delete_simple(setting.build_indexer) \
macro_f_string_dynamic_t_delete_simple(setting.build_name) \
- macro_f_string_dynamic_t_delete_simple(setting.build_sources_object) \
- macro_f_string_dynamic_t_delete_simple(setting.build_sources_object_shared) \
- macro_f_string_dynamic_t_delete_simple(setting.build_sources_object_static) \
macro_f_string_dynamic_t_delete_simple(setting.path_headers) \
macro_f_string_dynamic_t_delete_simple(setting.path_language) \
macro_f_string_dynamic_t_delete_simple(setting.path_library_script) \
macro_f_string_dynamic_t_delete_simple(setting.path_program_shared) \
macro_f_string_dynamic_t_delete_simple(setting.path_program_static) \
macro_f_string_dynamic_t_delete_simple(setting.path_sources) \
+ macro_f_string_dynamic_t_delete_simple(setting.path_sources_headers) \
+ macro_f_string_dynamic_t_delete_simple(setting.path_sources_library) \
macro_f_string_dynamic_t_delete_simple(setting.path_sources_object) \
+ macro_f_string_dynamic_t_delete_simple(setting.path_sources_program) \
+ macro_f_string_dynamic_t_delete_simple(setting.path_sources_script) \
macro_f_string_dynamic_t_delete_simple(setting.process_post) \
macro_f_string_dynamic_t_delete_simple(setting.process_pre) \
macro_f_string_dynamic_t_delete_simple(setting.version_major) \
macro_f_string_dynamics_t_delete_simple(setting.build_sources_library) \
macro_f_string_dynamics_t_delete_simple(setting.build_sources_library_shared) \
macro_f_string_dynamics_t_delete_simple(setting.build_sources_library_static) \
+ macro_f_string_dynamics_t_delete_simple(setting.build_sources_object) \
+ macro_f_string_dynamics_t_delete_simple(setting.build_sources_object_shared) \
+ macro_f_string_dynamics_t_delete_simple(setting.build_sources_object_static) \
macro_f_string_dynamics_t_delete_simple(setting.build_sources_program) \
macro_f_string_dynamics_t_delete_simple(setting.build_sources_program_shared) \
macro_f_string_dynamics_t_delete_simple(setting.build_sources_program_static) \
#define FAKE_build_setting_name_path_program_shared_s "path_program_shared"
#define FAKE_build_setting_name_path_program_static_s "path_program_static"
#define FAKE_build_setting_name_path_sources_s "path_sources"
+ #define FAKE_build_setting_name_path_sources_headers_s "path_sources_headers"
+ #define FAKE_build_setting_name_path_sources_library_s "path_sources_library"
#define FAKE_build_setting_name_path_sources_object_s "path_sources_object"
+ #define FAKE_build_setting_name_path_sources_program_s "path_sources_program"
+ #define FAKE_build_setting_name_path_sources_script_s "path_sources_script"
#define FAKE_build_setting_name_preserve_path_headers_s "preserve_path_headers"
#define FAKE_build_setting_name_process_post_s "process_post"
#define FAKE_build_setting_name_process_pre_s "process_pre"
#define FAKE_build_setting_name_path_program_shared_s_length 19
#define FAKE_build_setting_name_path_program_static_s_length 19
#define FAKE_build_setting_name_path_sources_s_length 12
+ #define FAKE_build_setting_name_path_sources_headers_s_length 20
+ #define FAKE_build_setting_name_path_sources_library_s_length 20
#define FAKE_build_setting_name_path_sources_object_s_length 19
+ #define FAKE_build_setting_name_path_sources_program_s_length 20
+ #define FAKE_build_setting_name_path_sources_script_s_length 19
#define FAKE_build_setting_name_preserve_path_headers_s_length 21
#define FAKE_build_setting_name_process_post_s_length 12
#define FAKE_build_setting_name_process_pre_s_length 11
extern const f_string_static_t fake_build_setting_name_path_program_shared_s;
extern const f_string_static_t fake_build_setting_name_path_program_static_s;
extern const f_string_static_t fake_build_setting_name_path_sources_s;
+ extern const f_string_static_t fake_build_setting_name_path_sources_headers_s;
+ extern const f_string_static_t fake_build_setting_name_path_sources_library_s;
extern const f_string_static_t fake_build_setting_name_path_sources_object_s;
+ extern const f_string_static_t fake_build_setting_name_path_sources_program_s;
+ extern const f_string_static_t fake_build_setting_name_path_sources_script_s;
extern const f_string_static_t fake_build_setting_name_preserve_path_headers_s;
extern const f_string_static_t fake_build_setting_name_process_post_s;
extern const f_string_static_t fake_build_setting_name_process_pre_s;
extern const f_string_static_t fake_build_setting_name_version_nano_prefix_s;
extern const f_string_static_t fake_build_setting_name_version_target_s;
- #define fake_build_setting_total_d 89
+ #define fake_build_setting_total_d 93
#endif // _di_fake_build_setting_t_
#ifndef _di_fake_build_stage_t_
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;
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
#define macro_fake_build_stage_t_delete_simple(stage) \
macro_f_string_dynamic_t_delete_simple(stage.file_library_script) \
macro_f_string_dynamic_t_delete_simple(stage.file_library_shared) \
macro_f_string_dynamic_t_delete_simple(stage.file_library_static) \
+ macro_f_string_dynamic_t_delete_simple(stage.file_library_static_object) \
macro_f_string_dynamic_t_delete_simple(stage.file_object_script) \
macro_f_string_dynamic_t_delete_simple(stage.file_object_shared) \
macro_f_string_dynamic_t_delete_simple(stage.file_object_static) \
#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"
#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
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;
fake_build_setting_name_path_library_script_s,
fake_build_setting_name_path_library_shared_s,
fake_build_setting_name_path_library_static_s,
+ fake_build_setting_name_path_object_script_s,
+ fake_build_setting_name_path_object_shared_s,
+ fake_build_setting_name_path_object_static_s,
fake_build_setting_name_path_program_script_s,
fake_build_setting_name_path_program_shared_s,
fake_build_setting_name_path_program_static_s,
data_make->setting_build.path_library_script,
data_make->setting_build.path_library_shared,
data_make->setting_build.path_library_static,
+ data_make->setting_build.path_object_script,
+ data_make->setting_build.path_object_shared,
+ data_make->setting_build.path_object_static,
data_make->setting_build.path_program_script,
data_make->setting_build.path_program_shared,
data_make->setting_build.path_program_static,
data_make->setting_build.version_minor,
};
- for (uint8_t i = 0; i < 17; ++i) {
+ for (uint8_t i = 0; i < 20; ++i) {
status = fl_string_dynamic_partial_compare_string(dynamic_name[i].string, data_make->buffer, dynamic_name[i].used, range_name);
fake_build_setting_name_build_sources_library_s,
fake_build_setting_name_build_sources_library_shared_s,
fake_build_setting_name_build_sources_library_static_s,
+ fake_build_setting_name_build_sources_object_s,
+ fake_build_setting_name_build_sources_object_shared_s,
+ fake_build_setting_name_build_sources_object_static_s,
fake_build_setting_name_build_sources_program_s,
fake_build_setting_name_build_sources_program_shared_s,
fake_build_setting_name_build_sources_program_static_s,
fake_build_setting_name_defines_library_s,
fake_build_setting_name_defines_library_shared_s,
fake_build_setting_name_defines_library_static_s,
+ fake_build_setting_name_defines_object_s,
+ fake_build_setting_name_defines_object_shared_s,
+ fake_build_setting_name_defines_object_static_s,
fake_build_setting_name_defines_program_s,
fake_build_setting_name_defines_program_shared_s,
fake_build_setting_name_defines_program_static_s,
fake_build_setting_name_flags_library_s,
fake_build_setting_name_flags_library_shared_s,
fake_build_setting_name_flags_library_static_s,
+ fake_build_setting_name_flags_object_s,
+ fake_build_setting_name_flags_object_shared_s,
+ fake_build_setting_name_flags_object_static_s,
fake_build_setting_name_flags_program_s,
fake_build_setting_name_flags_program_shared_s,
fake_build_setting_name_flags_program_static_s,
data_make->setting_build.build_sources_library,
data_make->setting_build.build_sources_library_shared,
data_make->setting_build.build_sources_library_static,
+ data_make->setting_build.build_sources_object,
+ data_make->setting_build.build_sources_object_shared,
+ data_make->setting_build.build_sources_object_static,
data_make->setting_build.build_sources_program,
data_make->setting_build.build_sources_program_shared,
data_make->setting_build.build_sources_program_static,
data_make->setting_build.defines_library,
data_make->setting_build.defines_library_shared,
data_make->setting_build.defines_library_static,
+ data_make->setting_build.defines_object,
+ data_make->setting_build.defines_object_shared,
+ data_make->setting_build.defines_object_static,
data_make->setting_build.defines_program,
data_make->setting_build.defines_program_shared,
data_make->setting_build.defines_program_static,
data_make->setting_build.flags_library,
data_make->setting_build.flags_library_shared,
data_make->setting_build.flags_library_static,
+ data_make->setting_build.flags_object,
+ data_make->setting_build.flags_object_shared,
+ data_make->setting_build.flags_object_static,
data_make->setting_build.flags_program,
data_make->setting_build.flags_program_shared,
data_make->setting_build.flags_program_static,
0, // build_sources_library
0, // build_sources_library_shared
0, // build_sources_library_static
+ 0, // build_sources_object
+ 0, // build_sources_object_shared
+ 0, // build_sources_object_static
0, // build_sources_program
0, // build_sources_program_shared
0, // build_sources_program_static
0, // defines_library
0, // defines_library_shared
0, // defines_library_static
+ 0, // defines_object
+ 0, // defines_object_shared
+ 0, // defines_object_static
0, // defines_program
0, // defines_program_shared
0, // defines_program_static
0, // flags_library
0, // flags_library_shared
0, // flags_library_static
+ 0, // flags_object
+ 0, // flags_object_shared
+ 0, // flags_object_static
0, // flags_program
0, // flags_program_shared
0, // flags_program_static
0, // modes_default
};
- for (uint8_t i = 0; i < 36; ++i) {
+ for (uint8_t i = 0; i < 45; ++i) {
status = fl_string_dynamic_partial_compare_string(dynamics_name[i].string, data_make->buffer, dynamics_name[i].used, range_name);
* The partial path string, such as "bash".
* @param source
* The static string.
- * The path_sources.string is not expected to be defined at this point.
- * The path_sources.used is updated.
- * The path_sources.size is ignored.
+ * The source.string is not expected to be defined at this point.
+ * The source.used is updated.
+ * The source.size is ignored.
*/
#ifndef _di_fake_skeleton_path_source_length_
extern void fake_skeleton_path_source_length(fake_data_t * const data, const f_string_static_t *partial, f_string_static_t * const source) F_attribute_visibility_internal_d;
* The partial path string, such as "bash".
* @param source
* The static string.
- * The path_sources.string is expected to be defined and set to a size from path_sources.used + 1.
- * The path_sources.used is updated.
- * The path_sources.size is ignored.
+ * The source.string is expected to be defined and set to a size from source.used + 1.
+ * The source.used is updated.
+ * The source.size is ignored.
*/
#ifndef _di_fake_skeleton_path_source_string_
extern void fake_skeleton_path_source_string(fake_data_t * const data, const f_string_static_t *partial, f_string_static_t * const source) F_attribute_visibility_internal_d;
build_libraries-monolithic -lfll
build_sources_library fake.c common.c
-build_sources_library private-build.c private-build-library.c private-build-load.c private-build-object.c private-build-objects.c private-build-program.c private-build-skeleton.c
+build_sources_library private-build.c private-build-library.c private-build-load.c private-build-object.c private-build-program.c private-build-skeleton.c
build_sources_library private-clean.c private-common.c private-make.c private-print.c private-skeleton.c
build_sources_library private-make-load_fakefile.c private-make-load_parameters.c
build_sources_library private-make-operate.c private-make-operate_block.c private-make-operate_process.c private-make-operate_process_type.c private-make-operate_validate.c private-make-operate_validate_type.c
-.TH fake-defines "5" "February 2024" "FLL - Featureless Make 0.6.10" "File Formats"
+.TH fake-defines "5" "March 2024" "FLL - Featureless Make 0.6.10" "File Formats"
.SH NAME
Featureless Make \- "defines" file.
.SH SYNOPSIS
-.TH fake-dependencies "5" "February 2024" "FLL - Featureless Make 0.6.10" "File Formats"
+.TH fake-dependencies "5" "March 2024" "FLL - Featureless Make 0.6.10" "File Formats"
.SH NAME
Featureless Make \- "dependencies" file.
.SH SYNOPSIS
-.TH fake-fakefile "5" "February 2024" "FLL - Featureless Make 0.6.10" "File Formats"
+.TH fake-fakefile "5" "March 2024" "FLL - Featureless Make 0.6.10" "File Formats"
.SH NAME
Featureless Make \- "fakefile" file.
.SH SYNOPSIS
-.TH fake-settings "5" "February 2024" "FLL - Featureless Make 0.6.10" "File Formats"
+.TH fake-settings "5" "March 2024" "FLL - Featureless Make 0.6.10" "File Formats"
.SH NAME
Featureless Make \- "settings" file.
.SH SYNOPSIS
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"'."
# 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 -rrr ASCII ASCII GCC GCC HTML HTML -WW character "'" "'" code '"' '"'
- code:"current": The absolute path to the current working directory (present working directory) (Always has a trailing forward slash).
- code:"data": Associated with code:"-D/--data" parameter.
- code:"define": Associated with code:"-d/--define" parameter.
- - code:"documents": Associated with code:"-O/--documents" parameter (This is neither implemented nor supported by Featureless Make 0.6.x and earlier).
+ - code:"documents": Associated with code:"-O/--documents" parameter.
- code:"fakefile": Associated with code:"-f/--fakefile" parameter.
- - code:"licenses": Associated with code:"-l/--licenses" parameter (This is neither implemented nor supported by Featureless Make 0.6.x and earlier).
+ - code:"licenses": Associated with code:"-l/--licenses" parameter.
- code:"mode": Associated with code:"-m/--mode" parameter and possibly with the build settings default mode code:"modes_default".
- code:"process": Associated with code:"-p/--process" parameter.
- code:"return": Contains the return value of a previous operation that produces a return code.
This supports both code:":option" and code:":value".
- code:"under"\:
- This variable holds the code:"under" program parameters, such as code:"-U build/".
+ This variable holds the code:"under" program parameters, such as code:"-U under/".
This supports both code:":option" and code:":value".
- code:"verbosity"\:
# 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 -rrr ASCII ASCII FLL FLL GCC GCC -WW character "'" "'" code '"' '"'
- code:"build_script"\:
When code:"yes", the build process will build any scripts, such as a Bash script.
-
- This is neither implemented nor supported by Featureless Make 0.6.x and earlier.
+ This is currently not implemented.
- code:"build_shared"\:
When code:"yes", the build process will compile any source code for any supported language that supports shared library linking.
These are applied to only static builds.
- code:"build_sources_object"\:
- A single source file used for generating an object file.
- The source file is located within the path designated by code:"path_sources_object".
- The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the code:"build_name" with the code:".o" extension.
- May include a relative sub-path to each individual source file (such as: code:"level_0/a.c").
+ 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.
- code:"build_sources_object_shared"\:
- A single source file used for generating an object file.
- The source file is located within the path designated by code:"path_sources_object".
- The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the code:"build_name" with the code:".o" extension.
- May include a relative sub-path to each individual source file (such as: code:"level_0/a.c").
+ 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.
- code:"build_sources_object_static"\:
- A single source file used for generating an object file.
- The source file is located within the path designated by code:"path_sources_object".
- The built object does not get linked and therefore no linker arguments apply.
- The built object file is named using the code:"build_name" with the code:".o" extension.
- May include a relative sub-path to each individual source file (such as: code:"level_0/a.c").
+ 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.
- code:"build_sources_program"\:
A sub-path representing the destination where the built library script files are placed.
This defaults to code:"script".
-
- This is neither implemented nor supported by Featureless Make 0.6.x and earlier.
+ This is currently not implemented.
- code:"path_library_shared"\:
A sub-path representing the destination where the built shared library files are placed.
A sub-path representing the destination where the built object script files are placed.
This defaults to code:"script".
-
- This is neither implemented nor supported by Featureless Make 0.6.x and earlier.
+ This is currently not implemented.
- code:"path_object_shared"\:
A sub-path representing the destination where the built object library files are placed.
A sub-path representing the destination where the built program script files are placed.
This defaults to code:"script".
-
- This is neither implemented nor supported by Featureless Make 0.6.x and earlier.
+ This is currently not implemented.
- code:"path_program_shared"\:
A sub-path representing the destination where the built shared program files are placed.
This defaults to code:"sources".
+ - code:"path_sources_headers"\:
+ A sub-path representing where the header source files are found.
+ This is used by code:"build_sources_headers".
+
+ This defaults to code:"sources".
+
+ - code:"path_sources_library"\:
+ A sub-path representing where the library source files are found.
+ This is used by code:"build_sources_library".
+
+ This defaults to code:"sources".
+
- code:"path_sources_object"\:
A sub-path representing where the object source files are found.
This is used by code:"build_sources_object".
This defaults to code:"sources".
+ - code:"path_sources_program"\:
+ A sub-path representing where the program source files are found.
+ This is used by code:"build_sources_program".
+
+ This defaults to code:"sources".
+
+ - code:"path_sources_script"\:
+ A sub-path representing where the script source files are found.
+ This is used by code:"build_sources_script".
+
+ This defaults to code:"sources".
+
- code:"preserve_path_headers"\:
When this is code:"yes", then the relative directory structure in the source (as defined in code:"build_sources_headers") is preserved.
If the code:"build_sources_headers" has the header files code:"xxx/a.h yyy/zzz/b.h" and this is code:"yes", then the directories code:"xxx/" and code:"yyy/zzz/" are created and the files are stored within them.
# 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 '"' '"'
# 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 '"' '"'
# 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 '"' '"'
The code:"if" bold:"Section Operation" condition code:"parameter"\:
The following reserved words are available for parameter names: code:"build", code:"color", code:"current", code:"data", code:"documents", code:"define", code:"fakefile", code:"licenses", code:"mode", code:"process", code:"return", code:"settings", code:"sources", code:"top", code:"under", code:"verbosity", and code:"work".
- The reserved words code:"documents" and code:"licenses" are neither implemented nor supported by Featureless Make 0.6.x and earlier)
+ The reserved words code:"documents" and code:"licenses" are neither implemented nor supported by Featureless Make 0.6.x and earlier).
Each of the reserved words supports having code:":option" and code:":value" appended, such as: code:"work:value".
# 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 '"' '"'
- code:"path_program_shared": Must be a single valid path.
- code:"path_program_static": Must be a single valid path.
- code:"path_sources": Must only be a valid directory path or not specified.
+ - code:"path_sources_headers": Must only be a valid directory path or not specified.
+ - code:"path_sources_library": Must only be a valid directory path or not specified.
- code:"path_sources_object": Must only be a valid directory path or not specified.
+ - code:"path_sources_program": Must only be a valid directory path or not specified.
+ - code:"path_sources_script": Must only be a valid directory path or not specified.
- code:"preserve_path_headers": Must only be one of code:"yes" or code:"no".
- code:"process_post": Only one bold:"Content", which must only be a valid filename.
- code:"process_pre": Only one bold:"Content", which must only be a valid filename.