From c4b03cd0aed5d32638923b5042990b00ef79d610 Mon Sep 17 00:00:00 2001 From: lars Date: Sun, 24 Apr 2005 14:54:04 +0000 Subject: [PATCH] make an die neue Struktur angepasst (website und release laeuft / source noch nicht) --- Makefile | 40 ++++++++++++++++++++++++---------------- documents/Makefile | 12 ++++++++---- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index be38510..f003b5f 100644 --- a/Makefile +++ b/Makefile @@ -9,15 +9,16 @@ REVISIONS_DATUM = $(shell svn log -r $(ARBEITS_REVISION) -q | grep -v "^---" | c # Verzeichnisse ROOT_DIR := $(shell pwd) EXPORT_DIR = $(ROOT_DIR)/export -PROG_DIR = $(ROOT_DIR)/programme EXT_DIR = $(ROOT_DIR)/extern EXT_DIR_PROGS = $(EXT_DIR)/programme EXT_DIR_CHAOSRADIO = $(EXT_DIR)/chaosradio # der Name der export-Archive EXPORT_PREFIX := cryptocd TMP_ROOT = $(ROOT_DIR)/tmp -CCD_BUILD_DIR = $(TMP_ROOT)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX) +CCD_BUILD_DIR = $(TMP_ROOT)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX) EXPORT_FILE = $(EXPORT_DIR)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX) +ERROR_DIRS = $(TMP_ROOT) $(EXT_DIR) $(EXPORT_DIR) $(EXT_DIR_PROGS) +WARNING_DIRS = $(EXT_DIR_CHAOSRADIO) # Aktionen ERZEUGE_MIRROR = _scripts/erzeuge_export_mirror.sh $(MIRROR_QUELLE_DIR) $(CCD_BUILD_DIR) @@ -35,6 +36,8 @@ LINE_STATUS = offline EXPORT_FILE_SUFFIX := undefiniert # gilt nur fuer "release" und "release_all" +####### Variablen, die vererbt werden sollen ########### +export CCD_BUILD_DIR ####### Allgemeine targets ########### @@ -66,6 +69,16 @@ check: make -C doku linkchecker -r 3 --intern='!^mailto:' --extern-strict-all start.html +verzeichnisstruktur: $(ERROR_DIRS) $(WARNING_DIRS) + +$(ERROR_DIRS): + @if [ ! -e "$@" ] ; \ + then echo -e "directory ($@) does not exist - it is required\n\tyou could symlink it or create this directory\n" ; \ + false ; \ + fi + +$(WARNING_DIRS): + @[ ! -e "$@" ] && echo -e "directory ($@) does not exist - it is recommended\n\tyou could create a symlink or make this directory\n" ####### speziell fuer die stable-targets ########### @@ -80,15 +93,10 @@ website-stable: website ######## die Werkzeuge ######### -verzeichnisstruktur: - $(if $(shell test ! -e $(TMP_ROOT)),$(error "the temporary directory ($(TMP_ROOT)) does not exist --- maybe you want to: (1) create a symlink: 'ln -s DIR_SOMEWHERE $(TMP_ROOT)' or (2) create a directory: 'mkdir $(TMP_ROOT)'")) - @-[ ! -e $(EXPORT_DIR) ] && $(error "the export directory ($(EXPORT_DIR)) does not exist --- maybe you want to: (1) create a symlink: 'ln -s DIR_SOMEWHERE $(EXPORT_DIR)' or (2) create a directory: 'mkdir $(EXPORT_DIR)'") - @-[ ! -e $(EXT_DIR) ] && $(error "the directory ($(EXT_DIR)) containing external content (programs and chaosradio) does not exist --- maybe you want to: (1) create a symlink: 'ln -s DIR_SOMEWHERE $(EXT_DIR)' or (2) create a directory: 'mkdir $(EXT_DIR)'") - @-[ ! -e $(EXT_DIR_PROGS) ] && $(warning "the directory ($(EXT_DIR_PROGS)) containing the necessary programs does not exist --- maybe you want to: (1) create a symlink: 'ln -s DIR_SOMEWHERE $(EXT_DIR_PROGS)' or (2) create a directory: 'mkdir $(EXT_DIR_PROGS)'") - @-[ ! -e $(EXT_DIR_CHAOSRADIO) ] && $(warning "the directory ($(EXT_DIR_CHAOSRADIO)) containing the chaosradio features does not exist --- maybe you want to: (1) create a symlink: 'ln -s DIR_SOMEWHERE $(EXT_DIR_CHAOSRADIO)' or (2) create a directory: 'mkdir $(EXT_DIR_CHAOSRADIO)'") - cd-template: verzeichnisstruktur - cp --remove-destination -rs cd-template/* $(CCD_BUILD_DIR) + @rm -rf $(CCD_BUILD_DIR) + @cp --remove-destination -r cd-template $(CCD_BUILD_DIR) + @rm -rf `find $(CCD_BUILD_DIR) -type d -name ".svn"` doku: cd-template @echo "Aktualisiere das Doku-Verzeichnis ..." @@ -96,10 +104,7 @@ doku: cd-template setze_releaseinfos: cd-template @echo "Passe version.txt an ..." - @cat version.txt | sed 's/REVISIONS_PLATZHALTER/$(ARBEITS_REVISION)/g; s/DATUMS_PLATZHALTER/$(REVISIONS_DATUM)/g' >$(CCD_BUILD_DIR)/version.txt - @echo "Erzeuge changelog.txt ..." - @svn log -r $(ARBEITS_REVISION):1 >$(CCD_BUILD_DIR)/changelog.txt - @todos $(CCD_BUILD_DIR)/changelog.txt + sed -i 's/REVISIONS_PLATZHALTER/$(ARBEITS_REVISION)/g; s/DATUMS_PLATZHALTER/$(REVISIONS_DATUM)/g' $(CCD_BUILD_DIR)/version.txt hole_quell_daten: @if [ ! -e "$(MIRROR_QUELLE_DIR)" ] ;\ @@ -111,11 +116,14 @@ hole_quell_daten: verlinke_programme: cd-template @echo "Erzeuge Links zu den Programmen ..." - @[ -e "$(ROOT_DIR)/programme" ] && ln -s "$(ROOT_DIR)/programme" "$(CCD_BUILD_DIR)" || (echo "Fehler: kein Programm-Verzeichnis ($(ROOT_DIR)/programme) gefunden!" >&2 ; false ) + @ln -s "$(EXT_DIR_PROGS)" "$(CCD_BUILD_DIR)/programme" verlinke_chaosradio: cd-template @echo "Erzeuge Links zu den ChaosRadio-Dateien ..." - @[ -e "$(ROOT_DIR)/ausLese/chaosradio" ] && ln -s "$(ROOT_DIR)/ausLese/chaosradio" "$(CCD_BUILD_DIR)/ausLese" || echo "Warnung: keine ChaosRadio-Dateien gefunden ($(ROOT_DIR)/ausLese/chaosradio) - ignoriert" >&2 + @if [ -e "$(EXT_DIR_CHAOSRADIO)" ]; \ + then ln -s "$(CCD_BUILD_DIR)/ausLese/chaosradio" "$(CCD_BUILD_DIR)/ausLese" ; \ + else echo "Warnung: keine ChaosRadio-Dateien gefunden ($(ROOT_DIR)/ausLese/chaosradio) - ignoriert" >&2 ; \ + fi ####### die Ausgabe-Formate ########### diff --git a/documents/Makefile b/documents/Makefile index dd0550b..027430b 100644 --- a/documents/Makefile +++ b/documents/Makefile @@ -16,10 +16,14 @@ LATEX2HTMLPREFIX := -no_auto_link -split 0 -no_navigation -no_subdir -dir _outpu all: $(HTML_FILES) 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" + ifndef CCD_BUILD_DIR + $(error "CCD_BUILD_DIR must be defined!") + endif + @if [ ! -e "$(CCD_BUILD_DIR)" ] ; \ + then echo "CCD_BUILD_DIR ($(CCD_BUILD_DIR)) does not exist!" ; \ + exit 1 ; \ + fi + @cp -r _output/* "$(CCD_BUILD_DIR)/doku" clean-targets: