12408.1.11
by Jonathan Lange
Move the snakefood stuff to a different directory, it's hardly core competency. |
1 |
LIB_DIR=../../lib |
2 |
||
3 |
default: lp-clustered.svg |
|
4 |
||
5 |
# Generate import dependency graph
|
|
6 |
lp.sfood: |
|
7 |
sfood -i -u -I $(LIB_DIR)/sqlobject -I $(LIB_DIR)/schoolbell \ |
|
8 |
-I $(LIB_DIR)/devscripts -I $(LIB_DIR)/contrib \ |
|
9 |
-I $(LIB_DIR)/canonical/not-used $(LIB_DIR)/canonical \ |
|
10 |
$(LIB_DIR)/lp 2>/dev/null | grep -v contrib/ \ |
|
11 |
| grep -v sqlobject | grep -v BeautifulSoup | grep -v psycopg \ |
|
12408.1.12
by Jonathan Lange
Clean up |
12 |
| grep -v schoolbell | grep -v '/tests/' | grep -v '/ftests/' \ |
13 |
| grep -v 'canonical/config' > lp.sfood.tmp |
|
12408.1.11
by Jonathan Lange
Move the snakefood stuff to a different directory, it's hardly core competency. |
14 |
mv lp.sfood.tmp lp.sfood |
15 |
||
16 |
||
17 |
# Cluster the import dependency graph
|
|
18 |
lp-clustered.sfood: lp.sfood lp-sfood-packages |
|
19 |
sfood-cluster -f lp-sfood-packages < lp.sfood > lp-clustered.sfood.tmp |
|
20 |
mv lp-clustered.sfood.tmp lp-clustered.sfood |
|
21 |
||
22 |
||
23 |
# Build the visual graph
|
|
24 |
lp-clustered.dot: lp-clustered.sfood |
|
25 |
sfood-graph -p < lp-clustered.sfood > lp-clustered.dot.tmp |
|
26 |
mv lp-clustered.dot.tmp lp-clustered.dot |
|
27 |
||
28 |
||
29 |
# Render to svg
|
|
30 |
lp-clustered.svg: lp-clustered.dot |
|
31 |
dot -Tsvg < lp-clustered.dot > lp-clustered.svg.tmp |
|
32 |
mv lp-clustered.svg.tmp lp-clustered.svg |
|
33 |
||
34 |
clean: |
|
35 |
$(RM) -f lp.sfood lp-clustered.sfood lp-clustered.dot lp-clustered.svg |
|
36 |
||
37 |
||
38 |
.PHONY: clean |