-
Notifications
You must be signed in to change notification settings - Fork 63
/
Makefile
50 lines (41 loc) · 1.81 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
prefix = /usr/local
bindir = $(prefix)/bin
sharedir = $(prefix)/share
docdir = $(sharedir)/doc
pkgdocdir = $(sharedir)/makefile2graph
mandir = $(sharedir)/man
man1dir = $(mandir)/man1
bin_PROGRAMS = make2graph
bin_SCRIPTS = makefile2graph
pkgdoc_DATA = LICENSE README.md screenshot.png
man1_MANS = make2graph.1 makefile2graph.1
CFLAGS ?= -O3 -Wall
.PHONY: all clean install uninstall test
.DELETE_ON_ERROR:
all: $(bin_PROGRAMS)
clean:
rm -f $(bin_PROGRAMS)
install:
install -d $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdocdir) $(DESTDIR)$(man1dir)
install $(bin_PROGRAMS) $(bin_SCRIPTS) $(DESTDIR)$(bindir)
install $(pkgdoc_DATA) $(DESTDIR)$(pkgdocdir)
install $(man1_MANS) $(DESTDIR)$(man1dir)
uninstall:
for item in $(bin_PROGRAMS); do rm $(DESTDIR)$(bindir)/$${item}; done
for item in $(bin_SCRIPTS); do rm $(DESTDIR)$(bindir)/$${item}; done
for item in $(pkgdoc_DATA); do rm $(DESTDIR)$(pkgdocdir)/$${item}; done
for item in $(man1_MANS); do rm $(DESTDIR)$(man1dir)/$${item}; done
test: all
$(MAKE) -Bnd | ./make2graph | dot
$(MAKE) -Bnd | ./make2graph --format x
$(MAKE) -Bnd | ./make2graph --format m
$(MAKE) -Bnd | ./make2graph --format l
$(MAKE) -Bnd | ./make2graph --format e
$(MAKE) -Bnd | ./make2graph --root
$(MAKE) -Bnd | ./make2graph -c puor9 -d color=pink | dot
$(MAKE) -Bnd | ./make2graph -g bgcolor=lightsalmon -n colorscheme=paired9,style=filled,fillcolor=1 -e style=filled,fillcolor=3,color=blue | dot
$(MAKE) -Bnd | ./make2graph -d color=pink | dot
$(MAKE) -Bnd | ./make2graph --format m -g "fill:#80ed99" -n "fill:#f4e285" -e "stroke:#00afb9,stroke-width:4px" -d "fill:#e27396"
$(MAKE) -Bnd | ./make2graph --format p -g "skinparam BackgroundColor LightYellow" -n "BackgroundColor Peru" -e "skinparam ArrowColor Blue" -d "BackgroundColor Salmon"
PATH=.:$(PATH) ./makefile2graph
PATH=.:$(PATH) ./makefile2graph -B