2005-04-24 15:06:48 +02:00
|
|
|
DOCUMENT_NAMES=asymmetrie chaosradio copyleft intro mailserviceanbieter mozilla outlook pgp_vs_gnupg senselab thunderbird thunderbirdnutzung warumverschluesselung wiefunktionierts winpt
|
2005-04-24 02:20:04 +02:00
|
|
|
|
|
|
|
LYX_FILES := $(foreach dir,$(DOCUMENT_NAMES),$(dir)/$(dir).lyx)
|
2005-04-24 14:06:14 +02:00
|
|
|
TEX_FILES := $(patsubst %.lyx,%.tex,$(LYX_FILES))
|
|
|
|
HTML_FILES := $(patsubst %.lyx,%.html,$(LYX_FILES))
|
|
|
|
TARGET_FILES := $(foreach dir,$(DOCUMENT_NAMES),_output/$(dir).html)
|
2005-04-24 02:20:04 +02:00
|
|
|
ASC_FILES := $(wildcard *.asc)
|
|
|
|
LINE_STATUS = offline
|
|
|
|
|
2005-04-24 14:06:14 +02:00
|
|
|
LATEX2HTMLPREFIX := -no_auto_link -split 0 -no_navigation -no_subdir -dir _output
|
2005-04-24 02:20:04 +02:00
|
|
|
|
|
|
|
|
2005-04-24 15:20:57 +02:00
|
|
|
.PHONY : clean online offline clean-targets install
|
2005-04-24 02:20:04 +02:00
|
|
|
|
|
|
|
# default target (offline)
|
|
|
|
all: $(HTML_FILES)
|
|
|
|
|
2005-04-24 14:06:14 +02:00
|
|
|
install: $(TARGET_FILES)
|
|
|
|
@[ -z "$(CCD_BUILD_DIR)" ] && echo "CCD_BUILD_DIR must be defined!" && exit 1
|
|
|
|
@[ ! -e "$(CCD_BUILD_DIR)" ] && echo "CCD_BUILD_DIR ($(CCD_BUILD_DIR)) does not exist!" && exit 2
|
|
|
|
@[ ! -e "$(CCD_BUILD_DIR)/doku" ] && mkdir "$(CCD_BUILD_DIR)/doku"
|
|
|
|
@cp _output/* "$(CCD_BUILD_DIR)/doku"
|
2005-04-24 02:20:04 +02:00
|
|
|
|
2005-04-24 15:06:48 +02:00
|
|
|
|
2005-04-24 14:06:14 +02:00
|
|
|
clean-targets:
|
|
|
|
-rm $(TARGET_FILES) 2>/dev/null
|
2005-04-24 02:20:04 +02:00
|
|
|
|
2005-04-24 15:20:57 +02:00
|
|
|
online: LINE_STATUS=online
|
|
|
|
offline: LINE_STATUS=offline
|
2005-04-24 14:06:14 +02:00
|
|
|
online offline: clean-targets $(TARGET_FILES)
|
2005-04-24 02:20:04 +02:00
|
|
|
|
2005-04-24 14:06:14 +02:00
|
|
|
$(TARGET_FILES): $(HTML_FILES) $(ASC_FILES)
|
2005-04-24 15:20:57 +02:00
|
|
|
cat header.asc nav.$(LINE_STATUS).asc $(notdir $(basename $@))/$(notdir $@) footer.asc >$@
|
2005-04-24 02:20:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
# create tex files from lyx
|
|
|
|
$(TEX_FILES): %.tex: %.lyx
|
|
|
|
lyx -e latex $*.lyx
|
|
|
|
|
2005-04-24 15:20:57 +02:00
|
|
|
|
2005-04-24 02:20:04 +02:00
|
|
|
# original html-files, as they are created by lyx
|
2005-04-24 15:20:57 +02:00
|
|
|
$(HTML_FILES): %.html: %.tex
|
|
|
|
@-[ ! -e "_output" ] && mkdir _output
|
2005-04-24 14:06:14 +02:00
|
|
|
latex2html $(LATEX2HTMLPREFIX) $*.tex
|
|
|
|
# die html-Datei wurde jetzt im _output-Verzeichnis erstellt (inklusive Bilder)
|
2005-04-24 15:20:57 +02:00
|
|
|
-rm _output/WARNINGS $*-labels.pl $*-internals.pl $*.log 2>/dev/null
|
2005-04-24 14:06:14 +02:00
|
|
|
-rm _output/$(notdir $(basename $@)).css 2>/dev/null
|
|
|
|
-rm _output/images.aux _output/images.log _output/images.out _output/images.pl _output/images.text _output/img?.old _output/labels.pl _output/missfont.log _output/images.tex 2>/dev/null
|
|
|
|
mv _output/$(shell dirname $@).html $@
|
|
|
|
python ../convert-scripts/mod_html_files.py $@
|
2005-04-24 02:20:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm $(TEX_FILES) 2>/dev/null
|
|
|
|
-rm $(HTML_FILES) 2>/dev/null
|
2005-04-24 15:20:57 +02:00
|
|
|
-rm -r _output 2>/dev/null
|
|
|
|
-rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/WARNINGS) 2>/dev/null
|
2005-04-24 14:06:14 +02:00
|
|
|
-rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/$(dir).emergency) 2>/dev/null
|
2005-04-24 02:20:04 +02:00
|
|
|
|