This commit is contained in:
lars 2005-04-24 12:46:10 +00:00
parent 5c6a0fca3c
commit 028a9d8571
2 changed files with 32 additions and 23 deletions

View file

@ -10,18 +10,20 @@ REVISIONS_DATUM = $(shell svn log -r $(ARBEITS_REVISION) -q | grep -v "^---" | c
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
TMP_DIR = $(TMP_ROOT)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX)
CCD_BUILD_DIR = $(TMP_ROOT)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX)
EXPORT_FILE = $(EXPORT_DIR)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX)
MIRROR_QUELLE_DIR = $(ROOT_DIR)
# Aktionen
ERZEUGE_MIRROR = _scripts/erzeuge_export_mirror.sh $(MIRROR_QUELLE_DIR) $(TMP_DIR)
ERZEUGE_TAR = tar cjhf $(EXPORT_FILE).tar.bz2 -C $(dir $(TMP_DIR)) $(notdir $(TMP_DIR))
ERZEUGE_ZIP = cd $(shell dirname $(TMP_DIR)); zip -9qr $(EXPORT_FILE).zip $(shell basename $(TMP_DIR))
ERZEUGE_ISO = mkisofs $(ISO_OPTS) -o $(EXPORT_FILE).iso $(TMP_DIR) 2>&1 | $(EINRUECKEN)
ERZEUGE_MIRROR = _scripts/erzeuge_export_mirror.sh $(MIRROR_QUELLE_DIR) $(CCD_BUILD_DIR)
ERZEUGE_TAR = tar cjhf $(EXPORT_FILE).tar.bz2 -C $(dir $(CCD_BUILD_DIR)) $(notdir $(CCD_BUILD_DIR))
ERZEUGE_ZIP = cd $(dir $(CCD_BUILD_DIR)); zip -9qr $(EXPORT_FILE).zip $(notdir $(CCD_BUILD_DIR))
ERZEUGE_ISO = mkisofs $(ISO_OPTS) -o $(EXPORT_FILE).iso $(CCD_BUILD_DIR) 2>&1 | $(EINRUECKEN)
# Sonstiges
ISO_OPTS = -iso-level 3 -J -joliet-long -relaxed-filenames -f -r -V $(EXPORT_PREFIX)$(REVISIONS_SUFFIX)
@ -36,7 +38,7 @@ EXPORT_FILE_SUFFIX := undefiniert
####### Allgemeine targets ###########
.PHONY : clean all doku check help website website-stable release release-stable source source-stable export-all erzeuge_mirror release_all release_all-stable setze_releaseinfos hole_svn_export svn_erzeuge_links verlinke_programme verlinke_chaosradio
.PHONY : clean all doku check help website website-stable release release-stable source source-stable export-all cd-template release_all release_all-stable setze_releaseinfos hole_svn_export svn_erzeuge_links verlinke_programme verlinke_chaosradio cd-template
all: doku
@ -78,20 +80,26 @@ website-stable: website
######## die Werkzeuge #########
doku: hole_quell_daten
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)
doku: cd-template
@echo "Aktualisiere das Doku-Verzeichnis ..."
@make -C $(MIRROR_QUELLE_DIR)/doku $(LINE_STATUS)
@make -C documents $(LINE_STATUS) install
erzeuge_mirror: doku hole_quell_daten
@echo "Erzeuge lokalen export-Mirror ..."
@$(ERZEUGE_MIRROR)
setze_releaseinfos: erzeuge_mirror
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' >$(TMP_DIR)/version.txt
@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 >$(TMP_DIR)/changelog.txt
@todos $(TMP_DIR)/changelog.txt
@svn log -r $(ARBEITS_REVISION):1 >$(CCD_BUILD_DIR)/changelog.txt
@todos $(CCD_BUILD_DIR)/changelog.txt
hole_quell_daten:
@if [ ! -e "$(MIRROR_QUELLE_DIR)" ] ;\
@ -101,18 +109,18 @@ hole_quell_daten:
else echo "Verwende existierende lokale svn-Kopie" ;\
fi
verlinke_programme: erzeuge_mirror
verlinke_programme: cd-template
@echo "Erzeuge Links zu den Programmen ..."
@[ -e "$(ROOT_DIR)/programme" ] && ln -s "$(ROOT_DIR)/programme" "$(TMP_DIR)" || (echo "Fehler: kein Programm-Verzeichnis ($(ROOT_DIR)/programme) gefunden!" >&2 ; false )
@[ -e "$(ROOT_DIR)/programme" ] && ln -s "$(ROOT_DIR)/programme" "$(CCD_BUILD_DIR)" || (echo "Fehler: kein Programm-Verzeichnis ($(ROOT_DIR)/programme) gefunden!" >&2 ; false )
verlinke_chaosradio: erzeuge_mirror
verlinke_chaosradio: cd-template
@echo "Erzeuge Links zu den ChaosRadio-Dateien ..."
@[ -e "$(ROOT_DIR)/ausLese/chaosradio" ] && ln -s "$(ROOT_DIR)/ausLese/chaosradio" "$(TMP_DIR)/ausLese" || echo "Warnung: keine ChaosRadio-Dateien gefunden ($(ROOT_DIR)/ausLese/chaosradio) - ignoriert" >&2
@[ -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
####### die Ausgabe-Formate ###########
website: EXPORT_FILE_SUFFIX := _website
website: erzeuge_mirror verlinke_programme
website: cd-template verlinke_programme
@echo "Gruppen-Schreibrecht setzen (fuer eduforge) ..."
@# fuer die Zugriffsrechte auf dem eduforge-Server
@chmod -R g+rw $(TMP_ROOT)
@ -122,7 +130,7 @@ website: erzeuge_mirror verlinke_programme
source: EXPORT_FILE_SUFFIX := _src
source: TMP_DIR = $(MIRROR_QUELLE_DIR)
source: CCD_BUILD_DIR = $(MIRROR_QUELLE_DIR)
source: hole_quell_daten
@echo "Erzeuge source-Archiv ..."
@$(ERZEUGE_TAR)

View file

@ -55,5 +55,6 @@ clean:
-rm $(TEX_FILES) 2>/dev/null
-rm $(HTML_FILES) 2>/dev/null
-rm _output/* 2>/dev/null
-rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/WARNINGS
-rm $(foreach dir,$(DOCUMENT_NAMES),$(dir)/$(dir).emergency) 2>/dev/null