Hash :
ca41efd3
Author :
Date :
2013-01-10T21:52:18
depend: reduce code duplication, de-uglify make verbose output Verbose output from compilation recipes had been made more messy by the previous "simplifying" commit v1.13.1d-220-g1fa0c24. With this patch, not only we reduce some code duplication, but also improve that output again, for the joy of users who dislike silent-rules :-) * lib/am/depend2.am: Use the new '%XSOURCE%' transform, instead of copying and pasting the idiom for VPATH rewrite emulation over and over. Fix some indentation and line-wrapping issues while at it. * bin/automake.in (handle_languages): Implement the new transform. * t/silent-nested-vars.sh: Adjust to avoid spurious failures. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2013 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
## This file is read several times:
## - once per *extension* (not per language) for generic compilation rules
## - once for each file which requires specific flags.
## Note it is on purpose we wrote "if %AMDEP%", since:
##
## - if deps are turned off, %AMDEP% is mapped onto FALSE, and therefore
## the "if FALSE" chunk is removed (automake-time conditionals).
##
## - if deps are on, %AMDEP% is mapped onto AMDEP, and therefore
## the "if AMDEP" chunk is prefix with @AMDEP_TRUE@ just like for any
## other configure-time conditional.
##
## We do likewise for %FASTDEP%; this expands to an ordinary configure-time
## conditional. %FASTDEP% is used to speed up the common case of building
## a package with gcc 3.x or later. In this case we can skip the use of
## depcomp and easily inline the dependency tracking.
if %?FIRST%
## TODO: rewrite this to avoid extra forks once we can assume a POSIX shell.
am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'`
endif %?FIRST%
if %?NONLIBTOOL%
?GENERIC?%EXT%.o:
?!GENERIC?%OBJ%: %SOURCE%
if %FASTDEP%
%VERBOSE%$(am__set_depbase) && \
%COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% %XSOURCE% && \
$(am__mv) $$depbase.Tpo $$depbase.Po
else !%FASTDEP%
if %AMDEP%
%VERBOSE%source='%SOURCE%' object='$@' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
%VERBOSE-NODEP%%COMPILE% -c -o $@ %SOURCEFLAG% %XSOURCE%
endif !%FASTDEP%
?GENERIC?%EXT%.obj:
?!GENERIC?%OBJOBJ%: %SOURCE%
if %FASTDEP%
%VERBOSE%$(am__set_depbase) && \
%COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% $$($(CYGPATH_W) %XSOURCE%) && \
$(am__mv) $$depbase.Tpo $$depbase.Po
else !%FASTDEP%
if %AMDEP%
%VERBOSE%source='%SOURCE%' object='$@' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
%VERBOSE-NODEP%%COMPILE% -c -o $@ %SOURCEFLAG% $$($(CYGPATH_W) %XSOURCE%)
endif !%FASTDEP%
endif %?NONLIBTOOL%
if %?LIBTOOL%
?GENERIC?%EXT%.lo:
?!GENERIC?%LTOBJ%: %SOURCE%
if %FASTDEP%
%VERBOSE%$(am__set_depbase) && \
%LTCOMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% %XSOURCE% && \
$(am__mv) $$depbase.Tpo $$depbase.Plo
else !%FASTDEP%
if %AMDEP%
%VERBOSE%source='%SOURCE%' object='$@' libtool=yes @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
%VERBOSE-NODEP%%LTCOMPILE% -c -o $@ %SOURCEFLAG% %XSOURCE%
endif !%FASTDEP%
endif %?LIBTOOL%