on/off-line status entfernt aus Makefiles

This commit is contained in:
lars 2006-04-21 08:25:45 +00:00
parent 5c8fc6bbfd
commit 9e2196e3dc
2 changed files with 2 additions and 24 deletions

View file

@ -32,8 +32,6 @@ ERZEUGE_ISO = mkisofs -quiet $(ISO_OPTS) -o $(EXPORT_FILE).iso $(CCD_BUILD_DIR)
ISO_OPTS = -iso-level 3 -J -joliet-long -relaxed-filenames -f -r -V $(EXPORT_PREFIX)$(REVISIONS_SUFFIX) ISO_OPTS = -iso-level 3 -J -joliet-long -relaxed-filenames -f -r -V $(EXPORT_PREFIX)$(REVISIONS_SUFFIX)
# Ausgabe-Filter zum Einruecken # Ausgabe-Filter zum Einruecken
EINRUECKEN = sed 's/^/\t/' EINRUECKEN = sed 's/^/\t/'
# Voreinstellung - wird nur fuer "make website" ueberschrieben
LINE_STATUS = offline
######### Variablen vererben ########### ######### Variablen vererben ###########
export CCD_BUILD_DIR export CCD_BUILD_DIR
@ -103,7 +101,6 @@ kopiere_programme: cd-template
####### die Ausgabe-Formate ########### ####### die Ausgabe-Formate ###########
website: LINE_STATUS=online
website: EXPORT_FILE_SUFFIX := _website website: EXPORT_FILE_SUFFIX := _website
website: doku kopiere_programme website: doku kopiere_programme
@echo "Gruppen-Schreibrecht setzen (fuer eduforge) ..." @echo "Gruppen-Schreibrecht setzen (fuer eduforge) ..."

View file

@ -4,12 +4,10 @@ LYX_FILES := $(shell find -name *.lyx)
TEX_FILES := $(patsubst %.lyx,%.tex,$(LYX_FILES)) TEX_FILES := $(patsubst %.lyx,%.tex,$(LYX_FILES))
# output files of lyx that are already processed by mod_html_files.py # output files of lyx that are already processed by mod_html_files.py
HTML_FILES := $(patsubst %.lyx,%.html,$(LYX_FILES)) HTML_FILES := $(patsubst %.lyx,%.html,$(LYX_FILES))
# menue and footers are added (according to online/offline target) # menue and footers are added later
TARGET_FILES := $(foreach file,$(LYX_FILES),_output/$(basename $(notdir $(file))).html) TARGET_FILES := $(foreach file,$(LYX_FILES),_output/$(basename $(notdir $(file))).html)
# menue and footer files # menue and footer files
ASC_FILES := $(wildcard *.asc) ASC_FILES := $(wildcard *.asc)
# target: online or offline (will be overriden for online target automatically)
LINE_STATUS = offline
# look for lyx executable # look for lyx executable
LYX_BIN = $(shell which lyx lyx-qt lyx-xform | head -1) LYX_BIN = $(shell which lyx lyx-qt lyx-xform | head -1)
@ -20,7 +18,7 @@ LATEX2HTMLPREFIX := -no_auto_link -split 0 -no_navigation -no_subdir -dir _outpu
# virtual targets that have different names than the produced files - they will alway be executed, # virtual targets that have different names than the produced files - they will alway be executed,
# if another target depends on them (they do not look for timestamps) # if another target depends on them (they do not look for timestamps)
.PHONY : clean online offline clean-targets install all .PHONY : clean clean-targets install all
# default target (offline) # default target (offline)
all: $(TARGET_FILES) all: $(TARGET_FILES)
@ -42,22 +40,6 @@ clean-targets:
-rm $(TARGET_FILES) 2>/dev/null -rm $(TARGET_FILES) 2>/dev/null
online: LINE_STATUS=online
offline: LINE_STATUS=offline
# pruefen, ob die Menue-Datei durch eine neuere ersetzt werden muss - ansonsten: ignorieren
menue.inc online offline: menue_$(LINE_STATUS).inc
@if diff -qN menue.inc menue_$(LINE_STATUS).inc >/dev/null ;\
then true ;\
else cp menue_$(LINE_STATUS).inc menue.inc ;\
make $@ ;\
fi
# "make $@" is necessary, as the dependency of HTML_FILES was checked, before
# menue.inc was updated
online offline: $(TARGET_FILES)
# add headers, navigation and footers # add headers, navigation and footers
$(TARGET_FILES): $(HTML_FILES) $(ASC_FILES) $(TARGET_FILES): $(HTML_FILES) $(ASC_FILES)
cat $(shell find -name $(notdir $@) | grep -v "_output") footer.asc >$@ cat $(shell find -name $(notdir $@) | grep -v "_output") footer.asc >$@
@ -88,5 +70,4 @@ clean:
# -rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/menue.inc) 2>/dev/null # -rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/menue.inc) 2>/dev/null
# -rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/WARNINGS) 2>/dev/null # -rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/WARNINGS) 2>/dev/null
# -rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/$(dir).emergency) 2>/dev/null # -rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/$(dir).emergency) 2>/dev/null
-rm menue.inc