Changed/added files to automatically build local menus
svn path=/trunk/; revision=11491
This commit is contained in:
parent
3744f75510
commit
99215f7040
23
Make_local_menus
Normal file
23
Make_local_menus
Normal file
@ -0,0 +1,23 @@
|
||||
HELPERFILE := menuhelper
|
||||
SELECT := '<localmenu.*</localmenu>'
|
||||
STYLESHEET := ./tools/buildmenu.xsl
|
||||
|
||||
FIND := ./\(.*/\)\?\(\w*\)\.\([a-z][a-z]\)\.xhtml:[ \t]*\(.*\)
|
||||
REPLACE := <menuitem language="\3"><dir>\1</dir><link>\2.html</link>\4</menuitem>
|
||||
|
||||
sources := $(shell grep -l -R --include='*.xhtml' $(SELECT) . )
|
||||
|
||||
.PHONY: all
|
||||
all: localmenuinfo.xml
|
||||
|
||||
localmenuinfo.xml: $(sources)
|
||||
rm -f $(HELPERFILE)
|
||||
echo \<localmenuset\> > $(HELPERFILE)
|
||||
grep -R --include='*.xhtml' $(SELECT) .| sed -e 's,$(FIND),$(REPLACE),' >> $(HELPERFILE)
|
||||
echo \</localmenuset\> >> $(HELPERFILE)
|
||||
xsltproc -o $@ $(STYLESHEET) $(HELPERFILE)
|
||||
rm -f $(HELPERFILE)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user