From 36ab67dfd37c5db64f8ab3b3f29126492b350d76 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Fri, 24 May 2024 16:31:36 -0700 Subject: [PATCH] fix Makefile bugs, improve make help quick_www www, status.html formation Fixed errors in `1991/davidguy/Makefile`, `2000/bmeyer/Makefile` and `2012/kang/Makefile` where a multi-line `CSILENCE` make variable was not properly continued onto the next line. Improve the output of `make quick_www` and `make www` no be less verbose and more informative. Doing this allowed us to uncover some bugs in the above mentioned entry Makefiles. The `make quick_www` and `make www` no longer perform a `make gen_status`. The `make gen_top_html` rule, via `bin/gen-top-html.sh` will form `status.html` based solely on the contents of `status.md`. Only the `make gen_status` rule will modify `status.md` if needed, and then rebuild `status.html` if needed. The `status.html` file was updated to reflect the common way that `make gen_top_html` forms this file. The `make timestamp` performs a `make gen_top_html` after running `make gen_status` so that the resulting `status.html` file matches what `make quick_www` and `make www` would produce. Changed `bin/gen-top-html.sh` VERSION from "1.4.5 2024-05-19" to "1.4.6 2024-05-24" to perform the above. Improved the text written by `make help`. Added "for $TOOL" to the debug output of `bin/all-run.sh` to help identify the tool performing the action. Changed `bin/all-run.sh` VERSION from "1.3.3 2024-04-13" to "1.3.4 2024-05-24" to perform the above. Moved `make gen_other_html` after `make entry_index` and after the `make quick_entry_index` in `make quick_www` and `make www`. Perform `make quick_www` to perform the above and test under macOS. Perform `make www` to perform the above and test under macOS. --- 1991/davidguy/Makefile | 2 +- 2000/bmeyer/Makefile | 2 +- 2012/kang/Makefile | 4 +- Makefile | 123 +++++++++++++++++++++++++++-------------- bin/all-run.sh | 6 +- bin/gen-top-html.sh | 3 +- status.html | 10 ++-- 7 files changed, 96 insertions(+), 54 deletions(-) diff --git a/1991/davidguy/Makefile b/1991/davidguy/Makefile index 99f4ed42a..50254524a 100644 --- a/1991/davidguy/Makefile +++ b/1991/davidguy/Makefile @@ -43,7 +43,7 @@ CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declarat -Wno-deprecated-non-prototype -Wno-implicit-int \ -Wno-deprecated-declarations -Wno-incompatible-pointer-types \ -Wno-maybe-uninitialized -Wno-misleading-indentation \ - -Wno-missing-parameter-type -Wno-parentheses -Wno-strict-aliasing + -Wno-missing-parameter-type -Wno-parentheses -Wno-strict-aliasing \ -Wno-unused-value # Common C compiler warning flags diff --git a/2000/bmeyer/Makefile b/2000/bmeyer/Makefile index d04981a3f..383059731 100644 --- a/2000/bmeyer/Makefile +++ b/2000/bmeyer/Makefile @@ -39,7 +39,7 @@ include ../../var.mk # Common C compiler warnings to silence # CSILENCE= -Wno-format -Wno-parentheses -Wno-string-plus-int \ - -Wno-strict-prototypes -Wno-int-in-bool-context + -Wno-strict-prototypes -Wno-int-in-bool-context \ -Wno-misleading-indentation # Common C compiler warning flags diff --git a/2012/kang/Makefile b/2012/kang/Makefile index 0e1fca55e..dfabec179 100644 --- a/2012/kang/Makefile +++ b/2012/kang/Makefile @@ -38,8 +38,8 @@ include ../../var.mk # Common C compiler warnings to silence # -CSILENCE= -Wno-bitwise-op-parentheses -Wno-error - -Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error \ + -Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion \ -Wno-pointer-to-int-cast -Wno-deprecated-non-prototype # Common C compiler warning flags diff --git a/Makefile b/Makefile index 68520fd45..b319eb677 100644 --- a/Makefile +++ b/Makefile @@ -179,7 +179,6 @@ diff_orig_alt: done @echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-=' -# diff alt and orig diff_alt_orig: @echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-=' @-for i in ${YEARS}; do \ @@ -259,34 +258,58 @@ indent.c: # here! # help: - @echo "make genpath - form top level .top, YYYY level .year and winner .path files" - @echo "make genfilelist - generate YYYY level .filelist" - @echo "make verify_entry_files - check to be sure all files in all entries exist" - @echo "make sort_gitignore - sort .gitignore files according to rules in bin/sgi.sh" - @echo "make gen_authors - generate the top level authors.html page" - @echo "make gen_location - generate the top level location.html page" - @echo "make gen_years - generate the top level years.html page" - @echo "make entry_index - force the build of ALL winner index.html files" - @echo "make gen_other_html - build entry HTML files from markdown other than README.md" - @echo "make gen_year_index - generate year level index.html files using the" - @echo "make gen_top_html - generate a number of the top level HTML files from markdown" - @echo "make gen_status - generate status.json and status.html" - @echo "make quick_entry_index - build winner index.html files that might be out of date" - @echo "make find_missing_links - find markdown links to missing local files" - @echo "make quick_www - generate html files more quickly, checking timestamps" - @echo "make www - build html pages for web site" + @echo '# Rules for those who wish to expore the winning IOCCC entries:' @echo - @echo "make untar_entry_tarball - untar all entry tarballs" - @echo "make untar_year_tarball - untar all year level tarballs" + @echo 'make clobber - Remove all temprary, compiled and constructed files from all winning IOCCC entries' + @echo 'make all - Compile all winning IOCCC entries' @echo - @echo "make form_entry_tarball - form all entry compressed tarballs" - @echo "make form_year_tarball - form all IOCCC year level compressed tarballs" - @echo "make tar - build all tarballs" + @echo 'make alt - Compile all alternative executables for winning IOCCC entries' + @echo 'make everything - make all and make alt' @echo - @echo "make gen_sitemap - generate the XML sitemap" - @echo "make timestamp - generate things with timestamps (status, sitemap etc.)" + @echo 'make diff_orig_prog - diff original source and current source' + @echo 'make diff_prog_orig - diff current source and original source' @echo - @echo "make update - update everything on the web site" + @echo 'make diff_alt_prog - diff alternative source and current source' + @echo 'make diff_prog_alt - diff current source and alternative source' + @echo + @echo 'make diff_alt_orig - diff alternative source and original source' + @echo 'make diff_orig_alt - diff original source and alternative source' + @echo + @echo '# Rules for building a local copy of the IOCCC web site:' + @echo + @echo 'make genpath - form top level .top, YYYY level .year and winner .path files' + @echo 'make genfilelist - generate YYYY level .filelist' + @echo 'make verify_entry_files - check to be sure all files in all entries exist' + @echo 'make sort_gitignore - sort .gitignore files according to rules in bin/sgi.sh' + @echo 'make gen_authors - generate the top level authors.html page' + @echo 'make gen_location - generate the top level location.html page' + @echo 'make gen_years - generate the top level years.html page' + @echo 'make entry_index - force the build of ALL winner index.html files' + @echo 'make gen_other_html - build entry HTML files from markdown other than README.md' + @echo 'make gen_year_index - generate year level index.html files using the' + @echo 'make gen_top_html - generate a number of the top level HTML files from markdown' + @echo 'make quick_entry_index - build winner index.html files that might be out of date' + @echo 'make find_missing_links - find markdown links to missing local files' + @echo + @echo '# Compound make rules for building a local copy of the IOCCC web site:' + @echo + @echo 'make quick_www - generate html files more quickly, checking timestamps' + @echo 'make www - build html pages for web site' + @echo + @echo '# Rules that are useful only for those IOCCC judges who mainain the official IOCCC web site:' + @echo + @echo 'make untar_entry_tarball - untar all entry tarballs' + @echo 'make untar_year_tarball - untar all year level tarballs' + @echo + @echo 'make form_entry_tarball - form all entry compressed tarballs' + @echo 'make form_year_tarball - form all IOCCC year level compressed tarballs' + @echo 'make tar - build all tarballs' + @echo + @echo 'make gen_status - generate status.json and status.html' + @echo 'make gen_sitemap - generate the XML sitemap' + @echo 'make timestamp - generate things with timestamps (status, sitemap etc.)' + @echo + @echo 'make update - update everything in a local copy of the web site' # form the top level .top, YYYY level .year and winner level .path files # @@ -302,7 +325,6 @@ genpath: done @-if ${CMP} -s .tmp.genpath .top; then \ ${RM} -f .tmp.genpath; \ - echo ".top already up to date"; \ else \ ${MV} -f .tmp.genpath .top; \ ${CHMOD} 0444 .top; \ @@ -323,7 +345,6 @@ genfilelist: ${SORT} -f -d -u > "$$i/.genfilelist.tmp"; \ if ${CMP} -s "$$i/.genfilelist.tmp" "$$i/.filelist"; then \ ${RM} -f "$$i/.genfilelist.tmp"; \ - echo "$$i/.filelist already up to date"; \ else \ ${MV} -f "$$i/.genfilelist.tmp" "$$i/.filelist"; \ ${CHMOD} 0444 "$$i/.filelist"; \ @@ -336,14 +357,14 @@ genfilelist: # verify_entry_files: ${ALL_RUN} ${CHK_ENTRY} @echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-=' - ${ALL_RUN} -v 3 ${CHK_ENTRY} + ${ALL_RUN} -v 1 ${CHK_ENTRY} @echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-=' # sort .gitignore files according to rules in bin/sgi.sh # sort_gitignore: ${ALL_RUN} ${SORT_GITIGNORE} @echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-=' - ${ALL_RUN} -v 3 ${SORT_GITIGNORE} -v 1 + ${ALL_RUN} -v 1 ${SORT_GITIGNORE} -v 1 @echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-=' # generate the top level authors.html page using the @@ -452,9 +473,15 @@ find_missing_links: # Well, short of pushing changes to the GitHub repo, that is. :-) # quick_www: - @echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-=' - ${MAKE} clobber - ${MAKE} genpath + @echo '=-=-=-=-=-= IOCCC begin make $@ =-=-=-=-=-=' + @echo '=-=-=-=-= IOCCC begin make clobber =-=-=-=-=' + @echo '... hiding verbose output on stdout ...' + @${MAKE} clobber >/dev/null + @echo '=-=-=-=-= IOCCC complete make clobber =-=-=-=-=' + @echo '=-=-=-=-= IOCCC begin make genpath =-=-=-=-=' + @echo '... hiding verbose output on stdout ...' + @${MAKE} genpath >/dev/null + @echo '=-=-=-=-= IOCCC complete make genpath =-=-=-=-=' ${MAKE} genfilelist ${MAKE} verify_entry_files ${MAKE} sort_gitignore @@ -462,21 +489,34 @@ quick_www: ${MAKE} gen_location ${MAKE} gen_years ${MAKE} gen_year_index - ${MAKE} gen_other_html ${MAKE} gen_top_html - ${MAKE} gen_status ${MAKE} quick_entry_index + ${MAKE} gen_other_html ${MAKE} find_missing_links - @echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-=' + @echo '=-=-=-=-=-= IOCCC complete make $@ =-=-=-=-=-=' + +foo: + @echo '=-=-=-=-=-= IOCCC begin make $@ =-=-=-=-=-=' + @echo '=-=-=-=-= IOCCC begin make sort_gitignore =-=-=-=-=' + @echo '... hiding verbose output on stdout ...' + @${MAKE} sort_gitignore >/dev/null + @echo '=-=-=-=-= IOCCC complete make sort_gitignore =-=-=-=-=' + @echo '=-=-=-=-=-= IOCCC complete make $@ =-=-=-=-=-=' # do everything needed to build HTML content for the web site # # Well, short of pushing changes to the GitHub repo, that is. :-) # www: - @echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-=' - ${MAKE} clobber - ${MAKE} genpath + @echo '=-=-=-=-=-= IOCCC begin make $@ =-=-=-=-=-=' + @echo '=-=-=-=-= IOCCC begin make clobber =-=-=-=-=' + @echo '... hiding verbose output on stdout ...' + @${MAKE} clobber >/dev/null + @echo '=-=-=-=-= IOCCC complete make clobber =-=-=-=-=' + @echo '=-=-=-=-= IOCCC begin make genpath =-=-=-=-=' + @echo '... hiding verbose output on stdout ...' + @${MAKE} genpath >/dev/null + @echo '=-=-=-=-= IOCCC complete make genpath =-=-=-=-=' ${MAKE} genfilelist ${MAKE} verify_entry_files ${MAKE} sort_gitignore @@ -484,12 +524,11 @@ www: ${MAKE} gen_location ${MAKE} gen_years ${MAKE} gen_year_index - ${MAKE} gen_other_html ${MAKE} gen_top_html - ${MAKE} gen_status ${MAKE} entry_index + ${MAKE} gen_other_html ${MAKE} find_missing_links - @echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-=' + @echo '=-=-=-=-=-= IOCCC complete make $@ =-=-=-=-=-=' # untar all entry tarballs # @@ -537,6 +576,7 @@ tar: # gen_status: ${GEN_STATUS} @echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-=' + ${MAKE} gen_top_html ${GEN_STATUS} -v 1 @echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-=' @@ -552,6 +592,7 @@ gen_sitemap sitemap: ${GEN_SITEMAP} timestamp: @echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-=' ${MAKE} gen_status + ${MAKE} gen_top_html ${MAKE} gen_sitemap @echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-=' diff --git a/bin/all-run.sh b/bin/all-run.sh index 3b30c5eb7..a2d4dbb09 100755 --- a/bin/all-run.sh +++ b/bin/all-run.sh @@ -113,7 +113,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an # set variables referenced in the usage message # -export VERSION="1.3.3 2024-04-13" +export VERSION="1.3.4 2024-05-24" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -446,7 +446,7 @@ for YYYY in $(< "$TOP_FILE"); do # debug YYYY # if [[ $V_FLAG -ge 1 ]]; then - echo "$0: debug[1]: starting to process year: $YYYY" 1>&2 + echo "$0: debug[1]: for $TOOL: starting to process year: $YYYY" 1>&2 fi # verify that YYYY is a readable directory @@ -506,7 +506,7 @@ for YYYY in $(< "$TOP_FILE"); do # debug YYYY # if [[ $V_FLAG -ge 3 ]]; then - echo "$0: debug[3]: starting to process year/dir: $YYYY_DIR" 1>&2 + echo "$0: debug[3]: for $TOOL: starting to process year/dir: $YYYY_DIR" 1>&2 fi # parse YYYY_DIR diff --git a/bin/gen-top-html.sh b/bin/gen-top-html.sh index 5e8b3c80c..531aee028 100755 --- a/bin/gen-top-html.sh +++ b/bin/gen-top-html.sh @@ -93,7 +93,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an # set variables referenced in the usage message # -export VERSION="1.4.5 2024-05-19" +export VERSION="1.4.6 2024-05-24" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -135,6 +135,7 @@ TOP_MD_SET+=("next/README") TOP_MD_SET+=("next/guidelines") TOP_MD_SET+=("next/rules") TOP_MD_SET+=("nojs-menu") +TOP_MD_SET+=("status") TOP_MD_SET+=("thanks-for-help") declare -ag TOP_MD_SELECT_SET # diff --git a/status.html b/status.html index bb3dc5fcd..9c3c4adb6 100644 --- a/status.html +++ b/status.html @@ -25,14 +25,14 @@ - - + + - - - + + +