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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
|
--- a/ffi/Makefile
+++ b/ffi/Makefile
@@ -1,9 +1,18 @@
+
+all: ffi.ps ffi.pdf
+
threads.ps: threads.tex
TEXINPUTS=../styles: latex threads.tex
dvips -f < threads.dvi > threads.ps
+ffi.pdf: ffi.ps
+ ps2pdf ffi.ps ffi.pdf
+
ffi.ps: ffi.tex
TEXINPUTS=../styles: latex ffi.tex
+ bibtex ffi
+ TEXINPUTS=../styles: latex ffi.tex
+ TEXINPUTS=../styles: latex ffi.tex
dvips -f < ffi.dvi > ffi.ps
# Requires TeX4ht
@@ -39,4 +48,4 @@ ffi.html.tar.gz:
.PHONY: clean
clean:
- -rm -f *.aux *.log *.blg *.dvi *.bbl *.toc *.ps *.html *.css *.png *.4ct *.4tc *.idv *.xref tex4ht.fls
+ -rm -f *.aux *.log *.blg *.dvi *.bbl *.toc *.ps *.html *.css *.png *.4ct *.4tc *.idv *.xref tex4ht.fls *.pdf
--- a/hierarchical-modules/Makefile
+++ b/hierarchical-modules/Makefile
@@ -7,5 +7,6 @@ hier.ps: hier.tex
hier.pdf: hier.tex
TEXINPUTS=../styles: pdflatex $<
-clean :
- rm hier.ps hier.pdf
+.PHONY: clean
+clean:
+ -rm -f *.aux *.log *.blg *.dvi *.bbl *.toc *.ps *.html *.css *.png *.4ct *.4tc *.idv *.xref tex4ht.fls *.pdf
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,21 @@
-RELEASE_DIR = haskell98-revised
+PREFIX = haskell98-revised
+RELEASE_DIR = $(PREFIX)
JFP_DIR = jfp-release
+install:
+ $(MAKE) -C tools
+ $(MAKE) -C report install
+
+clean:
+ $(MAKE) -C tools clean
+ $(MAKE) -C report clean
+
release:
+ (cd tools; make)
(cd report; make release)
+ touch libraries/library.idx
(cd libraries; make release)
- (cd jfp-release; make)
- cp h98-revised.html $(RELEASE_DIR)/index.html
- cp haskell98-bugs.html h98.gif $(RELEASE_DIR)
- gzip < jfp-release/h98-book.ps > $(RELEASE_DIR)/h98-book.ps.gz
- gzip < jfp-release/h98-book.pdf > $(RELEASE_DIR)/h98-book.pdf.gz
+ cp report/h98-revised.html $(RELEASE_DIR)/index.html
jfp:
-mkdir $(JFP_DIR)
--- a/report/classes.eps
+++ b/report/classes.eps
@@ -826,7 +826,8 @@ LH
%%Trailer
%%DocumentNeededResources:
%%+ font Courier-Bold
-%%+ font TimesNewRomanPSMT
+% Don't include TrueType fonts, this make dvips(from texlive) happy
+%%%+ font TimesNewRomanPSMT
%%DocumentSuppliedResources:
%%+ procset Pscript_WinNT_ErrorHandler 5.0 0
%%+ procset Pscript_FatalError 5.0 0
--- a/report/h98-revised.html
+++ b/report/h98-revised.html
@@ -28,13 +28,11 @@ The text and sources of the Report are n
<p><li> The Haskell 98 Report (revised)
<ul>
<li> <a href="haskell98-report-html/index.html">HTML</a>
-<li> <a href="haskell.ps.gz">Gzipped Postscript</a>
-<li> <a href="haskell.pdf">PDF</a>
+<li> <a href="../haskell98-report.ps.gz">Gzipped Postscript</a>
+<li> <a href="../haskell98-report.pdf.gz">Gzipped PDF</a>
<li> <a href="haskell98-revised-bugs.html">A complete list of all bugs</a> (found so far)
</ul>
-<p>
-<li> <a href="haskell98-report-html.tar.gz">Gzipped tar bundle of the HTML sources</a> for local browsing.
<p><li>
<a href="haskell98-bugs.html">A complete list of all changes</a> made to both reports between the Jan 1999 publication
--- a/report/Makefile
+++ b/report/Makefile
@@ -40,7 +40,11 @@ EXPAND = expand
# Files
#########################################
-RELEASE_DIR = ../haskell98-revised
+PREFIX = ../haskell98-revised
+RELEASE_DIR = $(PREFIX)
+PS_DIR = $(RELEASE_DIR)
+PDF_DIR = $(RELEASE_DIR)
+HTML_DIR = $(RELEASE_DIR)/html
JFP_DIR = ../jfp-release
PARTS = preface-jfp.tex $(PARTS_NO_PREFACE)
@@ -99,7 +103,7 @@ haskell.tex: haskell.verb
haskell.dvi: haskell.tex ${PARTS} $(SYNTAX) ${PRELUDE}
# I have no idea why run_tex is run twice. SLPJ
-html: index.html ${PARTS} ${SYNTAX} ${PRELUDE}
+html: index.html haskell.dvi ${PARTS} ${SYNTAX} ${PRELUDE}
-mkdir haskell98-report-html
$(RUN_TEX)
$(RUN_TEX)
@@ -108,8 +112,8 @@ html: index.html ${PARTS} ${SYNTAX} ${PR
haskell.dvi: haskell.tex haskell.ind ${PARTS} $(SYNTAX) ${PRELUDE} ${CODE} ${HEADERS}
+haskell.idx: haskell.tex ${PARTS} $(SYNTAX) ${PRELUDE} ${CODE} ${HEADERS}
-# remove this rule if you don't have "makeindex"
haskell.ind: haskell.idx
$(MAKEINDEX) -i -t haskell.ilg < haskell.idx > haskell.ind
@@ -117,8 +121,20 @@ haskell.ps : haskell.dvi
dvips haskell.dvi -o haskell.ps
# Can't use pdflatex because of eps inclusion
+haskell.pdf : haskell.ps
+ ps2pdf haskell.ps haskell.pdf
-release: haskell.ps html
+install: haskell.ps haskell.pdf html
+ mkdir -p $(PS_DIR) $(PDF_DIR) $(HTML_DIR)
+ cp haskell.ps $(PS_DIR)/haskell98-report.ps
+ cp haskell.pdf $(PDF_DIR)/haskell98-report.pdf
+ cp -r haskell98-report-html $(HTML_DIR)
+ cp h98-revised.html $(HTML_DIR)/index.html
+ cp haskell98-bugs.html h98.gif $(HTML_DIR)
+ cp haskell98-revised-bugs.html $(HTML_DIR)
+
+
+release: haskell.ps html $(RELEASE_DIR)
ps2pdf haskell.ps
gzip < haskell.ps > $(RELEASE_DIR)/haskell.ps.gz
cp haskell.pdf $(RELEASE_DIR)/haskell.pdf
@@ -128,6 +144,9 @@ release: haskell.ps html
cp haskell98-bugs.html h98.gif $(RELEASE_DIR)
cp haskell98-revised-bugs.html h98.gif $(RELEASE_DIR)
+$(RELEASE_DIR):
+ mkdir $@
+
publish-pdf: report.pdf
gzip < report.pdf > y:Haskell/haskell98-report/report.pdf.gz
@@ -140,18 +159,19 @@ veryclean: clean
$(RM) *~
clean:
+ $(RM) $(PRELUDE) reportrefs
$(RM) *.dvi *.log *.aux *.ilg *.blg *.toc ${PARTS} $(SYNTAX) \
- haskell.tex haskell.ps haskell.pdf *.o lex.yy.c haskell98-report-html/*
- cp haskell.ind haskell.ind.two-sided
- echo "Don't delete the Prelude*.tex files"
- echo "Not everyone has \"perl\" to re-make them"
+ haskell.tex haskell.ps haskell.pdf *.o lex.yy.c haskell.ind
+ $(RM) -r haskell98-report-html/
+ $(RM) lib-code/*.tex lib-hdrs/*.tex
+ $(RM) haskell.idx
#########################################
# Suffix rules
#########################################
-.SUFFIXES: .hi .hs .verb .tex .dvi
+.SUFFIXES: .hi .hs .verb .tex .dvi .idx
.verb.tex:
$(EXPAND) < $< | $(VERBATIM) | ../tools/subsection >$@
@@ -168,7 +188,11 @@ clean:
.tex.dvi:
$(LATEX) $<
+ $(LATEX) $<
+ $(LATEX) $<
+.tex.idx:
+ $(LATEX) $<
# -----------------------------------------------------------
# Out of date stuff
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -14,13 +14,16 @@ LEX_OPTS = -t -8
all : verbatim run_tex run_index
+clean:
+ rm -f *.hi *.o verbatim verbatim.c run_tex run_index
+
verbatim: verbatim.lex
$(LEX) $(LEX_OPTS) verbatim.lex > verbatim.c || ( rm -f verbatim.c && exit 1 )
$(CC) -c verbatim.c -o verbatim.o
$(CC) -o verbatim verbatim.o
run_tex: tex.hs
- $(GHC) -o run_tex tex.hs -fglasgow-exts -H20m -package lang
+ $(GHC) -o run_tex tex.hs -fglasgow-exts -H20m
run_index: index.hs
$(GHC) -o run_index index.hs -fglasgow-exts -H20m
--- a/tools/index.hs
+++ b/tools/index.hs
@@ -6,8 +6,9 @@
module Main where
-import IO
-import Char
+import System.IO
+import Data.Char
+import Control.Exception(catch)
main = do refs <- readRefFile "reportrefs"
doFiles refs ["prelude-index"]
@@ -20,7 +21,7 @@ doFile r f = catch
ls <-readFile (f ++ ".idx")
let output = expandAllRefs r (lines ls)
writeFile ("haskell98-report-html/" ++ f ++ ".html") (unlines output))
- (\err -> putStr ("Error: " ++ show err ++ "\n"))
+ (\err -> putStr ("Error: " ++ show (err::IOError) ++ "\n"))
-- This sets up the parts of the state that need to be reset at the start of
-- each file.
@@ -129,7 +130,7 @@ mangleType t = mangleName (case t of
readRefFile :: String -> IO [(String, String)]
readRefFile f = catch (do l <- readFile f
return (map parseKV (lines l)))
- (\e -> do putStr ("Can't read ref file: " ++ f ++ "\n")
+ (\e -> do putStr ("Can't read ref file: " ++ f ++ ": " ++ show (e::IOError) ++ "\n")
return [])
parseKV l = let (k,l1) = span (/= '=') l
--- a/tools/tex.hs
+++ b/tools/tex.hs
@@ -78,11 +78,12 @@ commands are supported but not all.
module Main where
-import Monad(foldM)
-import IO hiding (bracket)
-import Char(isSpace, isAlpha, isDigit)
+import Control.Monad(foldM)
+import System.IO
+import Data.Char(isSpace, isAlpha, isDigit)
+import Control.Exception(catch)
-import IOExts(unsafePerformIO) -- debugging only
+import System.IO.Unsafe(unsafePerformIO) -- debugging only
data FontStyle = RM | IT | TT | Bold | Sym | UL
deriving (Eq,Show)
@@ -216,7 +217,7 @@ writeRefFile s =
"" -> return ()
f -> do putStr ("Writing reference file " ++ f ++ "\n")
catch (writeFile f (concat (map fmtKV (newRefMap s))))
- (\e -> do putStr ("Can't write ref file: " ++ f ++ "\n" ++ show e)
+ (\e -> do putStr ("Can't write ref file: " ++ f ++ "\n" ++ show (e::IOError))
return ())
where fmtKV (k,v) = k ++ "=" ++ v ++ "\n"
@@ -233,7 +234,8 @@ writeIndexFile s =
idx = htmlToString
(HProtect [HCmd cmd, HList "item" (HProtect hdrs)])
catch (writeFile f idx)
- (\e -> do putStr ("Can't write index file: " ++ f ++ "\n")
+ (\e -> do putStr ("Can't write index file: " ++ f ++ ": " ++
+ show (e::IOError) ++ "\n")
return ())
@@ -255,7 +257,7 @@ parseConfig :: String -> IO IState
parseConfig f = catch
(do c <- readFile f
foldM configLine initState (lines c))
- (\e -> error ("Can't read configuration file " ++ f))
+ (\e -> error ("Can't read configuration file " ++ f ++ ": " ++ show (e::IOError)))
configLine s l | "#" `starts` l = return s
| l == "" = return s
@@ -286,20 +288,20 @@ readRefFile f = catch (do l <- readFile
-- completely read, because we are
-- going to write to it at the end
return (map parseKV (lines l)))
- (\e -> do putStr ("Can't read ref file: " ++ f ++ "\n")
+ (\e -> do putStr ("Can't read ref file: " ++ f ++ ": " ++ show (e::IOError) ++ "\n")
return [])
readAuxFile :: String -> IO [(String,String)]
readAuxFile f = catch (do l <- readFile f
return (processAuxLines (lines l)))
- (\e -> do putStr ("Can't read aux file: " ++ f ++ "\n")
+ (\e -> do putStr ("Can't read aux file: " ++ f ++ ": " ++ show (e::IOError) ++ "\n")
return [])
readAnchorFile :: String -> IO [String]
readAnchorFile f = catch (do l <- readFile f
return (lines l))
(\e -> do putStr ("Can't read anchor file: "
- ++ f ++ "\n")
+ ++ f ++ ": " ++ show (e::IOError) ++ "\n")
return [])
-- Look for \newlabel{label}{value} in aux files. Ignore all else.
@@ -405,10 +407,10 @@ processFile s f = let (file,ext) = parse
catch (do writeFile outFile (htmlToString html)
return s'')
(\e -> do putStr ("Write to " ++ outFile ++
- " failed.\n")
+ " failed: " ++ show (e::IOError) ++"\n")
return s'))
(\e -> do putStr ("File " ++ outFile ++
- " error " ++ (show e) ++ "\n")
+ " error " ++ (show (e::IOError)) ++ "\n")
return s')
parseFileName f = let (re,rf) = span (/= '.') (reverse f) in
@@ -1258,7 +1260,7 @@ doInput s l ls = let (f,l',ls') = getSAr
then ".verb"
else ".tex"))
return (lines l1))
- (\err -> do putStr ("Input error: " ++ show err)
+ (\err -> do putStr ("Input error: " ++ show (err::IOError))
return [])
doChar s "" (newLines ++ [l'] ++ ls')
@@ -1266,7 +1268,7 @@ doInputHS s l ls = let (f,l',ls') = getS
do putStr ("Reading Haskell input " ++ f ++ ".hs\n")
newLines <- catch (do l1 <- readFile (f ++ ".hs")
return (lines l1))
- (\err -> do putStr ("Input error: " ++ show err)
+ (\err -> do putStr ("Input error: " ++ show (err::IOError))
return [])
s' <- emitCodeLines s newLines
doChar s' l' ls'
|