Kevin Day [Sat, 24 Oct 2020 13:36:54 +0000 (08:36 -0500)]
Feature: provide string "except" functions.
The FSS Read functions utilize matching and printing on potentially delimited data.
If the delimits are not applied, then the matches and prints will be incorrect.
To avoid this, it seems that I need some way to not print the delimited data.
Provide "except" functions that accept and "except" array of strings representing locations within some string that are to be ignored.
The printing functions and comparison functions now have "except" equivalents.
The level_1 fl_print project appears outdated and needed updating anyway.
Restructure this project to use the private function practice, hopefully reducing the code size (and ideally binary size).
The "_string" part can be removed from the fl_print function names.
The parameter checks are loosened and now more closely match the approaches used in level_0 f_print.
Kevin Day [Fri, 23 Oct 2020 03:05:17 +0000 (22:05 -0500)]
Update: level_0 print functions.
Relax the parameter checks and have them return F_data_not when length is 0 or string is unavailable.
- Based on existing documentation, it seems this behavior was intended at some point anyway.
- The range is capped to buffer.used now.
The f_print_to* functions are rewritten to print as much of the string in as few calls to write() as possible.
- It is likely possible to utilize more complicated logic to further reduce the calls to write() but this is good enough for now.
- Reducing the calls to write(), in theory, should improve performance.
Add checks to f_print_to* functions to do nothing if the id is -1 (aka: an invalid/closed file descriptor).
Add *_except* print functions to print all characters except those specified in the "except" variable as well as not printing NULLs.
Kevin Day [Fri, 23 Oct 2020 01:28:41 +0000 (20:28 -0500)]
Bugfix: consistently use the data.output file for standard output printing.
There are still places that need to be converted from f_type_output and printf() to use this data.output file.
With this change, the data.output will be used and can more readily be updated to point to some file other than standard output.
The fss_*_read programs are not updated with this commit due to having additional changes.
These changes will also be applied to those programs in another commit.
It seems that I forgot to check the other programs and update them to work with the new delimit handling behavior in the appropriate FSS processing functions.
Kevin Day [Tue, 20 Oct 2020 04:55:53 +0000 (23:55 -0500)]
Update: FSS should allow caller to determine when to apply delimits.
Instead of automatically applying the delimits, pass the delimits to the caller.
Let the caller decide when or when not to apply the delimits.
Provide functions to help in this regard.
The FSS read programs will need a new parameter to allow for designating to or not to apply delimits.
This is particularly complex when it comes to FSS-0003 (Extended List) due to the nesting.
This change gave me the opportunity to review the FSS read functions, to a certain extent.
Code cleanup changes are included in this commit.
Also add status codes: F_rrange, F_range_not, and F_utf_not.
Kevin Day [Fri, 16 Oct 2020 01:58:13 +0000 (20:58 -0500)]
Update: provide f_string_lengthss_t and f_string_quantityss_t.
Ensure that array of an array typedefs exist for:
- f_string_length_t
- f_string_quantity_t
The following already exist:
- f_string_range_t
There are some additional structures that this should also have an array of an array for:
- f_string_static_t
- f_string_dynamic_t
- f_string_map_t
- f_string_map_multi_t
But they are more complicated so I will get to them later.
Kevin Day [Thu, 15 Oct 2020 04:29:21 +0000 (23:29 -0500)]
Bugfix: trimming in FSS extended write does not always work.
A boolean is used to designate when the Object has no space at the end.
If this boolean is FALSE, then a space is added before the '{'.
The problem is that the addition of this space happens after trimming.
If trimming is performed, just lie and set the boolean to TRUE to prevent the addition of an (unwanted) space.
Kevin Day [Thu, 15 Oct 2020 02:44:20 +0000 (21:44 -0500)]
Progress: FSS read and write programs.
Use \b (backspace character) instead of \0 (NULL character).
- The bash programs and functions like "echo" automatically strip NULL characters.
- This defeats the purpose of providing these functions for manipulating FSS files using these programs.
Add an ignore range list.
- The pipes represent the start and stop of an ignore range using the \v (vertical tab character).
- Only the FSS-0003 (Extended List) utilize the ignore range.
- This ignore range list provides a simple way to manage nested lists without having to write complex recursive parsers.
- For consistency, all FSS write programs utilize the -I/--ignore parameter, but for the standards that do not support ignore range lists then that parameter is essentially ignored.
- The ignore lists only applies to Content.
Fix bug in the fll_error where the wrong variable is being used (should be printing a newline).
Kevin Day [Wed, 14 Oct 2020 03:53:47 +0000 (22:53 -0500)]
Progress: FSS basic list and extended list.
Move some common and repeated code into private functions.
Be sure to allow and handle whitespace after a valid object close that is being delimited within content.
Begin adding support for nested in the extended list content write.
- The idea here is to have a whitelist of ranges to ignore.
- This offloads the possible complex logic to a higher level.
The basic and extended list level 2 write functions should both accept a single content instead of an array of content.
Rename the fss write functions, appending _string.
- These functions accept a string instead of an appropriate object/content structure.
- I will need to write the functions that accept the appropriate object/content structures to perform the same tasks.
Make the prepend a constant pointer to make it easier to not specify it (no variable needs to be defined, just pass 0).
Kevin Day [Tue, 13 Oct 2020 22:55:04 +0000 (17:55 -0500)]
Feature: add support for trimming FSS Object names for FSS write operations.
I believe it is important for the command line tools to easily cleanup object names in case spaces aren't desired.
This provides the functionality to ensure trimming of spaces before and after the object name.
This further allows for preventing the cleanup behavior done in object writes, such as in FSS-0003 (Extended List) where it is cleaner to have a space between the object name and the brace '{'.
If this is undesired, the function can then be configured to not do this.
This further makes the FSS write functions more consistent with the FSS read functions where object name trimming is already supported.
Kevin Day [Tue, 13 Oct 2020 01:07:50 +0000 (20:07 -0500)]
Progress: FSS write programs.
Add prepend functionality to all write programs.
- for FSS-0000 (Basic) and FSS-0001 (Extended), this does nothing.
- for FSS-0002 (Basic List) and FSS-0003 (Extended List), this prepends the start of multi-line content with some whitespace.
Begin working on the FSS-0003 (Extended List) write functions and programs.
- At this time, the extended list write is only implemented partially.
- I will focus on the recursive aspects later.
Add the "complete" processing to the basic list content (and now extended list content) write functions.
- Includes updates to the newline handling as appropriate.
Kevin Day [Mon, 12 Oct 2020 03:46:06 +0000 (22:46 -0500)]
Update: basic list fixes and cleanups, including some other cleanups.
The EOL handling in FSS Basic List is incorrect/incomplete.
Slashes at the end of an Object must be delimited to avoid escaping the object close character.
Be sure to return an error when a newline is provided in an Object name on basic list object write.
The standard states that controlling character, such as a basic list open, must use ASCII character codes for simplicity and safety.
Therefore, a UTF-8 buffer increment is not necessary.
Use the simpler, more performant C math operator increment.
Cleanup coding strategy in basic list content write to be more consistent with more recent approaches.
Cleanup some comments.
Also cleanup incorrect loop comment in fss_basic.c.
Kevin Day [Fri, 9 Oct 2020 02:59:36 +0000 (21:59 -0500)]
Progress: basic list write, with minor basic list read and extended list read changes.
The basic list object write should only handle escaping slashes when it would be escaped.
Make sure to return an error when a newline is found.
Note that the stop point designates the end of the object so if the end of the object ends in slashes, then these must be escaped.
Perform some cleanups that I felt like doing while working on this.
Kevin Day [Fri, 9 Oct 2020 00:28:11 +0000 (19:28 -0500)]
Cleanup: fix help parameter spacing and add additional information.
The basic list standard does not support quotes.
Leave the quote parameters for consistency between the write programs, but add a note to the help explaining this.
Kevin Day [Thu, 8 Oct 2020 05:05:58 +0000 (00:05 -0500)]
Bugfix: FSS basic list read newline handling needs improvement.
The last newline is not being preserved in the content read.
The *_print_set_* functions end up printing an extra newline.
This behavior is inconsistent and invalid.
Instead, preserve the newlines, which are valid parts of the content.
Then, do not print newlines via *_print_set_*.
The empty list needs to have at least one newline when -e/--empty is passed.
Kevin Day [Wed, 7 Oct 2020 04:11:16 +0000 (23:11 -0500)]
Progress: continue working on FSS read/write programs and related.
Get comment delimitation working in FSS read/write functions.
- Comments are now escaped on read/write as appropriate.
- Rename appropriate private fl_fss functions.
- Add object_as boolean to designate whether or not this function is meant to read an object or content.
- This ends up fixing a bug in the fl_fss_extended read function where a comment character before a content is incorrectly treated as an actual comment (this behavior is not allowed).
- Add similar behavior to the write functions.
- The basic list and especially the extended list may not be complete in this regard.
Do some cleanup in the fss read programs that is related to the changes in this commit.
- There is still room for cleanups but that is not my focus at this time.
Add a -p/--pipe parameter to the FSS read functions to provide a way of returning data in the pipe-friendly format used by the FSS write programs.
Kevin Day [Tue, 6 Oct 2020 04:22:11 +0000 (23:22 -0500)]
Progress: fss write functions and programs.
I reviewed, fixed, and cleaned up the write functions.
I have only partially gotten to the basic list and have not so much as glanced at the extended list.
These two I will start working on later.
Several bugs and problems have been identified and resolved.
Add back the UTF-8 processing.
- This time check the width and add each 8-byte sequence until width is reached to correctly process the UTF-8 character.
Kevin Day [Mon, 5 Oct 2020 02:13:20 +0000 (21:13 -0500)]
Progress: fss write programs and related, including console changes.
Finish updating the fss write programs.
I will sleep on this and then review them later to look for mistakes, oversights, bugs, inconsistencies, and possible cleanups.
Improve the console parameter handling functionality.
The sub-locations need to also have their locations stored.
Cleanup the struct stat file_stat name, renaming it to stat_file for more consistency.
Remove some memsets(), these might be better left to higher level operations.
Assuming I do not change my mind on this later.
Use the word "amount" instead of "length" when the increase/decrease is not the whole length but a fraction.
Reorganize some string functions parameters to be more consistent with the current design practices.
Kevin Day [Sat, 3 Oct 2020 21:43:32 +0000 (16:43 -0500)]
Feature: add -c/--content parameter to FSS read programs.
The default behavior is already a -c/--content.
This provides a literal parameter for good practice and better hackability.
This introduces a new possibility where both -o/--object and -c/--content are specified at the same time.
In this case, print both the object and the content.
It must be noted, however, that this only prints the escaped object and content, just like when -o/--object or -c/--content do already.
The objects in the basic read and extended read are printed with a space between them and their respective content.
The objects in the basic list read and extended list read are printed with an EOL ('\n') between them and their respective content.
Kevin Day [Sat, 3 Oct 2020 03:32:10 +0000 (22:32 -0500)]
Progress: FSS related changes and improvements to console related.
Finish/Fix the basic object write private function.
It seems that I was so hasty to get this wrapped up last night that I missed quite a lot of conditions/cases and logic.
I discovered a case where the FSS basic read function might b incorrect: '"\\"\\\"'.
If the parts inside the single quotes are used as an object, then it should detect that there is no closing quote.
The basic read is not yet fixed, but the basic write should not produce this invalid object.
Minor tweaks to f_console and related console functions.
The f_true and f_false are still being used in the console initialization and should no longer be.
There are some has_additional settings that are set incorrectly.
The console parameter locations and similar should be array locations and not string locations.
Kevin Day [Fri, 2 Oct 2020 04:40:23 +0000 (23:40 -0500)]
Progress: FSS development and other changes.
Work on the FSS Basic and FSS Extended write functions, changing the design strategy.
The FSS Extended Write program needs additional consideration for how to handle multiple content (which may entail changing the logic of FSS Basic Write accordingly as well).
The Basic List and Extended List are currently not worked on but will be.
Use "quote" instead of "quoted".
After review, this makes more sense to me overall.
Fixes of other observed issues, such as missing "_t" in some macros.
Update the FSS documentation, focusing on the FSS Basic and possibly FSS Extended.
Kevin Day [Tue, 29 Sep 2020 02:42:02 +0000 (21:42 -0500)]
Progress: fss write programs synchronize.
Work on making the fss write programs function more similar to how the iki_write program functions.
There needs to be more work done in the fss_basic_list write at level_1, but that is being left to be worked on for another commit.
Looking at the code once again reminds me that the FSS read and write code needs to be reviewed in more depth, but I am going to put that off for now.
The stream read and write functions should also be implemented.
This is just an off the top of my mind implementation and may need to be reviewed at a later date.
Change the existing f_file functions to re-use the existing string structure to avoid the more wasteful memset and memcopy from the static array.
This design now, instead, has a cost of potentially allocating more memory than needed at the size specified by file.size_read.
Continue the print changes.
There is going to need to be work done in regards to how I am reading opening and reading streams.
I started to do this in private-fake.c but then noticed some things that needed review, such as the path.current and path.top.
Kevin Day [Sat, 26 Sep 2020 21:14:52 +0000 (16:14 -0500)]
Security: Incorrect size increase in private_fll_iki_content_partial_escape().
The size increase test is "escaped->used + delimits + 2", but actual arguments passed to the increase function is "delimits".
The "+2" is missing.
This gets caught by the parameter checker when delimits is 0.
When delimits is, say 1, then an insufficient amount of memory is increased.
This will likely result in a segfault.
Kevin Day [Sat, 26 Sep 2020 05:24:14 +0000 (00:24 -0500)]
Progress: wrap up most of the print changes.
This appears to get most of the changes in regards to printing.
There will need to be some testing and reviewing to double check for any mistakes.
(With such a massive set of changes, minor/subtle mistakes are likely.)
I will resume my work on updating and getting the fss write functions to be more like the iki_write in some of the design practices (in terms of program operations, parameter usages, etc..) where applicable.
Kevin Day [Sat, 26 Sep 2020 02:41:52 +0000 (21:41 -0500)]
Update: bzip2 fakefile.
Make sure the bzdiff and bzgrep scripts are copied into the build/ directory.
Redesign the fakefile to be an example of how to use the "operate" section operation.
Kevin Day [Thu, 24 Sep 2020 04:30:16 +0000 (23:30 -0500)]
Progress: print function changes.
After getting byte_dump switched to file descriptors and testing it, I discovered that the unbuffered write has massive performance issues over the buffer writer that is a file stream.
Do some back pedalling and then go down a different route.
Add functions for managing file streams.
Make it possible to have both the descriptor and the stream to give more control at the higher level on when to decide which to use.
There is still much more cleanup, back-pedalling, as well as redesigning the code to (now) use fprintf() over printf() and similar.
Kevin Day [Wed, 23 Sep 2020 04:53:50 +0000 (23:53 -0500)]
Progress: begin overhauling the printing infrastructure.
As part of making the level_3 projects (aka programs) more consistent, I started centralizing the print functions.
This started with status/error handling.
Then one thing led to the next and I ended up deciding to change the behavior to use file descriptors more consistently everywhere in the FLL project.
I also decided to go with the error print structure I original created in the fake program.
Verbosity has been moved into this structure.
The new level_2 project "fll_error" will store the error messages that are shared between the level_3 projects.
Given the size of these changes, I didn't complete the work.
This commit is guaranteed to not compile.
Kevin Day [Mon, 21 Sep 2020 05:19:07 +0000 (00:19 -0500)]
Progress: start getting FSS, as well as other programs, more consistent.
I ended up liking how I made iki_write better than how I made the fss write functions.
Work began to make these more similar and consistent and I stumbled on some other things that need to be centralized.
This would be the verbosity options and parameter decision making.
This includes related changes.
I also noticed that I started working on the "++status" parameter idea but left it very incomplete.
This formalizes the basic plan where I will instead have a "++status_in" and a "++status_out".
This should be very useful for having programs return status codes as well as read those via environment variables given than the status code the Linux code uses reserves the higher order bits for process signals.
It would be too risky and likely buggy to mix my internal status code system with the standard Linux signal/error status code design.
A sting can be read very easily in an environment variable and converted to the appropriate uint16_t digit.
The work in regards to making FSS and other programs more consistent is incompletely and will likely result in uncompilable code with this commit.
Kevin Day [Mon, 21 Sep 2020 02:45:32 +0000 (21:45 -0500)]
Update: move the, now standard, verbosity modes into the f_console project.
The f_console project already provides the parameters matching these modes.
This makes me think that this is the best place to relocate the verbosity modes.
Kevin Day [Mon, 21 Sep 2020 00:55:01 +0000 (19:55 -0500)]
Cleanup: used !x instead of x == 0.
This is a better practice.
While a compiler nowadays might optimize x == 0, it is better practice to use !x to represent the logic and reasoning.
One should always be aware of simple performance optimizations and practices, even if it might just be compiled away, if the readability is not too difficult.
Kevin Day [Sun, 20 Sep 2020 23:40:05 +0000 (18:40 -0500)]
Cleanup: header files structure, *-common.h, and use underscores.
Start using the *-common.h practice to move macro definitions out of header files with function declarations.
The *-common.h files are akin to private-* files in that they are special use or special purpose.
Therefore, the "-" is used.
In all other cases, underscores "_" should be used.
Fix files where dashes "-" were incorrectly used, replacing them with underscores "_".
Kevin Day [Sat, 19 Sep 2020 22:22:49 +0000 (17:22 -0500)]
Bugfix: incorrect macro implementations.
There are some cases where the wrong macro is being used.
The init program needs to be updated to use the "_macro__i" instead of "i" for safety reasons.
Kevin Day [Sat, 19 Sep 2020 22:06:43 +0000 (17:06 -0500)]
Refactor: color management system.
Change the behavior so that fewer arguments are needed for color printing.
This introduces a structure where the color codes are now in sets of "before" and "after".
This set of two color codes are now passed to the color print functions, thereby reducing the number of arguments needed.
Kevin Day [Sat, 19 Sep 2020 04:28:20 +0000 (23:28 -0500)]
Cleanup: add -fdiagnostics-color=always to GCC flags in build settings files.
This forces colors to be enabled.
GCC thinks colors should be disabled when Featureless Make runs it in a shell.
By setting this, the color is forced enabled and error messages become more readable.
Kevin Day [Sat, 19 Sep 2020 03:20:27 +0000 (22:20 -0500)]
Cleanup: add -c/--content for consistency to iki_read.
The -c/--content is the default behavior.
This adds a literal parameter to reflect this.
No new functionality is added other than validation on the -c/--content parameter.
Kevin Day [Sat, 19 Sep 2020 00:37:12 +0000 (19:37 -0500)]
Update: f_file, f_fss, fl_fss, fl_utf, level_3.
f_file:
- Fix some function ordering.
- Do not use "0" to represent closed files, instead use "-1".
- "0" is used for standard input, which treating this as file closed prevents piped data from being read.
f_fss:
- The f_string_range_t should have _t in its macros.
- Updating all related code.
fl_string:
- Fix some function ordering.
- Add fl_string_dynamic_sink_line().
- Rewrite function parameter ordering to have constants on the left and editable pointers on the right.
- While I also like the logical flow of the previous behavior, during my development the practice of separating first by constants and then editable pointers won out.
- Updating all related code.
fl_utf:
- Rewrite function parameter ordering to have constants on the left and editable pointers on the right.
- While I also like the logical flow of the previous behavior, during my development the practice of separating first by constants and then editable pointers won out.
- Updating all related code.
level_3:
- Make f_console_parameter_ids_t and f_console_parameters_t constants, where possible.
More of the project will need reviewing of function parameter ordering.
Kevin Day [Tue, 15 Sep 2020 01:05:03 +0000 (20:05 -0500)]
Update: use *_size_increase() functions, improve logic, and return F_string_too_large.
Use the *_size_increase() functions more.
Anything declared inside of a loop is destroyed at the end of the loop and created at the beginning.
This is an easily avoidable performance concern.
When the max size is reached but allocation is still possible (but at a smaller than requested length) return F_string_too_large without the error bit set.
This is useful for when only 1 unit is needed but the resize is say 4.
In the cases where the resize must exactly match the given length, then treat F_string_too_large without the error bit as if it does have an error bit.
Kevin Day [Fri, 11 Sep 2020 03:32:47 +0000 (22:32 -0500)]
Update: Improve execution functions to use fewer allocations.
While the project is allocation heavy, I do try to avoid allocations where I reasonably can without breaking the design.
In this case, I can see no reason for allocation this memory in this way.
All that needs to be done here is just to point to the existing strings!
Kevin Day [Fri, 11 Sep 2020 03:08:12 +0000 (22:08 -0500)]
Bugfix: featureless make parameter substitution is incorrect.
The "return" code is appearing when the IKI "parameter" is used.
The reserved word check is operating on the wrong variables and is incorrectly injecting itself into the arguments list.
Kevin Day [Fri, 11 Sep 2020 01:57:30 +0000 (20:57 -0500)]
Update: Improve featureless make parameter processing.
Implement a better approach for addressing multiple operations.
For example, one can now (for whatever reason) do "fake clean make clean clean make".
Then the program should operate by running clean, then make, then clean, then clean again, and finally make again.
Kevin Day [Thu, 10 Sep 2020 05:13:05 +0000 (00:13 -0500)]
Progress: featureless make.
Fix refactor mistakes where some dependencies files accidentally had the type suffix '_t' appended in a previous commit.
Re-execute the dependencies script, refreshing all existing dependencies.
Begin adding a new parameter to specific a specific fakefile.
This part is incomplete.
Begin updating how the settings parameter works in regards to how the path to the fakefile is handled.
This part is incomplete.
Add example custom fakefile for the bzip-1.0.8 source.
Fix problems observed while trying to make these changes:
- The build process needs to store stage files per settings file so that multiple different settings may be built.
- The wrong path was accidentally used for loading the fakefile.
- The fake fakefile needs to use 'indexer' now instead of 'linker'.
Note: the fakefile stage files should also behave the same way as the build stage files, but this isn't implemented just yet.
Kevin Day [Thu, 10 Sep 2020 02:39:03 +0000 (21:39 -0500)]
Update: rename f_file_move to f_file_rename, add fll_file_move, and address printf().
The move function should operate as a move would expect, which includes cross-filesystem.
Rename the f_file_move() to f_file_rename() and ensure the limitations are documented.
The fll_file_move() calls f_file_rename() and if that fails due to being across filesystems, then call the appropriate clone and remove functions depending on whether or not the source is a file or directory.
I try to avoid having any output strings in the project that is below level 3 (but level 2 may have exceptions).
Rewrite parts of the directory copy and clone functions to use passed functions instead of directly printing.
Kevin Day [Wed, 9 Sep 2020 04:09:06 +0000 (23:09 -0500)]
Progress: featureless make.
Implement file move functions.
- There will need to be future changes to allow for moving across filesystems.
- This move across filesystems may need to be an fll_file_move() so that it can either do a directory clone or a file clone.
Fix a typo 'perforrm', which should instead be 'perform'.
Kevin Day [Tue, 8 Sep 2020 02:33:51 +0000 (21:33 -0500)]
Update: recursive functions, fix 'const const', don't error on max recurse depth.
Rewrite the fl_directory_* recursive functions, simplifying their design.
Add a max recursion depth.
I have a toleration limit on the number of arguments in a function and this just reached a limit.
Given that many of the parameters can be logically grouped and are also are also passed to other functions, implement a new structure.
While this simply changes where the complexity/problems happen, this does alleviate the number of arguments concerns.
Fix an accidental 'const const' declaration.
Don't error on max recurse depth.
This should just stop recursing for that directory and not generated an error.
Kevin Day [Mon, 7 Sep 2020 05:20:55 +0000 (00:20 -0500)]
Progress: featureless make.
Implement recursive change owner, change groups, and change modes functions.
These are implemented in the fll_file project.
Then utilize these for the recursive owners, groups, and modes section operations.
Fix specification where I forgot to rename "archiver" to "indexer".
In documentation it is "indexer" and not "index" for the indexer program whereas "index" is a section operation name.
Fix documentation where I forgot to rename "archive" to "index".
A bug in fl_directory_list() was discovered where the parameter check for path is incorrect.
Kevin Day [Sun, 6 Sep 2020 22:35:23 +0000 (17:35 -0500)]
Cleanup: rename linker/archiver to indexer in featureless make and tweak bootstrap.sh.
The linker program 'ar' creates an archive which is essentially an index.
By switching the words from linker and archiver to indexer, I believe that I can avoid terminology conflicts.
This avoids conflicting the 'linker' in terms of 'ar' and the 'linker' in terms of 'ln'.
This avoids conflicting the 'archiver' in terms of 'ar' and the 'archiver' in terms of 'bzip2'.
Kevin Day [Sat, 5 Sep 2020 04:59:47 +0000 (23:59 -0500)]
Cleanup: featureless make example bzip2 build data settings files.
The shortcomings have been addressed.
Simplify the example build data settings files by removing unnecessary settings.
This should further emphasize how simply and easy the featureless make build operation can potentially be.
Add simple documentation to the bzip2 example build data setting files.
Kevin Day [Sat, 5 Sep 2020 04:44:45 +0000 (23:44 -0500)]
Feature: featureless make should support custom source paths in data/build/settings.
The standard path is used by the featureless linux library.
If any other project, such as bzip2, has its own directory structure provide a way to more likely support that when using the build operation.
This is not intended to handle all possible cases.
This is only intended to handle simple cases such as with bzip2.
For more complex builds the fakefile and the make operation should instead be used.
This adds a path_standard setting that is a yes/no boolean for designating if/when to follow the standard source path structure or not.
When this is 'yes', then the standard sources path such as 'sources/c/' is used or when -S/--sources is supplied then the path would be 'XXX/c/' when using "-S xxx/" as an example.
When this is 'no', then the sources path specified by a new setting 'path_sources' is used but when -S/--sources is supplied then the path would be 'XXX/' when using "-S xxx/" as an example.
The result of this change moves the "sources/" directory from required to optional.
This directory is no longer checked for during the check required directories process.
The bootstrap.sh script is exclusively intended to be used for compiling the featureless linux library.
Therefore, the 'path_standard' and 'path_sources' are unimplemented within that script (beyond being defined in the variable list).
Kevin Day [Sat, 5 Sep 2020 03:01:06 +0000 (22:01 -0500)]
Bugfix: featureless make should not attempt to link to non-existent library.
When the no library sources are specified then the library is not built.
The problem is that the code is still trying to link against this library that was not built when compiling the static program.
Kevin Day [Sat, 5 Sep 2020 02:10:47 +0000 (21:10 -0500)]
Update: featureless make should not autp-prepend "-D".
Having this does simplify the configuration.
The downside is that it limits the flexibility and requires compiler-specific code to be added and potentially added.
Removing the auto-prepend "-D" will reduce the amount of language or compiler specific code in featureless make.
If another C compiler exists but uses something other than "-D" for defines, then only the settings file need be updated.
Kevin Day [Sat, 5 Sep 2020 01:58:08 +0000 (20:58 -0500)]
Bugfix: fake settings parameter is ignored.
The default value is always being used.
Change the behavior to use the loaded settings that was processed based off of the parameter -s/--settings instead.
Kevin Day [Fri, 4 Sep 2020 04:40:32 +0000 (23:40 -0500)]
Update: Add some example build settings for featureless make for bzip2.
The bzip2 project has a relatively simple and small makefile and does not get updated often.
This makes bzip2 an ideal example of how to build a build settings file.
There are a few shortcomings that I believe I need to address after creating these in the fake project.
These have been documented in the example settings until I can get around to change them.
I would also like to create fakefile examples for bzip2 as well.