beta-0.89.2
[luatex.git] / source / texk / web2c / silent-sh.in
blob94f7814e57fb04b29de43edd76e165592a839cee
1 #! @SHELL@
2 # silent-sh: shell script to invoke tie etc in silent rules.
4 #   Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org>
6 #   This file is free software; the copyright holder
7 #   gives unlimited permission to copy and/or distribute it,
8 #   with or without modifications, as long as this notice is preserved.
10 # Used as, e.g.,
11 #       tex-final.ch: tie$(EXEEXT) $(tex_ch_srcs)
12 #               $(tie) -c $@ $(tex_ch_srcs)
13 # with
14 #       tie = $(tie_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TIE)
15 # and
16 #       tie_silent = @echo "  TIE     " $@; $(SHELL) ./silent-sh $@ #
17 # or
18 #       tie_silent =
20 target=$1; shift
21 eval "$@" >$target.out 2>&1; rc=$?
22 test $rc -eq 0 || cat $target.out
23 rm -f $target.out
25 exit $rc