X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=scripts%2Fpatch-quiet.sh;h=d0b44ed85540c26b46757dea90fdaaeef466840c;hb=ca354a4d7389a1858c59f62b26e3de3edb34e3f2;hp=c25a8333c61295b03f4108113d62c7659ada40d5;hpb=af8b0632805c1d8ccdcb13ce84f6a4ab890eae5e;p=mono.git diff --git a/scripts/patch-quiet.sh b/scripts/patch-quiet.sh index c25a8333c61..d0b44ed8554 100755 --- a/scripts/patch-quiet.sh +++ b/scripts/patch-quiet.sh @@ -11,17 +11,29 @@ fi src=$1 +if head -n1 $src | grep -q '# Postprocessed with patch-quiet\.sh'; then + # already handled + exit 0 +fi + +echo "# Postprocessed with patch-quiet.sh" > $src.tmp && cat $src >> $src.tmp && cp $src.tmp $src && rm -f $src.tmp + # compile -sed -e 's/^\t$(COMPILE)/\t$(if $(V),,@echo -e "CC\t$@";) $(COMPILE)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp -sed -e 's/^\t$(LTCOMPILE)/\t$(if $(V),,@echo -e "CC\t$@";) $(LTCOMPILE)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +sed -e 's/^\t\(if \)\?$(COMPILE)/\t$(if $(V),,@echo -e "CC\\t$@";) \1$(COMPILE)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +sed -e 's/^\t\(if \)\?$(LTCOMPILE)/\t$(if $(V),,@echo -e "CC\\t$@";) \1$(LTCOMPILE)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +sed -e 's/^\t\(if \)\?$(LTCXXCOMPILE)/\t$(if $(V),,@echo -e "CC\\t$@";) \1$(LTCXXCOMPILE)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp # link -sed -e 's/LINK = $(LIBTOOL)/LINK = \t$(if $(V),,@echo -e "LD\t$@";) $(LIBTOOL)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +# automake defines multiple symbols ending with LINK +sed -e 's/^\t$(\(.*LINK\))/\t$(if $(V),,@echo -e "LD\\t$@";) $(\1)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +#sed -e 's/LINK = $(LIBTOOL)/LINK = $(if $(V),,@echo -e "LD\\t$@";) $(LIBTOOL)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp # CC -sed -e 's/^\t$(CC)/\t$(if $(V),,@echo -e "CC \t$@";) $(CC)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +sed -e 's/^\t\(if \)\?$(CC)/\t$(if $(V),,@echo -e "CC\\t$@";) \1$(CC)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp # mv -sed -e 's/\tmv -f/\t$(if $(V),,@)mv -f/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +sed -e 's/^\tmv -f/\t$(if $(V),,@)mv -f/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +sed -e 's/^am__mv = /&$(if $(V),,@)/' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp # libtool messages -sed -e 's/\$(LIBTOOL)/$(LIBTOOL) --quiet/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp +sed -e 's/\$(LIBTOOL)/$(LIBTOOL) $(if $(V),,--quiet)/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp + +# This causes this script to be rerun if Makefile.am changes +sed -e 's/am__depfiles_maybe = depfiles/& quiet/g' < $src > $src.tmp && cp $src.tmp $src && rm -f $src.tmp -# FIXME: libtool message which is not silenced by --quiet: -# $echo "copying selected object files to avoid basename conflicts..." \ No newline at end of file