Container to create Makefile dependency graphs.
204
This repository contains a (most likely bloated) dockerfile and script to create a dependency graph for a Makefile. It uses https://github.com/lindenb/makefile2graph to create a .dot and .png of the dependency graph.
I'm using docker so that I don't have to stuff around having dependencies on my main machine for something that I may only use rarely. It also means that creating the dependency graph will be portable.
Firstly, make sure you have docker installed (https://www.docker.com/community-edition). You can then either pull down the image from dockerhub:
$ docker pull stevelane/makedeps-graph
or you can use the Makefile in this repository to build the container yourself:
$ make
As a nice side-effect of using make to build the container, you'll get a dependency graph of the Makefile for this repo:

Once you have the container use one of the following two commands to create the graph, depending on how you got the container.
If you pulled the container from dockerhub:
$ docker run -v $(pwd):/tmp/graph stevelane/makedeps-graph
If you built the container from the dockerfile in this repo:
$ docker run -v $(pwd):/tmp/graph makedeps-graph
You'll notice here that I mount the project directory - this is to make sure that the Makefile is available for the container to process.
Content type
Image
Digest
Size
156.7 MB
Last updated
almost 9 years ago
docker pull stevelane/makedeps-graph