Kevin Day [Sat, 7 Jan 2023 15:57:39 +0000 (09:57 -0600)]
Update: Improve logic and design of install.sh script.
The destination directories should be created if they do not already exist.
Fail when the destination exists but is not a directory rather than fail if that directory does not exist.
Fix grammar in 'Failed to create work directories'.
The includes should be created only when work is not an empty string.
The recently added documentation needs to be created as well.
The settings is not created and needs to be created just like with documentation.
Ensure the existence of these directories allows the copy and paste to work correctly.
Ensure the normal directories get created in addition to the work directories.
I originally designed this to not have any opinions for the settings.
I've decided to relax that and apply the default settings of the 'etc/' directory.
This directory is now installed to.
If say the 'etc/' is actually needing to be the 'share/' directory, custom paths can be altered as well.
Make sure the documentation and settings can be disabled or have their destination paths altered.
Kevin Day [Sat, 7 Jan 2023 05:03:34 +0000 (23:03 -0600)]
Feature: Add missing documentation handling functionality to Featureless Make.
This is an oversight and should have been implemented before the first stable release.
This feature should be a core feature.
Documentation is important.
Make sure the handling of documentation is available for use.
This adds "build_sources_documentation" to the build settings to help facilitate documentation installation.
The documentation that is copied is expected to be under 'data/documentation/'.
The 'documentation' and 'documents' terminology overlaps to some degree.
The 'documentation' is a more specific thing and may not always be a 'document'.
The existing behavior around 'documents' is left unchanged.
The skeleton operation now creates the 'data/documentation/' directory.
The bootstrap.sh script now supports enabling and disabling documentation via the more common '--enable-doc' and '--disable-doc' parameters.
Kevin Day [Sat, 7 Jan 2023 04:53:37 +0000 (22:53 -0600)]
Cleanup: Fake program has incorrectly named variables.
The variables with 'build_sources_settings' should not have an 's' on the end.
The variables with 'build_process_post_s' and 'build_process_pre_s' should not have an '_s' on the end except for when it is a string.
Kevin Day [Thu, 5 Jan 2023 03:07:56 +0000 (21:07 -0600)]
Feature: Support passing a fakefile Section name to the main program.
This is intuitive and should have already been supported in the project to better transition from GNU Make into Featureless Make.
The unknown parameter error is to no longer be thrown.
Instead, when the make process in being followed, check to see if any Sections exist in the fakefile matching the main program Section parameters.
Fail when this happens.
If the Section exists in the fakefile then that Section is operated on.
This, for example, now allows for doing something like "fake install" in the same way "make install" works.
The "install" Section must exist in the fakefile for this to work.
Kevin Day [Thu, 5 Jan 2023 01:57:10 +0000 (19:57 -0600)]
Update: De-couple the build settings data file from the install.sh script.
The design is originally focused around the data/build/settings file.
This file is simple enough and easy enough to use that I decided to use it beyond its intended design.
I noticed that the data/build/settings isn't required anymore.
Removing this allows me to better use in other projects, such as those that have only a fakefile or have a different directory location for the build settings data.
Kevin Day [Tue, 3 Jan 2023 20:50:49 +0000 (14:50 -0600)]
Update: Be more thorough in the f_file unit test.
The "*_returns_false" test is doing a more complete check but the "*_returns_true" is not.
Redesign the "*_returns_true" test to have the same structure as the "*_returns_false" test.
Kevin Day [Wed, 21 Dec 2022 19:40:44 +0000 (13:40 -0600)]
Update: Fix license in documentation.
The time.txt specification uses the open-standard-license-1.0.
When I separated the time.txt and formally wrote the specification for the standard, I forgot to set the documentation to a documentation license.
The documentation licese is supposed to be cc-by-sa-4.0.
Kevin Day [Sat, 17 Dec 2022 00:15:47 +0000 (18:15 -0600)]
Bugfix: The "-mode" functionality is incomplete and incorrect in the bootstrap.sh script.
The bootstrap_load_settings_has() method is removed for being incorrect.
Add missing Objects, such as build_indexer, build_indexer_arguments, build_name, search_exclusive, and search_static, to the "has-" detection data array.
Add additional detection data array for the "-mode" variants of the "has-" data array keys.
Stop checking if Content is an empty string when doing an Object existence check.
Just check to see if the Object exist, with or without Content.
Override the parameters when a "-mode" is provided for single-value parameters, even if the Content does not exist.
This should properly fail for when the Object is overridden with a mode that has no Content and is required.
For example, take the following:
build_compiler gcc
build_compiler-clang
In that above case clang is a mode that is overriding but has no Content.
The build_compiler is required.
This should fail because clang mode replaces the single-valued build_compiler with no Content.
This is a proper failure.
Kevin Day [Fri, 16 Dec 2022 02:17:44 +0000 (20:17 -0600)]
Update: Documentation and specifications.
All of the documentation and specifications should now be IKI based.
I have finally decided on how I want abbreviations handled.
This removes the "abbreviation-" and "abbreviation:" from use.
The new behavior has the abbreviation followed by the expansion, such as FLL:"Featureless Linux Library".
have the block IKI structure identical in pattern to the script IKI structure.
Use "italic" instead of "emphasis" for such IKI vocabulary.
Kevin Day [Fri, 16 Dec 2022 00:33:14 +0000 (18:33 -0600)]
Cleanup: Bring a copy of time.txt from Controller to the core project.
New functionality needs to be added to the package.sh script to conditionally add documentation and specifications to any given package.
Once this is done, then the now redundant time.txt can be removed from the Controller and possibly Control projects.
There also needs to be a formally specification file for time.txt and not just documentation.
Kevin Day [Thu, 15 Dec 2022 00:14:47 +0000 (18:14 -0600)]
Bugfix: The IKI variables that expand reserved words should expand into multiple parameters.
Reserved words, such as the ones regarding the --mode parameter, have multiple values then these should themselves expand into multiple values.
Wrapping quotes can be added to prevent this behavior.
There may be previous issues that intentionally added this (and then possibly as a bugfix).
The previous behavior of expanding multi-valued reserved words into a single parameter value when not using quotes is now considered a bug.
Kevin Day [Wed, 14 Dec 2022 05:25:46 +0000 (23:25 -0600)]
Update: Slight changes to design around the build settings arguments.
Improve the argument handling when the fakefile contains a build settings with arguments.
This is done in observance of a bug where passed modes are combined into a single parameter when modes are passed via an IKI replacement.
A follow up bugfix that may involve some refactoring or functionality reinterpretation is needed.
This uses an explicit array when needed rather than an inexplicit pointer.
This repeats the parsing when printing the output so that information output is not misleading.
Kevin Day [Mon, 12 Dec 2022 00:40:30 +0000 (18:40 -0600)]
Feature: Add 'import' Object to fakefile and settings specifications.
This is important for building complex project structures and reducing the code redundancy.
To keep the logic and design simple, recursion is not allowed.
One can now create a base settings file that is imported by other settings files.
The same is true for fakefile files.
Kevin Day [Sat, 10 Dec 2022 16:28:24 +0000 (10:28 -0600)]
Security: Invalid write in FSS functions and ensure a reset used length on error.
The command that triggers this is "fss_basic_write -oc hi there".
An invalid write is happening due to not always performing the array size increase operations.
Update all FSS write functions with more thorough checks.
This problem is being obfuscated by the lossy allocation.
When errors happen the destination->used needs to be consistently reset to the original value on return.
Use the lossy allocation as well for allocation shwere the increase by is a raw digit.
In these specific cases use state.step_small rather than state.step_large.
Rename used_start to destination_used for improved consistency.
Kevin Day [Fri, 9 Dec 2022 03:51:03 +0000 (21:51 -0600)]
Bugfix: Some of the level checking defines have an "s" that should not be there.
Fix incorrect _di_level_0_parameters_checking_, replacing it with _di_level_0_parameter_checking_.
Fix incorrect _di_level_2_parameters_checking_, replacing it with _di_level_2_parameter_checking_.