| 1 |
#! @SHELL@ |
| 2 |
# silent-sh: shell script to invoke tie etc in silent rules. |
| 3 |
# $Id: silent-sh.in 73613 2025-01-27 22:01:50Z karl $ |
| 4 |
# |
| 5 |
# Copyright 2015-2025 Karl Berry <[email protected]> |
| 6 |
# Copyright 2012-2015 Peter Breitenlohner <[email protected]> |
| 7 |
# |
| 8 |
# This file is free software; the copyright holder |
| 9 |
# gives unlimited permission to copy and/or distribute it, |
| 10 |
# with or without modifications, as long as this notice is preserved. |
| 11 |
# |
| 12 |
# Used as, e.g., |
| 13 |
# tex-final.ch: tie$(EXEEXT) $(tex_ch_srcs) |
| 14 |
# $(tie) -c $@ $(tex_ch_srcs) || { rm -f $@; exit 1; } |
| 15 |
# with |
| 16 |
# tie = $(tie_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TIE) |
| 17 |
# and |
| 18 |
# tie_silent = @echo " TIE " $@; $(SHELL) ./silent-sh $@ # |
| 19 |
# or |
| 20 |
# tie_silent = |
| 21 |
|
| 22 |
target=$1; shift |
| 23 |
eval "$@" >$target.out 2>&1; rc=$? |
| 24 |
test $rc -eq 0 || cat $target.out |
| 25 |
rm -f $target.out |
| 26 |
|
| 27 |
exit $rc |