51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
MDWNTOHTML = $(TOP)/mdwntohtml ;
|
|
DIRLIST = $(TOP)/dirlist ;
|
|
TEMPLATE = $(TOP)/template.xml ;
|
|
|
|
rule Copy {
|
|
local tgt = [ FGristFiles $(1) ] ;
|
|
local src = [ FGristFiles $(2) ] ;
|
|
MakeLocate $(tgt) : $(LOCATE_TARGET) ;
|
|
File $(tgt) : $(src) ;
|
|
Clean clean : $(tgt) ;
|
|
}
|
|
|
|
rule AutoIndex {
|
|
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) ;
|
|
|
|
Depends $(tgt) : $(src) $(head) $(DIRLIST) ;
|
|
Clean clean : $(tgt) ;
|
|
DirList $(tgt) : $(head) $(src) ;
|
|
}
|
|
|
|
rule Webify {
|
|
local html ;
|
|
|
|
for i in [ FGristFiles $(1) ] {
|
|
html = $(i:S=.html) ;
|
|
MakeLocate $(html) : $(LOCATE_TARGET) ;
|
|
SEARCH on $(i) = $(SEARCH_SOURCE) ;
|
|
|
|
Depends $(html) : $(i) $(TEMPLATE) $(MDWNTOHTML) ;
|
|
Depends all : $(html) ;
|
|
Clean clean : $(html) ;
|
|
MdwnToHtml $(html) : $(i) ;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
actions DirList {
|
|
$(DIRLIST) $(2) > $(1)
|
|
}
|
|
|
|
actions MdwnToHtml {
|
|
$(MDWNTOHTML) $(TEMPLATE) < $(2) > $(1)
|
|
}
|