Skip to content

Commit

Permalink
Merge pull request #987 from xexyl/is_available-sh
Browse files Browse the repository at this point in the history
Bug fix prep.sh, use is_available.sh in Makefiles
  • Loading branch information
lcn2 authored Sep 30, 2024
2 parents 2ecb131 + a06ade3 commit 7e96dd0
Show file tree
Hide file tree
Showing 13 changed files with 233 additions and 104 deletions.
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Major changes to the IOCCC entry toolkit

## Release 1.5.21 2024-09-30

Bug fix `prep.sh` wrt skipped messages, and indent URL of each tool.

Make use of `is_available.sh` in the Makefiles.

Synced `jparse` from [jparse repo](https://github.com/xexyl/jparse/) with the
above changes to do with the jparse repo.


## Release 1.5.20 2024-09-29

Sync `jparse` from [jparse repo](https://github.com/xexyl/jparse/). This
includes a new JSON file with some details about it as well as some fixes in the
README.md file (newer synopsis of some tools) as well as a couple functions
added.

## Release 1.5.19 2024-09-27

Add `FOO_BASENAME` to all tools in this repo. This is used in both `-V` option
Expand Down
27 changes: 14 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ GIT= git
GREP= grep
INDEPEND= independ
INSTALL= install
IS_AVAILABLE= soup/is_available.sh
MV= mv
PICKY= picky
RM= rm
Expand Down Expand Up @@ -792,8 +793,8 @@ seqcexit: ${ALL_CSRC} dbg/Makefile dyn_array/Makefile jparse/Makefile \
LD_DIR="${LD_DIR}" LD_DIR2="${LD_DIR2}"
${E} ${MAKE} ${MAKE_CD_Q} -C soup $@ C_SPECIAL="${C_SPECIAL}"
${E} ${MAKE} ${MAKE_CD_Q} -C test_ioccc $@ C_SPECIAL="${C_SPECIAL}"
${Q} if ! type -P ${SEQCEXIT} >/dev/null 2>&1; then \
echo 'The ${SEQCEXIT} tool could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${SEQCEXIT} >/dev/null 2>&1; then \
echo 'The ${SEQCEXIT} tool could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${SEQCEXIT} tool is required for the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${SEQCEXIT}:'; 1>&2; \
Expand All @@ -819,8 +820,8 @@ picky: ${ALL_SRC} dbg/Makefile dyn_array/Makefile jparse/Makefile \
LD_DIR="${LD_DIR}" LD_DIR2="${LD_DIR2}"
${E} ${MAKE} ${MAKE_CD_Q} -C soup $@ C_SPECIAL="${C_SPECIAL}"
${E} ${MAKE} ${MAKE_CD_Q} -C test_ioccc $@ C_SPECIAL="${C_SPECIAL}"
${Q} if ! type -P ${PICKY} >/dev/null 2>&1; then \
echo 'The ${PICKY} tool could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${PICKY} >/dev/null 2>&1; then \
echo 'The ${PICKY} tool could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${PICKY} tool is required for the $@ rule.' 1>&2; \
echo 1>&2; \
echo 'See the following GitHub repo for ${PICKY}:'; 1>&2; \
Expand Down Expand Up @@ -860,8 +861,8 @@ shellcheck: ${SH_FILES} .shellcheckrc dbg/Makefile dyn_array/Makefile jparse/Mak
LD_DIR="${LD_DIR}" LD_DIR2="${LD_DIR2}"
${E} ${MAKE} ${MAKE_CD_Q} -C soup $@ C_SPECIAL="${C_SPECIAL}"
${E} ${MAKE} ${MAKE_CD_Q} -C test_ioccc $@ C_SPECIAL="${C_SPECIAL}"
${Q} if ! type -P ${SHELLCHECK} >/dev/null 2>&1; then \
echo 'The ${SHELLCHECK} command could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${SHELLCHECK} >/dev/null 2>&1; then \
echo 'The ${SHELLCHECK} command could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${SHELLCHECK} command is required to run the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${SHELLCHECK}:'; 1>&2; \
Expand Down Expand Up @@ -931,7 +932,7 @@ tags: ${ALL_CSRC} ${ALL_HSRC} dbg/Makefile dyn_array/Makefile jparse/Makefile \
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${S} echo
${Q} if ! type -P ${CTAGS} >/dev/null 2>&1; then \
${Q} if ! ${IS_AVAILABLE} ${CTAGS} >/dev/null 2>&1; then \
echo 'The ${CTAGS} command could not be found.' 1>&2; \
echo 'The ${CTAGS} command is required to run the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
Expand Down Expand Up @@ -961,7 +962,7 @@ local_dir_tags: ${ALL_CSRC} ${ALL_HSRC}
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${S} echo
${Q} if ! type -P ${CTAGS} >/dev/null 2>&1; then \
${Q} if ! ${IS_AVAILABLE} ${CTAGS} >/dev/null 2>&1; then \
echo 'The ${CTAGS} command could not be found.' 1>&2; \
echo 'The ${CTAGS} command is required to run the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
Expand Down Expand Up @@ -1684,22 +1685,22 @@ depend: ${ALL_CSRC}
LD_DIR="${LD_DIR}" LD_DIR2="${LD_DIR2}"
${E} ${MAKE} ${MAKE_CD_Q} -C test_ioccc $@ C_SPECIAL="${C_SPECIAL}"
${E} ${MAKE} ${MAKE_CD_Q} -C soup $@ C_SPECIAL="${C_SPECIAL}"
${Q} if ! type -P ${INDEPEND} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${INDEPEND} command could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${INDEPEND} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${INDEPEND} command could not be found or is unreliable in your system.' 1>&2; \
echo '${OUR_NAME}: The ${INDEPEND} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${INDEPEND}:'; 1>&2; \
echo ''; 1>&2; \
echo ' https://github.com/lcn2/independ'; 1>&2; \
elif ! type -P ${SED} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${SED} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${SED} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${SED} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
elif ! type -P ${GREP} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${GREP} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${GREP} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${GREP} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
elif ! type -P ${CMP} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${CMP} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${CMP} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${CMP} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
Expand Down
2 changes: 2 additions & 0 deletions jparse/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
build.log
.DS_Store
._.DS_Store
/backup
/bug-report*
/.jsemcgen.*.out
/.local.dir.tags
Expand All @@ -20,6 +21,7 @@ build.log
/jparse.lex.h
/jparse.tab.c
/jparse.tab.h
/jparse_test.log
/jprint
/jsemtblgen
/jstrdecode
Expand Down
6 changes: 6 additions & 0 deletions jparse/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Significant changes in the JSON parser repo

## Release 1.0.17 2024-09-30

Make use of `test_jparse/is_available.sh` in the Makefiles and in
`test_jparse/prep.sh` script.


## Release 1.0.16 2024-09-29

Add a couple functions to `json_utf8.c` for UTF-8 encoding/decoding. These
Expand Down
29 changes: 15 additions & 14 deletions jparse/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ CTAGS= ctags
GREP= grep
INDEPEND= independ
INSTALL= install
IS_AVAILABLE= test_jparse/is_available.sh
MV= mv
PICKY= picky
RANLIB= ranlib
Expand Down Expand Up @@ -863,8 +864,8 @@ seqcexit: ${FLEXFILES} ${BISONFILES} ${ALL_CSRC} test_jparse/Makefile
${S} echo
${E} ${MAKE} ${MAKE_CD_Q} -C test_jparse all $@ C_SPECIAL=${C_SPECIAL} \
LD_DIR2="${LD_DIR2}"
${Q} if ! type -P ${SEQCEXIT} >/dev/null 2>&1; then \
echo 'The ${SEQCEXIT} tool could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${SEQCEXIT} >/dev/null 2>&1; then \
echo 'The ${SEQCEXIT} tool could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${SEQCEXIT} tool is required for the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${SEQCEXIT}:'; 1>&2; \
Expand All @@ -890,8 +891,8 @@ picky: ${ALL_SRC} test_jparse/Makefile
${S} echo
${E} ${MAKE} ${MAKE_CD_Q} -C test_jparse all $@ C_SPECIAL=${C_SPECIAL} \
LD_DIR2="${LD_DIR2}"
${Q} if ! type -P ${PICKY} >/dev/null 2>&1; then \
echo 'The ${PICKY} tool could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${PICKY} >/dev/null 2>&1; then \
echo 'The ${PICKY} tool could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${PICKY} tool is required for the $@ rule.' 1>&2; \
echo 1>&2; \
echo 'See the following GitHub repo for ${PICKY}:'; 1>&2; \
Expand Down Expand Up @@ -928,8 +929,8 @@ shellcheck: ${SH_FILES} .shellcheckrc test_jparse/Makefile
${S} echo
${E} ${MAKE} ${MAKE_CD_Q} -C test_jparse all $@ C_SPECIAL=${C_SPECIAL} \
LD_DIR2="${LD_DIR2}"
${Q} if ! type -P ${SHELLCHECK} >/dev/null 2>&1; then \
echo 'The ${SHELLCHECK} command could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${SHELLCHECK} >/dev/null 2>&1; then \
echo 'The ${SHELLCHECK} command could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${SHELLCHECK} command is required to run the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${SHELLCHECK}:'; 1>&2; \
Expand Down Expand Up @@ -958,7 +959,7 @@ check_man: ${ALL_MAN_TARGETS}
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${S} echo
${Q} if ! type -P ${CHECKNR} >/dev/null 2>&1; then \
${Q} if ! ${IS_AVAILABLE} ${CHECKNR} >/dev/null 2>&1; then \
echo 'The ${CHECKNR} command could not be found.' 1>&2; \
echo 'The ${CHECKNR} command is required to run the $@ rule.' 1>&2; \
echo ''; 1>&2; \
Expand Down Expand Up @@ -1001,7 +1002,7 @@ tags:
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${S} echo
${Q} if ! type -P ${CTAGS} >/dev/null 2>&1; then \
${Q} if ! ${IS_AVAILABLE} ${CTAGS} >/dev/null 2>&1; then \
echo 'The ${CTAGS} command could not be found.' 1>&2; \
echo 'The ${CTAGS} command is required to run the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
Expand Down Expand Up @@ -1033,7 +1034,7 @@ local_dir_tags: ${ALL_CSRC} ${ALL_HSRC}
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${S} echo
${Q} if ! type -P ${CTAGS} >/dev/null 2>&1; then \
${Q} if ! ${IS_AVAILABLE} ${CTAGS} >/dev/null 2>&1; then \
echo 'The ${CTAGS} command could not be found.' 1>&2; \
echo 'The ${CTAGS} command is required to run the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
Expand Down Expand Up @@ -1220,22 +1221,22 @@ depend: ${ALL_CSRC}
LD_DIR2="${LD_DIR2}"
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${Q} if ! type -P ${INDEPEND} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${INDEPEND} command could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${INDEPEND} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${INDEPEND} command could not be found or is unreliable in your system.' 1>&2; \
echo '${OUR_NAME}: The ${INDEPEND} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${INDEPEND}:'; 1>&2; \
echo ''; 1>&2; \
echo ' https://github.com/lcn2/independ'; 1>&2; \
elif ! type -P ${SED} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${SED} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${SED} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${SED} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
elif ! type -P ${GREP} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${GREP} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${GREP} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${GREP} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
elif ! type -P ${CMP} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${CMP} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${CMP} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${CMP} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
Expand Down
23 changes: 12 additions & 11 deletions jparse/test_jparse/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ CTAGS= ctags
GREP= grep
INDEPEND= independ
INSTALL= install
IS_AVAILABLE= ./is_available.sh
PICKY= picky
RM= rm
SED= sed
Expand Down Expand Up @@ -477,8 +478,8 @@ seqcexit: ${ALL_CSRC}
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${S} echo
${Q} if ! type -P ${SEQCEXIT} >/dev/null 2>&1; then \
echo 'The ${SEQCEXIT} tool could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${SEQCEXIT} >/dev/null 2>&1; then \
echo 'The ${SEQCEXIT} tool could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${SEQCEXIT} tool is required for the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${SEQCEXIT}:'; 1>&2; \
Expand All @@ -501,8 +502,8 @@ picky: ${ALL_SRC}
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${S} echo
${Q} if ! type -P ${PICKY} >/dev/null 2>&1; then \
echo 'The ${PICKY} tool could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${PICKY} >/dev/null 2>&1; then \
echo 'The ${PICKY} tool could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${PICKY} tool is required for the $@ rule.' 1>&2; \
echo 1>&2; \
echo 'See the following GitHub repo for ${PICKY}:'; 1>&2; \
Expand Down Expand Up @@ -537,8 +538,8 @@ shellcheck: ${SH_FILES} .shellcheckrc
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${S} echo
${Q} if ! type -P ${SHELLCHECK} >/dev/null 2>&1; then \
echo 'The ${SHELLCHECK} command could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${SHELLCHECK} >/dev/null 2>&1; then \
echo 'The ${SHELLCHECK} command could not be found or is unreliable in your system.' 1>&2; \
echo 'The ${SHELLCHECK} command is required to run the $@ rule.'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${SHELLCHECK}:'; 1>&2; \
Expand Down Expand Up @@ -706,22 +707,22 @@ uninstall:
depend: ${ALL_CSRC}
${S} echo
${S} echo "${OUR_NAME}: make $@ starting"
${Q} if ! type -P ${INDEPEND} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${INDEPEND} command could not be found.' 1>&2; \
${Q} if ! ${IS_AVAILABLE} ${INDEPEND} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${INDEPEND} command could not be found or is unreliable in your system.' 1>&2; \
echo '${OUR_NAME}: The ${INDEPEND} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
echo 'See the following GitHub repo for ${INDEPEND}:'; 1>&2; \
echo ''; 1>&2; \
echo ' https://github.com/lcn2/independ'; 1>&2; \
elif ! type -P ${SED} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${SED} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${SED} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${SED} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
elif ! type -P ${GREP} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${GREP} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${GREP} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${GREP} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
elif ! type -P ${CMP} >/dev/null 2>&1; then \
elif ! ${IS_AVAILABLE} ${CMP} >/dev/null 2>&1; then \
echo '${OUR_NAME}: The ${CMP} command could not be found.' 1>&2; \
echo '${OUR_NAME}: The ${CMP} command is required to run the $@ rule'; 1>&2; \
echo ''; 1>&2; \
Expand Down
Loading

0 comments on commit 7e96dd0

Please sign in to comment.