use yet even more bin/jval-wrapper.sh instead of direct grep of JSON files

We use the `bin/jval-wrapper.sh` tool to obtain information from JSON
files instead of attempting using a "GROSS HACK" that involved using
`grep(1)` (and friends) as those "GROSS HACK"s assumed that the layout of
the JSON was canonical.  The `bin/jval-wrapper.sh` tool is able to deal
with various layouts of JSON including non-canonical layouts.  Moreover,
by using the `bin/jval-wrapper.sh` tool we greatly reduce the places in
bin tools that contain "GROSS HACK"s.

Adjusted `bin/gen-status.sh` to use `bin/jval-wrapper.sh`.

Changed `bin/gen-status.sh` VERSION from "1.5.8 2024-08-05"
to "1.6 2024-08-17".

Performed `make gen_status` to test the above under macOS.

Adjusted `bin/gen-years.sh` to use `bin/jval-wrapper.sh`.

Changed `bin/gen-years.sh` VERSION from "1.3.7 2024-08-05"
to "1.4 2024-08-17".

Performed `make gen_years` to test the above under macOS.

Adjusted `bin/output-index-author.sh` to use `bin/jval-wrapper.sh`.

Changed `bin/output-index-author.sh` VERSION from "1.7.3 2024-08-05"
to "1.8 2024-08-17".

Performed `make entry_index` to test the above under macOS.

Added `make quick_year_index` to generate year level index.html files
when year level `YYYY/README.md` is newer.

The `make quick_www` calls `quick_year_index` instead of `make gen_year_index`.

The `bin` directory is now sat as `BIN_PATH=$TOPDIR/bin`, where
`$TOPDIR` is determined by top of the git repo (as determined by
the command: `git rev-parse --is-inside-work-tree`) and potentially
modified by `-d topdir`.  After `cd $TOPDIR`, we set `BIN_DIR=bin`.

All tools from this repo are now assumed to under "$BIN_DIR".  Removed
command like options such as `-T md2html.sh`, and `-p tool` that used
to be able to change the location of a `bin` tool.

Changed `bin/gen-authors.sh` VERSION from "1.11 2024-08-13"
to "1.12 2024-08-18".

Changed `bin/gen-location.sh` VERSION from "1.5 2024-08-17"
to "1.6 2024-08-18".

Changed `bin/readme2index.sh` VERSION from "1.2.7 2024-08-05"
to "1.3 2024-08-17".

Modified `bin/all-run.sh` to use the `bin` directory mechanism.
Modified `bin/all-years.sh` to use the `bin` directory mechanism.
Modified `bin/gen-other-html.sh` to use the `bin` directory mechanism.
Modified `bin/gen-year-index.sh` to use the `bin` directory mechanism.
Modified `bin/md2html.sh` to use the `bin` directory mechanism.
Modified `bin/quick-readme2index.sh` to use the `bin` directory mechanism.
Modified `bin/readme2index.sh` to use the `bin` directory mechanism.

Changed `bin/all-run.sh` VERSION from "1.3.6 2024-08-05"
to "1.4 2024-08-17".

Changed `bin/all-years.sh` VERSION from "1.0.5 2024-08-05"
to "1.1 2024-08-17".

Changed `bin/gen-other-html.sh` VERSION from "1.3 2024-08-11"
to "1.4 2024-08-17".

Changed `bin/gen-year-index.sh` VERSION from "1.1.2 2024-08-05"
to "1.2 2024-08-17".

Changed `bin/quick-readme2index.sh` VERSION from "1.1.7 2024-08-05"
to "1.2 2024-08-17".

Changed `bin/md2html.sh` VERSION from "1.5.5 2024-08-05"
to "1.6 2024-08-17".

Added some whitespace in the form of empty lines to tools.

Made checks for tools under `bin` directory more consistent.

When using `-Q` (quick mode) and the prerequisite files are newer,
we force the target to be touched so that a later run will not
have to build the target HTML file.

Performed `make quick_www` to test the above under macOS.

Performed `make www` to test the above under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-08-18 02:10:25 -07:00
1 parent f159369a0a
commit 0e5864b8b0
39 files changed
+1694 -795

No files matched your search

+13 -2
View File
@@ -303,7 +303,7 @@ indent.c:
.PHONY: help genpath genfilelist verify_entry_files gen_authors quick_authors \
gen_location quick_location gen_years find_missing_links test entry_index gen_top_html \
thanks gen_other_html quick_other_html quick_entry_index \
gen_year_index quick_www www untar_entry_tarball untar_year_tarball \
gen_year_index quick_year_index quick_www www untar_entry_tarball untar_year_tarball \
form_entry_tarball form_year_tarball tar gen_status gen_sitemap \
sitemap timestamp update csv2entry entry2csv
@@ -344,6 +344,7 @@ help:
@echo 'make gen_other_html ;: build entry HTML files from markdown other than README.md'
@echo 'make quick_other_html ;: build entry non-index.html files that might be out of date'
@echo 'make gen_year_index ;: generate year level index.html files using from README.md files'
@echo 'make quick_year_index ;: generate year level index.html when year level README.md is newer'
@echo 'make gen_top_html ;: generate a number of the top level HTML files from markdown'
@echo 'make gen_next ;: generate the HTML files in next/'
@echo 'make quick_entry_index ;: build winner index.html files that might be out of date'
@@ -551,6 +552,16 @@ gen_year_index: ${ALL_YEARS} ${GEN_YEAR_INDEX}
${ALL_YEARS} -v 1 ${GEN_YEAR_INDEX} -v 1
@echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-='
# generate year level index.html files when year level README.md is newer
#
# generate year level index.html files using the
# ${GEN_YEAR_INDEX} tool (bin/gen-year-index.sh).
#
quick_year_index: ${ALL_YEARS} ${GEN_YEAR_INDEX}
@echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-='
${ALL_YEARS} -v 1 -Q ${GEN_YEAR_INDEX} -v 1
@echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-='
# build winner index.html files that might be out of date
#
# This rule uses the ${QUICK_README2INDEX} tool
@@ -690,7 +701,7 @@ quick_www:
${MAKE} quick_authors
${MAKE} quick_location
${MAKE} gen_years
${MAKE} gen_year_index
${MAKE} quick_year_index
${MAKE} gen_top_html
${MAKE} quick_entry_index
${MAKE} quick_other_html