2009-11-10 22:06:12 -07:00
|
|
|
MDWNTOHTML = $(TOP)/mdwntohtml ;
|
|
|
|
DIRLIST = $(TOP)/dirlist ;
|
|
|
|
TEMPLATE = $(TOP)/template.xml ;
|
|
|
|
|
|
|
|
rule Copy {
|
2009-11-12 14:51:16 -07:00
|
|
|
local tgt = [ FGristFiles $(1) ] ;
|
|
|
|
local src = [ FGristFiles $(2) ] ;
|
|
|
|
MakeLocate $(tgt) : $(LOCATE_TARGET) ;
|
|
|
|
File $(tgt) : $(src) ;
|
2009-11-10 22:06:12 -07:00
|
|
|
Clean clean : $(tgt) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
rule AutoIndex {
|
2009-11-12 14:51:16 -07:00
|
|
|
local tgt = [ FGristFiles $(1) ] ;
|
|
|
|
local head = [ FGristFiles $(2) ] ;
|
|
|
|
local src = [ FGristFiles $(3) ] ;
|
|
|
|
|
|
|
|
MakeLocate $(tgt) : $(LOCATE_TARGET) ;
|
|
|
|
SEARCH on $(head) = $(SEARCH_SOURCE) ;
|
|
|
|
SEARCH on $(src) = $(SEARCH_SOURCE) ;
|
2009-11-10 22:06:12 -07:00
|
|
|
|
|
|
|
Depends $(tgt) : $(src) $(head) $(DIRLIST) ;
|
|
|
|
Clean clean : $(tgt) ;
|
2009-11-12 14:51:16 -07:00
|
|
|
DirList $(tgt) : $(head) $(src) ;
|
2009-11-10 22:06:12 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
rule Webify {
|
|
|
|
local html ;
|
|
|
|
|
2009-11-12 14:51:16 -07:00
|
|
|
for i in [ FGristFiles $(1) ] {
|
2009-11-10 22:06:12 -07:00
|
|
|
html = $(i:S=.html) ;
|
2009-11-12 14:51:16 -07:00
|
|
|
MakeLocate $(html) : $(LOCATE_TARGET) ;
|
|
|
|
SEARCH on $(i) = $(SEARCH_SOURCE) ;
|
2009-11-10 22:06:12 -07:00
|
|
|
|
|
|
|
Depends $(html) : $(i) $(TEMPLATE) $(MDWNTOHTML) ;
|
|
|
|
Depends all : $(html) ;
|
|
|
|
Clean clean : $(html) ;
|
|
|
|
MdwnToHtml $(html) : $(i) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-11-10 23:08:11 -07:00
|
|
|
|
2009-11-10 22:06:12 -07:00
|
|
|
|
|
|
|
actions DirList {
|
2009-11-12 14:51:16 -07:00
|
|
|
$(DIRLIST) $(2) > $(1)
|
2009-11-10 22:06:12 -07:00
|
|
|
}
|
2009-11-10 23:08:11 -07:00
|
|
|
|
|
|
|
actions MdwnToHtml {
|
|
|
|
$(MDWNTOHTML) $(TEMPLATE) < $(2) > $(1)
|
|
|
|
}
|