Enhanced GNU Make - tracing, error reporting, debugging, profiling and more
Switch branches/tags
remake_3_81_branch_start _remake2git_start remake-4.1+dbg-1.1 remake-4.1+dbg-1.0 remake-4.1+dbg-0.91 remake-3.82+dbg-0.9 remake-3.82+dbg-0.8 remake-3.82+dbg-0.7 remake-3.82+dbg-0.4 release_0_62 release_0_61 release_0_60 release_0_5 release_0_4 release_0_3 release_0_2 release_fleet release-remake-4.2.1+dbg1.3 release-remake-4.2.1+dbg-1.4 release-remake-4.1+dbg1.3 release-remake-4.1+dbg1.2 release-remake-4.1+dbg-1.4 release-remake-4.1+dbg-1.2 release-remake-4.1+dbg-1.1 release-remake-3.82+dbg1.0 release-3.82+dbg0.8 release-3.82+dbg-0.9 release-3.82+dbg-0.8 release-3.82+dbg-0.7 release-3.82+dbg-0.4 release-3.81+dbg-0.3 release-3.81+dbg-0.2 release-3.81+dbg-0.1 release-3.81+dbg-0.1-rebased release-0.9 release-0.9+dfsg release-0.6 release-0.5 origin/release-remake-4.2+dbg-1.2 make-release-3.81 make-release-3.80 make-release-3.79 make-4-1 make-3-82 make-3-81 make-3-80 make-3-79 make-3-79-1 make-3-78 make-3-78-92 make-3-78-91 make-3-78-1 make-3-77 make-3-77-94 make-3-77-92 make-3-77-90 make-3-76 make-3-76-1 make-3-75 make-3-75-92 make-3-75-91 make-3-75-1 make-3-74 make-3-74-7 make-3-74-6 make-3-74-5 make-3-74-4 make-3-74-3 make-3-74-2 make-3-74-1 make-3-73 make-3-73-3 make-3-73-2 make-3-73-1 make-3-72 make-3-72-13 make-3-72-12 make-3-72-11 make-3-72-10 make-3-72-9 make-3-72-8 make-3-72-6 make-3-72-5 make-3-72-4 make-3-72-3 make-3-72-2 make-3-71 make-3-71-5 make-3-71-2 make-3-70-4 make-3-70-3 make-3-70-2 libc_1_09 libc-980720 libc-980717 libc-980714 libc-980703 libc-980702 libc-980701 libc-980629
Nothing to show
Clone or download
rocky Correct --help for --verbosity option...
and add patch for Debian Bug #891368
Fixes #39
Latest commit 3d58363 Jul 26, 2018
Permalink
Failed to load latest commit information.
.circleci Try CircleCI 2.0 Jun 25, 2018
config I said: CircleCI: add apt-get update Jan 2, 2018
debugger Small tweaks Aug 25, 2017
doc Grammar typo Jan 2, 2018
glob My best attempt at pure GNU Make 4.2 source Aug 5, 2017
po Remove VMS more Aug 7, 2017
profile 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
rpm 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
tests Two small but important changes... Nov 21, 2017
unittest Small tweaks Aug 25, 2017
w32 Include 4.2.1 changes Aug 21, 2017
.gitignore 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
.travis.yml CircleCI: add apt-get update Jan 2, 2018
AUTHORS My best attempt at pure GNU Make 4.2 source Aug 5, 2017
COPYING * Update to GPLv3 Jul 4, 2007
INSTALL Files from GNU Make 4.1 release. Dec 29, 2014
INSTALL-from-source.md 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
Makefile.am Administrivia Nov 21, 2017
Makefile.ami My best attempt at pure GNU Make 4.2 source Aug 5, 2017
NEWS Update man page and NEWS Nov 21, 2017
NEWS.remake Update NEWS.remake Nov 22, 2017
NMakefile.template distcheck Administrivia Aug 21, 2017
README.DOS.template distcheck Administrivia Aug 21, 2017
README.W32.template distcheck Administrivia Aug 21, 2017
README.customs My best attempt at pure GNU Make 4.2 source Aug 5, 2017
README.git Start testing, Add git administrivia; lint C Aug 5, 2017
README.md options formatting + document new features Nov 21, 2017
README.remake 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
README.template distcheck Administrivia Aug 21, 2017
REMAKE.todo 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
Rakefile 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
SCOPTIONS Initial repository Oct 21, 2008
SMakefile.template distcheck Administrivia Aug 21, 2017
TODO.private Update copyrights for 2010. Jul 13, 2010
acinclude.m4 My best attempt at pure GNU Make 4.2 source Aug 5, 2017
alloc.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
alloca.c Files from GNU Make 4.1 release. Dec 29, 2014
ar.c More VMS removal Aug 26, 2017
arscan.c Remove more VMS and XENIX code Aug 26, 2017
autogen.sh Circle vs Travis Aug 21, 2017
build.template distcheck Administrivia Aug 21, 2017
build_w32.bat My best attempt at pure GNU Make 4.2 source Aug 5, 2017
buildargv.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
buildargv.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
commands.c Remove Amiga more thoroughly Aug 21, 2017
commands.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
config.h.W32.template distcheck Administrivia Aug 21, 2017
configure.ac Correct --help for --verbosity option... Jul 26, 2018
configure.bat My best attempt at pure GNU Make 4.2 source Aug 5, 2017
debug.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
debug.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
debugger.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
default.c Remove Amiga more thoroughly Aug 21, 2017
dep.h Two small but important changes... Nov 21, 2017
dir.c Correct --help for --verbosity option... Jul 26, 2018
dosbuild.bat My best attempt at pure GNU Make 4.2 source Aug 5, 2017
expand.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
expand.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
file.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
file.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
file_basic.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
file_basic.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
filedef.h Two small but important changes... Nov 21, 2017
function.c Start testing, Add git administrivia; lint C Aug 5, 2017
function.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
getloadavg.c My best attempt at pure GNU Make 4.2 source Aug 5, 2017
getopt.c Correct options processing... Aug 21, 2017
getopt.h My best attempt at pure GNU Make 4.2 source Aug 5, 2017
getopt1.c My best attempt at pure GNU Make 4.2 source Aug 5, 2017
gettext.h My best attempt at pure GNU Make 4.2 source Aug 5, 2017
git2cl Do something about the ChangeLog Aug 22, 2017
globals.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
globals.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
gmk-default.h Files from GNU Make 4.1 release. Dec 29, 2014
gmk-default.scm My best attempt at pure GNU Make 4.2 source Aug 5, 2017
gnuremake.h Two small but important changes... Nov 21, 2017
guile.c Two small but important changes... Nov 21, 2017
hash.c Start testing, Add git administrivia; lint C Aug 5, 2017
hash.h Files from GNU Make 4.1 release. Dec 29, 2014
implicit.c My best attempt at pure GNU Make 4.2 source Aug 5, 2017
implicit.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
job.c Simplify by removing morre AMIGA, VMS, EMX, riscos Aug 20, 2017
job.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
load.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
loadapi.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
main.c Correct --help for --verbosity option... Jul 26, 2018
main.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
maintMakefile Adjust CC flags to something CI handle Aug 22, 2017
make.1 Update man page and NEWS Nov 21, 2017
make.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
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 My best attempt at pure GNU Make 4.2 source Aug 5, 2017
makefile.com My best attempt at pure GNU Make 4.2 source Aug 5, 2017
makeint.h Two small but important changes... Nov 21, 2017
misc.c WIP to 4.2.1 fix blank classification... Aug 20, 2017
mock.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
mock.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
os.h My best attempt at pure GNU Make 4.2 source Aug 5, 2017
output.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
output.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
posixos.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
print.c WIP to 4.2.1 fix blank classification... Aug 20, 2017
print.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
profile.c Start testing, Add git administrivia; lint C Aug 5, 2017
profile.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
read.c Remove VMSisms - one was interferring with MSWindows Nov 21, 2017
read.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
remake.c Include 4.2.1 changes Aug 21, 2017
remote-cstms.c My best attempt at pure GNU Make 4.2 source Aug 5, 2017
remote-stub.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
rule.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
rule.h Two small but important changes... Nov 21, 2017
signame.c My best attempt at pure GNU Make 4.2 source Aug 5, 2017
strcache.c macosx Sierra lint Aug 21, 2017
subproc.bat My best attempt at pure GNU Make 4.2 source Aug 5, 2017
trace.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
trace.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
types.h macosx Sierra lint Aug 21, 2017
variable.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
variable.h Two small but important changes... Nov 21, 2017
version.c 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017
vpath.c My best attempt at pure GNU Make 4.2 source Aug 5, 2017
vpath.h 1st cut at make 4.2 patching to get remake 4.2 Aug 5, 2017

README.md

Build Status

Patched GNU Make 4.2.1 sources to add improved error reporting, tracing, target listing, graph visualization, and profiling. It also contains debugger. See branches remake-4-1 and remake-3-82 for patched GNU Make 4.1 and 3.82 respectively

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 # ... add other make options

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

$ remake -X # ... add other make options

If you want to get into the debugger only after an error is encountered use --post-mortem:

$ remake --post-mortem # ... add 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 from a tarball:

$ ./configure && make && make check && sudo make install

To build from git, run first:

$ $SHELL ./autogen.sh

Profiling and Visualization

To profile and get a graph of targets encountered use 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 where there are a couple of demos listed and https://github.com/rocky/remake/blob/master/profile/README.md for infomation on how to profile a "make" run.