RDOWNDIR = $(RHOMEDIR)/download
RSTATICDIR = /projects/helm/public_html/lambda-delta/static
-DLHTMLSTAMP = $(ETCDIR)/lddl_html.stamp
-DLHTMLIXSTAMP = $(ETCDIR)/lddl_html_ix.stamp
+HTMLSTAMP = $(ETCDIR)/html.stamp
+HTMLIXSTAMP = $(ETCDIR)/html_ix.stamp
+LDWSTAMP = $(ETCDIR)/ldw.stamp
+LDWIXSTAMP = $(ETCDIR)/ldw_ix.stamp
+
+SITEMAP = $(XSLTDIR)/sitemap.xsl
SLS = helena.sl automath.sl
BIB = lambdadelta.bib
$$(H)$$(XSLT) $$(XSLT_OUT) $$@ $$(XSLT_XSL) $$(XSLTDIR)/ld_web.xsl $$(XSLT_IN) $$<
endef
-ifeq ($(MAKECMDGOALS), www)
+ifeq ($(MAKECMDGOALS), home)
LDWS = $(shell find -L $(WEBDIRS) -name "*.ldw.xml")
TBLS = $(shell find -L $(WEBDIRS) -name "*.tbl")
XSLS = $(addprefix $(XSLTDIR)/,xhtbl.xsl $(notdir $(TBLS:%.tbl=%.xsl)))
all:
-www: $(HTMLS) $(TBLS) $(XHTBL)
+# UPDATE HTML LDDL ###########################################################
-lint-xml: $(XMLS:%=$(XMLDIR)/%)
- @echo XMLLINT --valid
- $(H)$(XMLLINT) --valid $^
+$(ETCDIR)/html_lddl.tar.bz2: $(HTMLSTAMP)
+ @echo " INSTALL html"
+ $(H)tar -cjf $@ $(HTMLDIR)
+ $(H)scp $@ $(RHOMEDIR)/$(ETCDIR)
+ $(H)ssh $(REMOTE) "cd $(RDIR) && tar -xjf $@"
-$(ETCDIR)/make_html.sh $(XMLDIR)/index.txt index:
- @echo " GENERATE INDEXES"
- $(H)find $(XMLDIR) -name "*.ld.xml" | sed s/.xml//g | sed s/xml/ld:/g > $(XMLDIR)/index.txt
- $(H)sed "s/^/make --no-print-directory /" $(XMLDIR)/index.txt | sed s.ld:/.. > $(ETCDIR)/make_html.sh
+up-html: $(ETCDIR)/html_lddl.tar.bz2
-$(DOWNDIR)/lddl.tar.bz2 lddl: $(ETCDIR)/exclude.txt $(XMLDIR)/index.txt
- @echo " GENERATE lddl.tar.bz2"
- $(H)tar -cjf $(DOWNDIR)/lddl.tar.bz2 -X $< $(XMLDIR)
+# UPDATE HTML IX LDDL ########################################################
-install-xml: $(DOWNDIR)/lddl.tar.bz2
- @echo " INSTALL xml"
- $(H)scp $^ $(RDOWNDIR)
- $(H)ssh $(REMOTE) "cd $(RDIR) && tar -xjf download/lddl.tar.bz2"
+$(ETCDIR)/html_lddl_ix.tar.bz2: $(HTMLIXSTAMP)
+ @echo " INSTALL html-ix"
+ $(H)tar -cjf $@ `find $(HTMLDIR) -name index.html`
+ $(H)scp $@ $(RHOMEDIR)/$(ETCDIR)
+ $(H)ssh $(REMOTE) "cd $(RDIR) && tar -xjf $@"
-test-html:
- @$(MAKE) --no-print-directory $(XMLS:%.xml=%)
+up-html-ix: $(ETCDIR)/html_lddl_ix.tar.bz2
-html: $(ETCDIR)/make_html.sh
- @echo " MAKE */*.ld"
-# $(H). $<
- $(H)$(INDEX) -i $(LDDLDIR) -o $(HTMLDIR) .
+# UPDATE HTML HOME ###########################################################
+
+up-home:
+ @echo " UPDATE $(RHOMEDIR)/html/"
+ $(H)scp -q html/*.html $(RHOMEDIR)/html/
-test: $(DLHTMLIXSTAMP)
+# GENERATE HTML LDDL #########################################################
-$(DLHTMLSTAMP):
+$(HTMLSTAMP): $(LDWSTAMP) $(SITEMAP)
$(H)for LDW in `find $(LDDLDIR) -name *.ldw.xml`; do \
TMP=$${LDW/web/html};HTML=$${TMP/ldw.xml/html}; \
echo " XSLT $$LDW"; \
$(XSLT) $(XSLT_OUT) $$HTML $(XSLT_XSL) $(XSLTDIR)/ld_web.xsl $(XSLT_IN) $$LDW; \
done
$(H)touch $@
- $(H)touch $(DLHTMLIXSTAMP)
+ $(H)touch $(HTMLIXSTAMP)
+
+html: $(HTMLSTAMP)
+
+# GENERATE HTML IX LDDL ######################################################
-$(DLHTMLIXSTAMP):
+$(HTMLIXSTAMP): $(LDWIXSTAMP) $(SITEMAP)
$(H)for LDW in `find $(LDDLDIR) -name index.ldw.xml`; do \
TMP=$${LDW/web/html};HTML=$${TMP/ldw.xml/html}; \
echo " XSLT $$LDW"; \
done
$(H)touch $@
-install-html: $(ETCDIR)/html_lddl.tar.bz2
+html-ix: $(HTMLIXSTAMP)
-$(ETCDIR)/html_lddl.tar.bz2:
- @echo " INSTALL html"
- $(H)tar -cjf $@ $(HTMLDIR)
- $(H)scp $@ $(RHOMEDIR)/$(ETCDIR)
- $(H)ssh $(REMOTE) "cd $(RDIR) && tar -xjf $@"
+# GENERATE HTML HOME #########################################################
-install-html-ix: $(ETCDIR)/html_lddl_ix.tar.bz2
+home: $(HTMLS) $(TBLS) $(XHTBL)
-$(ETCDIR)/html_lddl_ix.tar.bz2:
- @echo " INSTALL html"
-# $(H)tar -cjf $@ `find $(HTMLDIR) -name index.html`
- $(H)scp $@ $(RHOMEDIR)/$(ETCDIR)
- $(H)ssh $(REMOTE) "cd $(RDIR) && tar -xjf $@"
+# GENERATE LDW LDDL ##########################################################
+
+$(LDWSTAMP):
+ $(H)touch $@
+
+ldw: $(LDWSTAMP)
+
+# GENERATE LDW IX LDDL #######################################################
+
+$(LDWIXSTAMP): $(INDEX)
+ $(H)$(INDEX) -i $(LDDLDIR) -o $(HTMLDIR) .
+ $(H)touch $@
+
+ldw-ix: $(LDWIXSTAMP)
+
+##############################################################################
+
+lint-xml: $(XMLS:%=$(XMLDIR)/%)
+ @echo XMLLINT --valid
+ $(H)$(XMLLINT) --valid $^
+
+$(ETCDIR)/make_html.sh $(XMLDIR)/index.txt index:
+ @echo " GENERATE INDEXES"
+ $(H)find $(XMLDIR) -name "*.ld.xml" | sed s/.xml//g | sed s/xml/ld:/g > $(XMLDIR)/index.txt
+ $(H)sed "s/^/make --no-print-directory /" $(XMLDIR)/index.txt | sed s.ld:/.. > $(ETCDIR)/make_html.sh
+
+$(DOWNDIR)/lddl.tar.bz2 lddl: $(ETCDIR)/exclude.txt $(XMLDIR)/index.txt
+ @echo " GENERATE lddl.tar.bz2"
+ $(H)tar -cjf $(DOWNDIR)/lddl.tar.bz2 -X $< $(XMLDIR)
+
+install-xml: $(DOWNDIR)/lddl.tar.bz2
+ @echo " INSTALL xml"
+ $(H)scp $^ $(RDOWNDIR)
+ $(H)ssh $(REMOTE) "cd $(RDIR) && tar -xjf download/lddl.tar.bz2"
+
+test-html:
+ @$(MAKE) --no-print-directory $(XMLS:%.xml=%)
+
+# html: $(ETCDIR)/make_html.sh
+# @echo " MAKE */*.ld"
+# $(H). $<
install-jed: $(SLS:%=$(JEDDIR)/%)
@echo " INSTALL $(SLS)"
@echo " INSTALL $(notdir $<)"
$(H)scp $< $(DOWNDIR)
-up-html:
- @echo " UPDATE $(RHOMEDIR)/html/"
- $(H)scp -q html/*.html $(RHOMEDIR)/html/
-
up-css:
@echo " UPDATE $(RHOMEDIR)/css/"
$(H)scp -q -r css $(RHOMEDIR)
@echo " UPDATE $(RHOMEDIR)/download/"
$(H)scp -q -r download $(RHOMEDIR)
-%.ld:
- @echo " XSLT $@"
+#%.ld:
+# @echo " XSLT $@"
# $(H)mkdir -p $(LDDLDIR)/$(@D)
# $(H)$(XSLT) --novalid $(XSLT_OUT) $(LDDLDIR)/$@.ldw.xml $(XSLT_XSL) $(XSLTDIR)/lddl.xsl $(XSLT_IN) $(XMLDIR)/$@.xml
# $(H)mkdir -p $(HTMLDIR)/$(@D)
module T = Table
module M = Matrix
+let xhtbl = "xhtbl"
+
let i = 0
let myself = F.basename (Sys.argv.(0))
let ind i = S.make (2 * i) ' '
let out_cell och cell =
- let cc = border cell in
+ let cc = xhtbl :: border cell in
P.fprintf och "%s<td class=\"%s\"%s>%s</td>\n"
- (ind (i+4)) (S.concat " " cc) (name cell) (key cell)
+ (ind (i+3)) (S.concat " " cc) (name cell) (key cell)
let out_row och row =
- P.fprintf och "%s<tr>\n" (ind (i+3));
+ P.fprintf och "%s<tr class=\"%s\">\n" (ind (i+2)) xhtbl;
A.iter (out_cell och) row;
- P.fprintf och "%s</tr>\n" (ind (i+3))
+ P.fprintf och "%s</tr>\n" (ind (i+2))
let out_space och (name, uri) =
let name = if name = "" then name else ":" ^ name in
let output och name matrix =
P.fprintf och "<xsl:template name=\"%s\">\n" name;
- P.fprintf och "%s<table cellpadding=\"4\" cellspacing=\"0\">\n" (ind (i+1));
- P.fprintf och "%s<tbody>\n" (ind (i+2));
- A.iter (out_row och) matrix.M.m;
- P.fprintf och "%s</tbody>\n" (ind (i+2));
+ P.fprintf och "%s<table class=\"%s\" cellpadding=\"4\" cellspacing=\"0\">\n" (ind (i+1)) xhtbl;
+ A.iter (out_row och) matrix.M.m;
P.fprintf och "%s</table>\n" (ind (i+1));
P.fprintf och "</xsl:template>\n\n"