@@ -15,14 +15,16 @@ CONV = texi2any lib/Texinfo/Convert/HTML.pm # Texinfo converter scripts
15
15
MATH = get-math.js put-math.js mathcell.xhtml # LaTeX -> MathML converter
16
16
HIGHL = $(DIR ) js/highlight/
17
17
PRETTY = $(HIGHL ) prettify.js $(HIGHL ) lang-lisp.js batch-prettify.js
18
- COVER = index.xhtml $(DIR ) fig/coverpage.std.svg $(DIR ) fig/bookwheel.jpg
18
+ COVER = index.in. xhtml $(DIR ) fig/coverpage.std.svg $(DIR ) fig/bookwheel.jpg
19
19
THUMB = $(DIR ) fig/cover.png # thumbnail cover image
20
20
SHELL = /bin/bash
21
21
22
22
JQ = <script src=\"js/jquery.min.js\" type=\"text/javascript\"></script>
23
23
FT = <script src=\"js/footnotes.js\" type=\"text/javascript\"></script>
24
24
BR = <script src=\"js/browsertest.js\" type=\"text/javascript\"></script>
25
25
26
+ GITHUB = <a href=\"https://github.com/sarabander/sicp\"><img style=\"position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; z-index: 10; opacity: 0.5;\" src=\"http://aral.github.com/fork-me-on-github-retina-ribbons/right-red\@2x.png\" alt=\"Fork me on GitHub\" /></a>
27
+
26
28
all : $(GOAL )
27
29
# Add scripts to the unpacked HTML5 version that is to be read in a browser.
28
30
@if ! grep -m 1 -l 'browsertest' $(NEXUS); then \
@@ -31,7 +33,10 @@ all: $(GOAL)
31
33
"s{\s*</head>}{\n\n$(JQ)\n$(FT)\n$(BR)\n</head>}" $$file; \
32
34
done; \
33
35
rm $(DIR)*.bak; \
34
- fi
36
+ fi; \
37
+ perl -0p -i.bak -e \
38
+ "s{<!-- Fork me banner -->}{$(GITHUB)}" index.xhtml; \
39
+ rm *.bak
35
40
36
41
html : $(NEXUS )
37
42
@@ -90,6 +95,7 @@ $(GOAL): $(META) $(THUMB) $(FIG) $(CSS) $(FONT) mimetype META-INF/* LICENSE
90
95
rm $(DIR ) * .bak; \
91
96
fi ; \
92
97
zip -0Xq $(GOAL ) mimetype; \
98
+ cp index.in.xhtml index.xhtml; \
93
99
zip -Xr9Dq $(GOAL) $(META) $(HTML) META-INF/* LICENSE \
94
100
index.xhtml $(DIR)css/* $(DIR)fig/* ; \
95
101
echo "done."
0 commit comments