Skip to content
Enhanced GNU Make - tracing, error reporting, debugging, profiling and more
C Groff Perl Makefile Batchfile DIGITAL Command Language Other
Find file
Failed to load latest commit information.
config Setup for unittests and add our first (lame) test. Jun 5, 2015
debian In the main branch we don't need up_texi_fixes Jun 28, 2014
debugger Save and show breakoint mask Oct 7, 2015
doc More aggressive doc elimination Jun 14, 2015
glob Files from GNU Make 4.1 release. Dec 28, 2014
htdocs Give process id in output line when jobs != 1. Sep 23, 2011
packaging Give process id in output line when jobs != 1. Sep 23, 2011
po Update POTFILES.in for new sources. Travis 3rd try Dec 28, 2014
profile Wrong URL for location of callgrind format Jun 5, 2015
tests Add shell input/output separator chevrons with --trace/-x. Redo options Dec 31, 2014
unittest Setup for unittests and add our first (lame) test. Jun 5, 2015
w32 Files from GNU Make 4.1 release. Dec 29, 2014
.cvsignore Changes from Ralf Wildenhues. Aug 1, 2009
.gitignore Setup for unittests and add our first (lame) test. Jun 5, 2015
.purify * Fix memory leaks, fd leaks, and some long-standing bugs recognizing… Jul 20, 1999
.travis.yml Try using travis container architecture Oct 8, 2015
AUTHORS Files from GNU Make 4.1 release. Dec 29, 2014
COPYING * Update to GPLv3 Jul 4, 2007
ChangeLog.1 Update copyright years. Oct 25, 2009
ChangeLog.2 * Update to GPLv3 Jul 4, 2007
INSTALL Files from GNU Make 4.1 release. Dec 29, 2014
Makefile.am One more target comment Oct 7, 2015
Makefile.ami Files from GNU Make 4.1 release. Dec 29, 2014
NEWS Get ready for release remake-4.1+dbg-1.1 Jun 23, 2015
NEWS.remake Get ready for release remake-4.1+dbg-1.1 Jun 23, 2015
NMakefile.template - Many fixup patches from Savannah. Jul 19, 2010
README.Amiga Files from GNU Make 4.1 release. Dec 29, 2014
README.VMS Files from GNU Make 4.1 release. Dec 29, 2014
README.customs Files from GNU Make 4.1 release. Dec 29, 2014
README.md Remove gitter link. Jun 5, 2015
README.remake Update misc docs. Mar 25, 2011
README.template Remove OS-specific build files that we don't support. Mar 13, 2012
REMAKE.todo Add debugger code and get it to compile. It has not been hook into Mar 21, 2011
Rakefile Get ready for release. Jun 9, 2011
SCOPTIONS Initial repository Oct 20, 2008
SMakefile.template Update copyrights for 2010. Jul 13, 2010
TODO.private Update copyrights for 2010. Jul 13, 2010
acinclude.m4 Files from GNU Make 4.1 release. Dec 29, 2014
alloc.c Break up files so we can compose and test pieces of it. May 28, 2015
alloca.c Files from GNU Make 4.1 release. Dec 29, 2014
amiga.c Files from GNU Make 4.1 release. Dec 29, 2014
amiga.h Files from GNU Make 4.1 release. Dec 29, 2014
ar.c Files from GNU Make 4.1 release. Dec 29, 2014
arscan.c Files from GNU Make 4.1 release. Dec 29, 2014
build.template Update copyrights for 2010. Jul 13, 2010
build_w32.bat Files from GNU Make 4.1 release. Dec 29, 2014
buildargv.c Debugger files now compile with warnings, but without error. And we s… Mar 21, 2011
buildargv.h Debugger files now compile with warnings, but without error. And we s… Mar 21, 2011
commands.c Fix expand option of debugger "target" command Jul 16, 2015
commands.h Closer to having --tasks --targets and tracing working. (Not there ye… Dec 29, 2014
configure.ac Get ready for release remake-4.1+dbg-1.1 Jun 23, 2015
configure.bat Files from GNU Make 4.1 release. Dec 29, 2014
debug.c More global variable separation for modularity May 28, 2015
debug.h debug.c is now included and compiles. Move things out of main.c that … Dec 28, 2014
debugger.h More global variable separation for modularity May 28, 2015
default.c Files from GNU Make 4.1 release. Dec 29, 2014
dep.h remake --tasks and remake --targets now works, modulo possible bugs. Dec 29, 2014
dir.c Files from GNU Make 4.1 release. Dec 29, 2014
dosbuild.bat Files from GNU Make 4.1 release. Dec 29, 2014
expand.c Start adding target stack parameter so we can track it. We stubbed en… Dec 29, 2014
expand.h Start parsing remake trace/debugger options Mar 21, 2011
file.c GNU Make bug in enumeration values? Jul 16, 2015
file.h Closer to having --tasks --targets and tracing working. (Not there ye… Dec 29, 2014
file_basic.c Small changes/clean-ups May 30, 2015
file_basic.h Small changes/clean-ups May 30, 2015
filedef.h Bang on profiling more. May 29, 2015
function.c Get ready for the first 4.1 release. Dec 31, 2014
function.h Reduce compile warnings Mar 21, 2011
getloadavg.c Files from GNU Make 4.1 release. Dec 29, 2014
getopt.c Squelch some FreeBSD clang warnings Dec 31, 2014
getopt.h Files from GNU Make 4.1 release. Dec 29, 2014
getopt1.c Files from GNU Make 4.1 release. Dec 29, 2014
gettext.h Files from GNU Make 4.1 release. Dec 29, 2014
globals.c Add --profile option to produce callgrind-style data. May 29, 2015
globals.h Add --profile option to produce callgrind-style data. May 29, 2015
gmk-default.h Files from GNU Make 4.1 release. Dec 29, 2014
gmk-default.scm Files from GNU Make 4.1 release. Dec 29, 2014
gnumake.h trace.c now compiles and is added to final result. Add some (most?) o… Dec 28, 2014
guile.c Files from GNU Make 4.1 release. Dec 29, 2014
hash.c Files from GNU Make 4.1 release. Dec 29, 2014
hash.h Files from GNU Make 4.1 release. Dec 29, 2014
implicit.c Files from GNU Make 4.1 release. Dec 29, 2014
implicit.h Header for implicit C file Apr 18, 2011
job.c debugger quit command was not leaving recursive make. Issue #24 Jul 19, 2015
job.h Start adding target stack parameter so we can track it. We stubbed en… Dec 29, 2014
load.c Files from GNU Make 4.1 release. Dec 29, 2014
loadapi.c Files from GNU Make 4.1 release. Dec 29, 2014
main.c Remove remnant of future REMAKEFLAGS Jul 26, 2015
main.h More global variable separation for modularity May 28, 2015
maintMakefile Track that changes in GNU without which "make update" would fail. Jan 13, 2012
make.1 Files from GNU Make 4.1 release. Dec 29, 2014
make.h Add --profile option to produce callgrind-style data. May 29, 2015
make.lnk Files from GNU Make 4.1 release. Dec 29, 2014
make_msvc_net2003.sln Initial repository Oct 21, 2008
make_msvc_net2003.vcproj Files from GNU Make 4.1 release. Dec 29, 2014
makefile.com Files from GNU Make 4.1 release. Dec 29, 2014
makefile.vms Files from GNU Make 4.1 release. Dec 29, 2014
makeint.h More global variable separation for modularity May 28, 2015
misc.c More global variable separation for modularity May 28, 2015
mock.c More global variable separation for modularity May 28, 2015
mock.h Break up files so we can compose and test pieces of it. May 28, 2015
output.c More global variable separation for modularity May 28, 2015
output.h trace.c now compiles and is added to final result. Add some (most?) o… Dec 29, 2014
prepare_w32.bat - Fixed a bug reported by Michael Matz regarding handling of parallel Aug 8, 2005
print.c Finish adding call stack pops. Bump version. Start using fatal_err() … Dec 30, 2014
print.h Finish adding call stack pops. Bump version. Start using fatal_err() … Dec 31, 2014
profile.c Small typos Jun 5, 2015
profile.h Add summary line, termination status May 30, 2015
read.c More global variable separation for modularity May 28, 2015
read.h Break up files so we can compose and test pieces of it. May 28, 2015
readme.vms Fix botched profile hashing Jun 3, 2015
remake.c Add summary line, termination status May 30, 2015
remote-cstms.c Files from GNU Make 4.1 release. Dec 29, 2014
remote-stub.c More global variable separation for modularity May 28, 2015
rule.c Merge floc_t into gmk_loc Dec 29, 2014
rule.h Merge floc_t into gmk_loc Dec 29, 2014
signame.c Files from GNU Make 4.1 release. Dec 29, 2014
strcache.c Files from GNU Make 4.1 release. Dec 29, 2014
subproc.bat Files from GNU Make 4.1 release. Dec 29, 2014
trace.c Merge floc_t into gmk_loc Dec 29, 2014
trace.h Merge floc_t into gmk_loc Dec 29, 2014
types.h Merge floc_t into gmk_loc Dec 29, 2014
variable.c remake --tasks and remake --targets now works, modulo possible bugs. Dec 29, 2014
variable.h remake --tasks and remake --targets now works, modulo possible bugs. Dec 29, 2014
version.c Break up files so we can compose and test pieces of it. May 28, 2015
vmsdir.h Files from GNU Make 4.1 release. Dec 29, 2014
vmsfunctions.c Files from GNU Make 4.1 release. Dec 29, 2014
vmsify.c Files from GNU Make 4.1 release. Dec 29, 2014
vmsjobs.c Files from GNU Make 4.1 release. Dec 29, 2014
vpath.c Files from GNU Make 4.1 release. Dec 29, 2014
vpath.h Start parsing remake trace/debugger options Mar 21, 2011

README.md

Build Status

Patched GNU Make 4.1 sources to add improved error reporting, tracing, target listing, graph visualization, and profiling. It also contains debugger. See the remake-3-82 branch for a patched GNU Make 3.82.

Tracing and Debugging

Although there's a full debugger here, most of the time I can get by using no options since normal output is a little more verbose and detailed. When that isn't enough, I use the --trace or -x option, e.g:

remake -x <other make options>

But if you want the full debugger, use --debugger or -X:

remake -X <other make options>

To enter the debugger from inside a Makefile, use the built-in function $(debugger). For example here is a Makefile:

all:
    $(debugger 'arg not used')
    echo Nothing here, move along

When GNU Make is inside the all target, it will make a call to the debugger. The string after debugger is not used, but seems to be needed to get parsing right.

Getting Makefile Information

If there is project that you want a list of "interesting" Makefile targets, try:

remake --tasks

If the project has commented its Makefile using remake-friendly comments you may get output like this:

ChangeLog   # create ChangeLog fom git log via git2cl
build   # Do what it takes to build software locally
check   # Run all tests
clean   # Remove OS- and platform-specific derived files.
dist    # Create source and binary distribution
distclean   # Remove all derived files. Like "clean" on steroids.
install # Install package
test    # Same as check

To get a list of all targets, interesting or not, use --targets instead of --tasks.

To build:

$ autoreconf -i
$ ./configure
$ make update
$ make && make check && sudo make install

Profiling and Visualization

To profile and get a graph of targets encountered used the --profile option. For example:

remake --profile # target...

remake outputs callgrind profile format data which can be used with kcachegrind or other tools that work with this format.

See also

See also https://github.com/rocky/remake/wiki and https://github.com/rocky/remake/blob/master/profile/README.md

Something went wrong with that request. Please try again.