star-ty

Generate content for online publication
git clone git://git.meso-star.fr/star-ty.git
Log | Files | Refs | README | LICENSE

commit e0148804681f4f95746ced80da58d7ae9a83ee8d
parent 08fd0cef728cc9b2074bd1c035439ef3927cce23
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri,  3 Oct 2025 19:33:04 +0200

The hook's makefile targets fail if the hook fails

So that invoking the make command returns an error to help the caller
diagnose that a problem has occurred.

Diffstat:
Msrc/sty-hooks | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sty-hooks b/src/sty-hooks @@ -114,8 +114,8 @@ printf '%s\n' "${hook}" | while read -r i; do # in order to enforce its execution during the build call. printf '%s: %s %s\n' "${tgt}" "${i}" "${dep}" printf ' @cd -- %s; ' "${section}" - printf "\$(SHELL) %s > \$\${OLDPWD}/\$@ || rm -f \$\${OLDPWD}/\$@\n" \ - "${hook}" + printf "\$(SHELL) %s > \$\${OLDPWD}/\$@ " "${hook}" + printf "|| { rm -f \$\${OLDPWD}/\$@; exit 1; } \n" # Set the target for cleaning files generated by executing the hook. # Run it on "distclean" and not on "clean", as their generation can be