blob: b2132e1ee89dd10adeee2682a4237b9d18c7cd2d (
plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
LIBDIR = $$HOME/lib
M4LIBS = svg.m4 SVGconfig.m4
M4LIBS = svg.m4
# To process a single file, copy it to test.m4 and type "make tst"
# to produce tstSVG.html
DPIC = dpic
#DPIC = $$HOME/dpic/build/p2c/ftp/dpic
#DPIC = ../../../dpic/build/p2c/ftp/dpic
#DPIC = ../../../dpic/bison/dpic
#DPIC = ../../../dpic/bdev/dpic
# To test the Windows executable. Change these as needed for the operating
# system. NOTE: AntiqueClockSVG.m4 and Connectors.m4 use awk and sed which
# do not work at present with the Windows version.
# M4LIBS = svg.m4 windows.m4
# DPIC = ../../../dpic/bison/distsrc/Windows/dpic
.SUFFIXES: .pic .svg .m4
.pic.svg:
$(DPIC) -v $*.pic > $*.svg
grep '<\!-- width' $*.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > $*.siz
.m4.svg:
m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic
$(DPIC) -v $*.pic > $*.svg
grep '<\!-- width' $*.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > $*.siz
PAGES = examples_1.svg
examplesSVG.html: examplesSVG.htmx pages
Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \
sed -e 's/Version XXX/Version '$$Version'/' examplesSVG.htmx \
| m4 > examplesSVG.html
pages:
(cd .. ; make )
cp ../examples.pdf .
pdf2svg examples.pdf
touch pages
SED = sed -e '/^\%/d'
TEST = test
tst:
if test -f test.pic; then printf "\n\nUsage: make clean tst\n\n"; exit 1; fi
m4 $(M4LIBS) test.m4 | $(SED) > test.pic
$(DPIC) -v $(TEST).pic > $(TEST).svg
m4 $(M4LIBS) $(TEST).m4 | $(SED) > $(TEST).pic
$(DPIC) -v $(TEST).pic > $(TEST).svg
grep '<\!-- width' $(TEST).svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' \
> $(TEST).siz
make tstSVG.html
test.pic:
if test -f test.pic ; then echo "Usage: make clean tst" ; fi
m4 $(M4LIBS) test.m4 | $(SED) > test.pic
m4 $(M4LIBS) test.m4 | $(SED) > test.pic
tstSVG.html: tstSVG.htmx $(TEST).svg
Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \
sed -e 's/Version XXX/Version '$$Version'/' \
-e 's/XXXXX/'$(TEST)'/g' \
tstSVG.htmx | m4 > tstSVG.html
# cp tstSVG.html $(TEST) $$HOME/public_html/svg
xst: Incleps.png
AntiqueClockSVG.svg ConnectorsSVG.svg:
m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic
$(DPIC) -v $*.pic > $*.svg
m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic
$(DPIC) -v $*.pic > $*.svg
grep '<\!-- width' $*.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > $*.siz
InclepsSVG.svg: InclepsSVG.m4
m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic
$(DPIC) -v $*.pic > $*.svg
$(DPIC) -v $*.pic > $*.svg
Incleps.png:
(cd ..; make Incleps.png); cp ../Incleps.png .
clean:
@printf "\n svg clean:\n"
rm -f *.svg *.dim *.ps *log *.siz *.pic examplesSVG.html Incleps.png
rm -f tstSVG.html copy_tmp__
rm -f pages
@printf "\n"
clobber: clean
(cd dev; make clobber)
rm -f test.m4
|