| 1 |
# |
| 2 |
# Generator for on-line documentation. |
| 3 |
# |
| 4 |
# Required tools: cc, dot, awk, ksh, yacc, gs, python. |
| 5 |
# dot is used in mkarrows.sh, mkshapes.sh, mkstyles.sh, mktapers.sh, mksplines.sh |
| 6 |
# ps_to_png.sh and other make rules rely on netpbm tools. |
| 7 |
# |
| 8 |
# Install python modules with: |
| 9 |
# $ pip install --user -r requirements.txt |
| 10 |
# |
| 11 |
# python is used to run: |
| 12 |
# - jconvert.py, which converts the json schema graphviz_json_schema.json to html. |
| 13 |
# This also relies on the python package json2html. |
| 14 |
# |
| 15 |
# The main products are web pages. |
| 16 |
# |
| 17 |
# The files listed after each give the main data files used to |
| 18 |
# generate the page. |
| 19 |
# |
| 20 |
# If shapelist is extended, add entry to SGIF. |
| 21 |
|
| 22 |
INSTALL = cp |
| 23 |
INSTALL_DIR = ../info |
| 24 |
|
| 25 |
XGIF = forward.gif back.gif both.gif nohead.gif |
| 26 |
|
| 27 |
MGIF = constraint.gif record.gif fill.gif round.gif \ |
| 28 |
mrecord.gif colorlist.gif record2.gif fixed.gif tee.gif |
| 29 |
|
| 30 |
GRADPNG = g_lin0.png g_wlin0.png g_rad0.png g_lin45.png g_wlin45.png g_rad45.png g_lin90.png g_wlin90.png g_rad90.png \ |
| 31 |
g_lin180.png g_wlin180.png g_rad180.png g_lin270.png g_wlin270.png g_rad270.png g_lin360.png g_wlin360.png g_rad360.png |
| 32 |
|
| 33 |
STYLEPNG = n_solid.png n_dashed.png n_dotted.png n_bold.png n_filled.png n_rounded.png n_striped.png \ |
| 34 |
n_wedged.png n_diagonals.png \ |
| 35 |
e_solid.png e_dashed.png e_dotted.png e_bold.png \ |
| 36 |
c_solid.png c_dashed.png c_dotted.png c_bold.png c_filled.png c_rounded.png c_striped.png |
| 37 |
|
| 38 |
TAPERPNG = normal_forward.png normal_back.png normal_both.png normal_none.png \ |
| 39 |
none_forward.png none_back.png none_both.png none_none.png |
| 40 |
|
| 41 |
SPLINEPNG = spline_none.png spline_line.png spline_spline.png spline_ortho.png spline_curved.png spline_polyline.png |
| 42 |
|
| 43 |
MPNG = plugins.png sdlshapes.png $(GRADPNG) $(STYLEPNG) $(TAPERPNG) $(SPLINEPNG) |
| 44 |
|
| 45 |
SGIF = Mcircle.gif Mdiamond.gif Msquare.gif box.gif \ |
| 46 |
circle.gif diamond.gif doublecircle.gif \ |
| 47 |
doubleoctagon.gif egg.gif ellipse.gif hexagon.gif house.gif \ |
| 48 |
invhouse.gif invtrapezium.gif invtriangle.gif none.gif underline.gif \ |
| 49 |
octagon.gif oval.gif parallelogram.gif plaintext.gif note.gif \ |
| 50 |
point.gif polygon.gif trapezium.gif triangle.gif cylinder.gif \ |
| 51 |
tripleoctagon.gif pentagon.gif septagon.gif rect.gif plain.gif \ |
| 52 |
rectangle.gif square.gif star.gif tab.gif folder.gif box3d.gif \ |
| 53 |
component.gif promoter.gif cds.gif terminator.gif utr.gif \ |
| 54 |
primersite.gif restrictionsite.gif fivepoverhang.gif \ |
| 55 |
threepoverhang.gif noverhang.gif assembly.gif signature.gif \ |
| 56 |
insulator.gif ribosite.gif rnastab.gif proteasesite.gif \ |
| 57 |
proteinstab.gif rpromoter.gif rarrow.gif larrow.gif lpromoter.gif |
| 58 |
|
| 59 |
AGIF = a_normal.gif a_inv.gif a_dot.gif a_invdot.gif a_odot.gif \ |
| 60 |
a_invodot.gif a_curve.gif a_icurve.gif a_none.gif \ |
| 61 |
a_tee.gif a_empty.gif a_invempty.gif a_open.gif \ |
| 62 |
a_diamond.gif a_odiamond.gif a_box.gif a_obox.gif a_crow.gif \ |
| 63 |
a_halfopen.gif a_ediamond.gif a_lteeoldiamond.gif |
| 64 |
|
| 65 |
A2GIF= aa_box.gif aa_lbox.gif aa_rbox.gif aa_obox.gif aa_olbox.gif aa_orbox.gif\ |
| 66 |
aa_crow.gif aa_lcrow.gif aa_rcrow.gif \ |
| 67 |
aa_diamond.gif aa_ldiamond.gif aa_rdiamond.gif aa_odiamond.gif aa_oldiamond.gif aa_ordiamond.gif\ |
| 68 |
aa_dot.gif aa_odot.gif \ |
| 69 |
aa_inv.gif aa_linv.gif aa_rinv.gif aa_oinv.gif aa_olinv.gif aa_orinv.gif\ |
| 70 |
aa_none.gif \ |
| 71 |
aa_normal.gif aa_lnormal.gif aa_rnormal.gif aa_onormal.gif aa_olnormal.gif aa_ornormal.gif\ |
| 72 |
aa_tee.gif aa_ltee.gif aa_rtee.gif \ |
| 73 |
aa_vee.gif aa_lvee.gif aa_rvee.gif \ |
| 74 |
aa_curve.gif aa_lcurve.gif aa_rcurve.gif \ |
| 75 |
aa_icurve.gif aa_licurve.gif aa_ricurve.gif |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
GIF = $(SGIF) $(AGIF) $(MGIF) $(A2GIF) $(XGIF) |
| 80 |
DOTS = tee.gv |
| 81 |
HTML = \ |
| 82 |
grammar.html \ |
| 83 |
html_grammar.html \ |
| 84 |
schema.html \ |
| 85 |
arrow_grammar.html \ |
| 86 |
arrow_table.html \ |
| 87 |
brewer_colors.html \ |
| 88 |
svg_colors.html \ |
| 89 |
x11_colors.html |
| 90 |
MISC = graphviz_json_schema.json |
| 91 |
INSTALL_FILES = $(HTML) $(DOTS) $(SGIF) $(AGIF) $(A2GIF) $(MGIF) $(XGIF) $(MPNG) $(MISC) |
| 92 |
|
| 93 |
.SUFFIXES: .gv .gif .dot .png |
| 94 |
|
| 95 |
.dot.gif : |
| 96 |
dot -Tgif -o $@ $< |
| 97 |
|
| 98 |
.gv.gif : |
| 99 |
dot -Tgif -o $@ $< |
| 100 |
|
| 101 |
.gv.png : |
| 102 |
dot -Tpng -o $@ $< |
| 103 |
|
| 104 |
.PHONY: all |
| 105 |
all : $(HTML) $(GIF) $(MPNG) |
| 106 |
|
| 107 |
.PHONY: install |
| 108 |
install : all |
| 109 |
$(INSTALL) $(INSTALL_FILES) $(INSTALL_DIR) |
| 110 |
|
| 111 |
record2.gif : record.dot |
| 112 |
dot -Tgif -Grankdir=LR -o $@ $< |
| 113 |
|
| 114 |
sdlshapes.ps : sdlshapes.dot |
| 115 |
dot -Tps -lsdl.ps sdlshapes.dot > sdlshapes.ps |
| 116 |
|
| 117 |
sdlshapes.png : sdlshapes.ps |
| 118 |
./ps_to_png.sh sdlshapes.ps sdlshapes.png |
| 119 |
|
| 120 |
x11_colors.html : mkcolors.awk ../../lib/common/color_names |
| 121 |
awk -f mkcolors.awk ../../lib/common/color_names > x11_colors.html |
| 122 |
|
| 123 |
svg_colors.html : mkcolors.awk svg.awk ../../lib/common/svgcolor_names |
| 124 |
awk -f svg.awk ../../lib/common/svgcolor_names | awk -f mkcolors.awk > svg_colors.html |
| 125 |
|
| 126 |
brewer_colors.html : mkcolors.awk brewer.awk ../../lib/common/brewer_colors |
| 127 |
mkdir -p colortmp |
| 128 |
awk -f brewer.awk ../../lib/common/brewer_colors |
| 129 |
(for f in $$(ls colortmp); do awk -f mkcolors.awk --single-line colortmp/$$f; done) > brewer_colors.html |
| 130 |
rm -rf colortmp |
| 131 |
|
| 132 |
schema.html : jconvert.py graphviz_json_schema.json |
| 133 |
./jconvert.py graphviz_json_schema.json schema.html |
| 134 |
|
| 135 |
shapes : shapelist mkshapes.sh |
| 136 |
./mkshapes.sh |
| 137 |
touch shapes |
| 138 |
|
| 139 |
html_grammar.html : mklang html_grammar |
| 140 |
./mklang html_grammar html_grammar.html |
| 141 |
|
| 142 |
grammar.html : grammar mklang |
| 143 |
./mklang grammar grammar.html |
| 144 |
|
| 145 |
arrow_grammar.html: mklang arrow_grammar |
| 146 |
./mklang arrow_grammar arrow_grammar.html |
| 147 |
|
| 148 |
arrow_table.html: mkarrowtbl.sh $(A2GIF) |
| 149 |
./mkarrowtbl.sh $(A2GIF) > arrow_table.html |
| 150 |
|
| 151 |
mklang : mklang.y |
| 152 |
yacc mklang.y |
| 153 |
cc -o mklang y.tab.c |
| 154 |
rm -rf y.tab.c |
| 155 |
|
| 156 |
$(SGIF) : mkshapes.sh shapelist |
| 157 |
./mkshapes.sh |
| 158 |
|
| 159 |
$(AGIF) : |
| 160 |
./mkarrows.sh $@ |
| 161 |
|
| 162 |
$(A2GIF) : |
| 163 |
./mkarrows.sh -s $@ |
| 164 |
|
| 165 |
$(GRADPNG) : mkgrads.sh |
| 166 |
./mkgrads.sh $@ |
| 167 |
|
| 168 |
$(STYLEPNG) : mkstyles.sh |
| 169 |
./mkstyles.sh $@ |
| 170 |
|
| 171 |
$(TAPERPNG) : mktapers.sh |
| 172 |
./mktapers.sh $@ |
| 173 |
|
| 174 |
$(SPLINEPNG) : mksplines.sh |
| 175 |
./mksplines.sh $@ |
| 176 |
|
| 177 |
.PHONY: clean |
| 178 |
clean : |
| 179 |
rm -f mklang sdlshapes.ps sdlshapes.ppm |
| 180 |
|
| 181 |
.PHONY: distclean |
| 182 |
distclean : clean |
| 183 |
rm -f $(HTML) |
| 184 |
rm -f $(A2GIF) $(AGIF) $(SGIF) $(MGIF) $(MPNG) $(XGIF) shapes |
| 185 |
(for s in $$(cat shapelist); do rm -f $$s.gif; done) |
| 186 |
|
| 187 |
EXTRA_DIST = $(XGIF) mklang.y mkarrows.sh mkshapes.sh mkstyles.sh mktapers.sh \ |
| 188 |
mkarrowtbl.sh mkshhtml.py \ |
| 189 |
ps_to_png.sh arrow_grammar grammar html_grammar \ |
| 190 |
shapelist \ |
| 191 |
lang.1 lang.2 \ |
| 192 |
brewer.awk mkcolors.awk svg.awk sz.awk \ |
| 193 |
colorlist.dot html1.dot html4.dot round.dot constraint.dot \ |
| 194 |
html2.dot mrecord.dot sdlshapes.dot fill.dot html3.dot record.dot \ |
| 195 |
X11 eqn.gif plugins.gv |