Changes to build process relating to r234.
+ Corrected dependencies in Makefiles to ensure that templates get filled when the relevant files are modified. + Changed template placeholders to @xxx@ instead of <xxx>, for consistency with our practice with the Cabal template. + Changed default font for RTF writer (this had been changed earlier, but in the target rather than the template!) git-svn-id: https://pandoc.googlecode.com/svn/trunk@235 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
206c59a386
commit
31a956b655
7 changed files with 30 additions and 31 deletions
5
Makefile
5
Makefile
|
@ -90,7 +90,6 @@ all: build-program
|
|||
|
||||
.PHONY: templates
|
||||
templates: $(SRCDIR)/templates
|
||||
$(SRCDIR)/templates:
|
||||
$(MAKE) -C $(SRCDIR)/templates
|
||||
|
||||
define generate-shell-script
|
||||
|
@ -120,7 +119,7 @@ $(CABAL): cabalize $(CABAL).in $(SRCDIR)/Main.hs
|
|||
|
||||
.PHONY: configure
|
||||
cleanup_files+=$(BUILDDIR) $(BUILDCONF) $(BUILDVARS)
|
||||
configure: $(BUILDCONF)
|
||||
configure: $(BUILDCONF) templates
|
||||
$(BUILDCONF): $(CABAL)
|
||||
$(BUILDCMD) configure --prefix=$(PREFIX)
|
||||
# Make configuration time settings persistent (definitely a hack).
|
||||
|
@ -128,7 +127,7 @@ $(BUILDCONF): $(CABAL)
|
|||
@echo "DESTDIR?=$(DESTDIR)" >>$(BUILDVARS)
|
||||
|
||||
.PHONY: build
|
||||
build: templates configure
|
||||
build: configure
|
||||
$(BUILDCMD) build
|
||||
|
||||
.PHONY: build-exec
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{\rtf1\ansi\deff0{\fonttbl{\f0 Times New Roman;}{\f1 Courier;}}
|
||||
{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}}
|
||||
{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
|
||||
\widowctrl\hyphauto
|
||||
|
||||
|
|
|
@ -4,4 +4,4 @@ module Text.Pandoc.ASCIIMathML ( asciiMathMLScript ) where
|
|||
|
||||
-- | String containing Pandoc.ASCIIMathML javascript.
|
||||
asciiMathMLScript :: String
|
||||
asciiMathMLScript = "<script type=\"text/javascript\">\n<ASCIIMathML.js></script>\n"
|
||||
asciiMathMLScript = "<script type=\"text/javascript\">\n@ASCIIMathML.js@</script>\n"
|
||||
|
|
|
@ -8,13 +8,13 @@ module Text.Pandoc.Writers.DefaultHeaders (
|
|||
import Text.Pandoc.Writers.S5
|
||||
|
||||
defaultLaTeXHeader :: String
|
||||
defaultLaTeXHeader = "<LaTeXHeader>"
|
||||
defaultLaTeXHeader = "@LaTeXHeader@"
|
||||
|
||||
defaultHtmlHeader :: String
|
||||
defaultHtmlHeader = "<HtmlHeader>"
|
||||
defaultHtmlHeader = "@HtmlHeader@"
|
||||
|
||||
defaultS5Header :: String
|
||||
defaultS5Header = "<S5Header>" ++ s5CSS ++ s5Javascript
|
||||
defaultS5Header = "@S5Header@" ++ s5CSS ++ s5Javascript
|
||||
|
||||
defaultRTFHeader :: String
|
||||
defaultRTFHeader = "<RTFHeader>"
|
||||
defaultRTFHeader = "@RTFHeader@"
|
||||
|
|
|
@ -6,11 +6,11 @@ TARGETS := Text/Pandoc/ASCIIMathML.hs \
|
|||
|
||||
all: $(TARGETS)
|
||||
|
||||
Text/Pandoc/ASCIIMathML.hs: ASCIIMathML.hs $(PROCESSOR) $(VPATH)/ASCIIMathML.js
|
||||
Text/Pandoc/ASCIIMathML.hs: ASCIIMathML.hs $(PROCESSOR) $(VPATH)/ASCIIMathML.js
|
||||
perl $(PROCESSOR) $@ $(VPATH)
|
||||
|
||||
Text/Pandoc/Writers/S5.hs: S5.hs $(PROCESSOR) $(VPATH)/headers/*
|
||||
Text/Pandoc/Writers/S5.hs: S5.hs $(PROCESSOR) $(VPATH)/ui/default/*
|
||||
perl $(PROCESSOR) $@ $(VPATH)
|
||||
|
||||
Text/Pandoc/Writers/DefaultHeaders.hs: DefaultHeaders.hs $(PROCESSOR) $(VPATH)/ui/default/*
|
||||
Text/Pandoc/Writers/DefaultHeaders.hs: DefaultHeaders.hs $(PROCESSOR) $(VPATH)/headers/*
|
||||
perl $(PROCESSOR) $@ $(VPATH)
|
||||
|
|
|
@ -14,25 +14,25 @@ import Text.Pandoc.Writers.HTML ( writeHtml )
|
|||
import Text.Pandoc.Definition
|
||||
|
||||
s5Javascript :: String
|
||||
s5Javascript = "<script type=\"text/javascript\">\n<slides.js></script>\n"
|
||||
s5Javascript = "<script type=\"text/javascript\">\n@slides.js@</script>\n"
|
||||
|
||||
s5CoreCSS :: String
|
||||
s5CoreCSS = "<s5-core.css>"
|
||||
s5CoreCSS = "@s5-core.css@"
|
||||
|
||||
s5FramingCSS :: String
|
||||
s5FramingCSS = "<framing.css>"
|
||||
s5FramingCSS = "@framing.css@"
|
||||
|
||||
s5PrettyCSS :: String
|
||||
s5PrettyCSS = "<pretty.css>"
|
||||
s5PrettyCSS = "@pretty.css@"
|
||||
|
||||
s5OperaCSS :: String
|
||||
s5OperaCSS = "<opera.css>"
|
||||
s5OperaCSS = "@opera.css@"
|
||||
|
||||
s5OutlineCSS :: String
|
||||
s5OutlineCSS = "<outline.css>"
|
||||
s5OutlineCSS = "@outline.css@"
|
||||
|
||||
s5PrintCSS :: String
|
||||
s5PrintCSS = "<print.css>"
|
||||
s5PrintCSS = "@print.css@"
|
||||
|
||||
s5CSS :: String
|
||||
s5CSS = "<style type=\"text/css\" media=\"projection\" id=\"slideProj\">\n" ++ s5CoreCSS ++ "\n" ++ s5FramingCSS ++ "\n" ++ s5PrettyCSS ++ "\n</style>\n<style type=\"text/css\" media=\"projection\" id=\"operaFix\">\n" ++ s5OperaCSS ++ "\n</style>\n<style type=\"text/css\" media=\"screen\" id=\"outlineStyle\">\n" ++ s5OutlineCSS ++ "\n</style>\n<style type=\"text/css\" media=\"print\" id=\"slidePrint\">\n" ++ s5PrintCSS ++ "\n</style>\n"
|
||||
|
|
|
@ -45,13 +45,13 @@ my %processor = (
|
|||
my $outline = escape_for_haskell(slurp "ui/default/outline.css");
|
||||
my $print = escape_for_haskell(slurp "ui/default/print.css");
|
||||
|
||||
$template =~ s/<slides\.js>/$slides/;
|
||||
$template =~ s/<s5-core\.css>/$s5core/;
|
||||
$template =~ s/<framing\.css>/$framing/;
|
||||
$template =~ s/<pretty\.css>/$pretty/;
|
||||
$template =~ s/<opera\.css>/$opera/;
|
||||
$template =~ s/<outline\.css>/$outline/;
|
||||
$template =~ s/<print\.css>/$print/;
|
||||
$template =~ s/\@slides\.js@/$slides/;
|
||||
$template =~ s/\@s5-core\.css@/$s5core/;
|
||||
$template =~ s/\@framing\.css@/$framing/;
|
||||
$template =~ s/\@pretty\.css@/$pretty/;
|
||||
$template =~ s/\@opera\.css@/$opera/;
|
||||
$template =~ s/\@outline\.css@/$outline/;
|
||||
$template =~ s/\@print\.css@/$print/;
|
||||
|
||||
return $template;
|
||||
},
|
||||
|
@ -68,7 +68,7 @@ my %processor = (
|
|||
" released under the GPL\\nSee ".
|
||||
"http://www1.chapman.edu/~jipsen/mathml/asciimath.html/ ";
|
||||
$script =~ s/\/\*.*?\*\//\/\*$acknowledgements\*\//g; # strip comments
|
||||
$template =~ s/<ASCIIMathML\.js>/$script/;
|
||||
$template =~ s/\@ASCIIMathML\.js@/$script/;
|
||||
|
||||
return $template;
|
||||
},
|
||||
|
@ -84,10 +84,10 @@ my %processor = (
|
|||
my $rtf = escape_for_haskell(slurp "headers/RTFHeader");
|
||||
my $s5 = escape_for_haskell(slurp "headers/S5Header");
|
||||
|
||||
$template =~ s/<HtmlHeader>/$html/;
|
||||
$template =~ s/<LaTeXHeader>/$latex/;
|
||||
$template =~ s/<RTFHeader>/$rtf/;
|
||||
$template =~ s/<S5Header>/$s5/;
|
||||
$template =~ s/\@HtmlHeader@/$html/;
|
||||
$template =~ s/\@LaTeXHeader@/$latex/;
|
||||
$template =~ s/\@RTFHeader@/$rtf/;
|
||||
$template =~ s/\@S5Header@/$s5/;
|
||||
|
||||
return $template;
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue