depgrapher

command module
v0.0.0-...-6023aa6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2016 License: MPL-2.0 Imports: 6 Imported by: 0

README

depgrapher GoDoc

A simple command-line utility to generate dependency graphs from Makefiles written in Go. Also contains a complete, ready-to-use graph implementation in package graph.

Installation

go get github.com/SimplicityApks/depgrapher

or clone repo and run

go build

Usage

depgrapher [-syntax syntaxname] [-node startname] [-outfile filename.dot|stdout] [file...]

syntaxname has to be one of {Makefile, MakeCall, Dot} or a complete definition of a new syntax (see package syntax for more information).

The optional startname restricts the output to the dependency graph of only the given node, instead of the whole graph.

If the outfile parameter is set, the graph will be printed in Graphviz dot syntax instead of a visual representation. To get a nice graphical representation, you can pipe the output into Graphviz like so:
depgrapher -outfile stdout ... | dot -Tpng > picturename.png

Example

Suppose you have the following Makefile:

all: build install test

build: prepare compile pack

The command
depgrapher -syntax=Makefile Makefile
will produce the following output:

                  all                  
              /           \       \
             V             V       V
         build           install  test 
      /      |     \
     V       V      V
 prepare  compile  pack

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package graph contains the graph data structure to represent dependency graphs.
Package graph contains the graph data structure to represent dependency graphs.
Package syntax contains the syntax for reading and writing graphs to files.
Package syntax contains the syntax for reading and writing graphs to files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL