From b1d818382c5e753f829a35471a1db4c6a45e1134 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sat, 31 Jul 2010 14:16:15 +0200 Subject: [PATCH] Add more hints for debugging make rules. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * doc/automake.texi (Debugging Make Rules): Show command to find out expanded values of variables; point to makefile debugger. * THANKS: Update. Prompted by suggestion from Ludovic Courtès and Andy Wingo. Signed-off-by: Ralf Wildenhues --- ChangeLog | 8 ++++++++ THANKS | 2 ++ doc/automake.texi | 11 +++++++++++ 3 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index cf028ddcb..0ea44a499 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-07-31 Ralf Wildenhues + + Add more hints for debugging make rules. + * doc/automake.texi (Debugging Make Rules): Show command to find + out expanded values of variables; point to makefile debugger. + * THANKS: Update. + Prompted by suggestion from Ludovic Courtès and Andy Wingo. + 2010-07-27 Patrick Welche (tiny change) Fix typo in the manual. diff --git a/THANKS b/THANKS index fe91cbe2d..b3ceae652 100644 --- a/THANKS +++ b/THANKS @@ -22,6 +22,7 @@ Andreas Schwab schwab@suse.de Andrew Cagney cagney@tpgi.com.au Andrew Suffield asuffield@debian.org Andris Pavenis pavenis@lanet.lv +Andy Wingo wingo@pobox.com Angus Leeming a.leeming@ic.ac.uk Anthony Green green@cygnus.com Antonio Diaz Diaz ant_diaz@teleline.es @@ -193,6 +194,7 @@ Laurent Morichetti laurentm@cup.hp.com Leo Davis ldavis@fonix.com Leonardo Boiko leoboiko@conectiva.com.br Loulou Pouchet loulou@lrde.epita.fr +Ludovic Courtès ludo@gnu.org Luo Yi luoyi.ly@gmail.com Maciej Stachowiak mstachow@mit.edu Maciej W. Rozycki macro@ds2.pg.gda.pl diff --git a/doc/automake.texi b/doc/automake.texi index 0fd233b70..7484a763e 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -11671,6 +11671,17 @@ prerequisites for the @file{Makefile} file itself even with @option{-n} @code{make SHELL="/bin/bash -vx"} can help debug complex rules. @xref{The Make Macro SHELL,,, autoconf, The Autoconf Manual}, for some portability quirks associated with this construct. +@item +@code{echo 'print: ; @@echo "$(VAR)"' | make -f Makefile -f - print} +can be handy to examine the expanded value of variables. You may need +to use a target other than @samp{print} if that is already used or a +file with that name exists. +@item +@url{http://bashdb.sourceforge.net/@/remake/} provides a modified +GNU @command{make} command called @command{remake} that copes with +complex GNU @command{make}-specific Makefiles and allows to trace +execution, examine variables, and call rules interactively, much like +a debugger. @end itemize -- 2.47.2