Skip to content

HTTPS clone URL

Subversion checkout URL

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

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.