LATEX2HTMLPREFIX := -no_auto_link -split 0 -init_file ../../convert-scripts/latex2html-init -no_navigation -no_subdir # output of lyx TEX_FILES := $(patsubst %.lyx,%.tex,$(wildcard *.lyx)) # output of latex2html NEW_INDEXES := $(patsubst %.lyx,%.html,$(wildcard *.lyx)) # patched html files (online or offline) NEW_INDEXES_UNPATCHED := $(patsubst %.lyx,%-unpatched.html,$(wildcard *.lyx)) # patch files ASC_FILES := $(wildcard *.asc) # images for css CSS_BILDER = somerights20.png .PHONY : clean css clean-html online offline # default target (offline) all: offline $(NEW_INDEXES) css # misc definitions offline: NAV_FILE=nav.asc.offline online: NAV_FILE=nav.asc.online online offline: clean-html $(NEW_INDEXES) css: $(CSS_BILDER) # copy images for css $(CSS_BILDER): cd _bilder; cp $(CSS_BILDER) .. # create tex files from lyx $(TEX_FILES): %.tex: %.lyx lyx -e latex $*.lyx # original html-files, as they are created by lyx $(NEW_INDEXES_UNPATCHED): %-unpatched.html: %.tex latex2html $(LATEX2HTMLPREFIX) $*.tex -rm WARNINGS $*-labels.pl $*-internals.pl $*.css 2>/dev/null mv $*.html $*-unpatched.html python ../../convert-scripts/mod_html_files.py $@ # patch original html-files with online or offline files $(NEW_INDEXES): %.html: %-unpatched.html $(NEW_INDEXES_UNPATCHED) $(ASC_FILES) cat header.asc $(NAV_FILE) $*-unpatched.html footer.asc > $@ clean-html: -rm $(patsubst %.lyx,%.html,$(wildcard *.lyx)) 2>/dev/null clean: clean-html -rm WARNINGS 2>/dev/null -rm $(patsubst %.lyx,%.tex,$(wildcard *.lyx)) 2>/dev/null -rm $(patsubst %.lyx,%.lyx.emergency,$(wildcard *.lyx)) 2>/dev/null -rm $(patsubst %.lyx,%-unpatched.html,$(wildcard *.lyx)) 2>/dev/null -rm $(patsubst _bilder/%,%,$(wildcard _bilder/*)) 2>/dev/null