homepage/Jamrules

51 lines
1.1 KiB
Plaintext
Raw Normal View History

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) ;
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) ;
Depends $(tgt) : $(src) $(head) $(DIRLIST) ;
Clean clean : $(tgt) ;
2009-11-12 14:51:16 -07:00
DirList $(tgt) : $(head) $(src) ;
}
rule Webify {
local html ;
2009-11-12 14:51:16 -07:00
for i in [ FGristFiles $(1) ] {
html = $(i:S=.html) ;
2009-11-12 14:51:16 -07:00
MakeLocate $(html) : $(LOCATE_TARGET) ;
SEARCH on $(i) = $(SEARCH_SOURCE) ;
Depends $(html) : $(i) $(TEMPLATE) $(MDWNTOHTML) ;
Depends all : $(html) ;
Clean clean : $(html) ;
MdwnToHtml $(html) : $(i) ;
}
}
2009-11-10 23:08:11 -07:00
actions DirList {
2009-11-12 14:51:16 -07:00
$(DIRLIST) $(2) > $(1)
}
2009-11-10 23:08:11 -07:00
actions MdwnToHtml {
$(MDWNTOHTML) $(TEMPLATE) < $(2) > $(1)
}