[RFC PATCH 0/3] rough start on per-target .ONESHELL

2024-11-11 Thread Britton Leo Kerin
If there's interest I'd like to ultimately submit this for inclusion in GNU Make. There's obviously a way to go but I'd appreciate any early feedback. Britton Leo Kerin (3): Add my dev tools Functioning per-target .ONESHELL... File used to test

[RFC PATCH 1/3] Add my dev tools

2024-11-11 Thread Britton Leo Kerin
--- Makefile.am | 9 + src/.cscope_rebuild_commands | 1 + src/myMakeLog.c | 31 +++ src/myMakeLog.h | 12 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 src/.cscope_rebuild_command

[RFC PATCH 2/3] Functioning per-target .ONESHELL...

2024-11-11 Thread Britton Leo Kerin
It just twiddles global one_shell which should obviously be improved. I moved all handling of .ONESHELL from check_special() in read.c to snap_deps(). check_specials() and record_files() both happen before snap_deps(), but the reason given for check_specials() to exists (to prevent a wrong pa

[RFC PATCH 3/3] File used to test things

2024-11-11 Thread Britton Leo Kerin
--- src/Makefile.test_per_target_oneshell | 13 + 1 file changed, 13 insertions(+) create mode 100644 src/Makefile.test_per_target_oneshell diff --git a/src/Makefile.test_per_target_oneshell b/src/Makefile.test_per_target_oneshell new file mode 100644 index ..52980595 --- /d

[RFC PATCH v3 1/1] Support per-target .ONESHELL

2024-11-18 Thread Britton Leo Kerin
.ONESHELL is now handled entirely in snap_deps(). I don't think it ever needs to happen as early as check_specials(), and doing it in snap_deps() is easier and allows a good warning to be given if it's used with a dependency that doesn't end up with a recipe. The per target oneshell flag has been

[RFC PATCH v3 0/1] per-target .ONESHELL support

2024-11-18 Thread Britton Leo Kerin
This is the cleaned up version that has a flag rather than twiddling the global. I think it's all reasonably ready now and if there's any possibility of getting it included I'll add tests and documentation. Britton Leo Kerin (1): Support per-target .ONESHELL src/commands

[RFC PATCH v4 3/3] Tests for .ONESHELL with a prerequisite

2024-12-23 Thread Britton Leo Kerin
--- src/job.c | 22 - tests/scripts/targets/ONESHELL | 848 + 2 files changed, 848 insertions(+), 22 deletions(-) diff --git a/src/job.c b/src/job.c index f0a7f6cb..cd24d290 100644 --- a/src/job.c +++ b/src/job.c @@ -1135,28 +1135,6 @@ free_ch

[RFC PATCH v4 2/3] Support per-target .ONESHELL

2024-12-23 Thread Britton Leo Kerin
--- src/commands.c | 206 ++--- src/commands.h | 18 - src/default.c | 3 + src/file.c | 11 +++ src/filedef.h | 2 + src/job.c | 111 +- src/main.c | 9 ++- src/makeint.h | 2 +- src/read.c | 8

[RFC PATCH v4 1/3] Add my logging setup

2024-12-23 Thread Britton Leo Kerin
--- .gitignore | 2 ++ Makefile.am | 54 +--- cflow.rc | 16 +++ src/.cscope_rebuild_commands | 1 + src/main.c | 5 src/myMakeLog.c | 31 + src

[RFC PATCH v4 0/3] per-target .ONESHELL with shard recipe fix

2024-12-23 Thread Britton Leo Kerin
while considering this patch (obviously the slight remaining dependency on this stuff will be stripped out eventually). Britton Leo Kerin (3): Add my logging setup Support per-target .ONESHELL Tests for .ONESHELL with a prerequisite .gitignore | 2 +