2005-04-24 17:02:02 +02:00
|
|
|
########## Variablendefinitionen ###########
|
|
|
|
|
|
|
|
# Revision-Variablen
|
2005-05-09 22:16:00 +02:00
|
|
|
STABLE_REVISION := 143
|
2005-04-24 17:02:02 +02:00
|
|
|
AKTUELLE_REVISION := $(shell svn -R info| grep ^Revision| cut -f2 -d " " | sort | tail -1)
|
|
|
|
REVISIONS_SUFFIX = -r$(ARBEITS_REVISION)
|
|
|
|
REVISIONS_DATUM = $(shell svn log -r $(ARBEITS_REVISION) -q | grep -v "^---" | cut -d "|" -f 3)
|
|
|
|
|
|
|
|
# Verzeichnisse
|
|
|
|
ROOT_DIR := $(shell pwd)
|
|
|
|
EXPORT_DIR = $(ROOT_DIR)/export
|
|
|
|
PROG_DIR = $(ROOT_DIR)/programme
|
|
|
|
# der Name der export-Archive
|
|
|
|
EXPORT_PREFIX := cryptocd
|
|
|
|
TMP_ROOT = $(ROOT_DIR)/tmp
|
|
|
|
TMP_DIR = $(TMP_ROOT)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX)
|
|
|
|
EXPORT_FILE = $(EXPORT_DIR)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX)
|
|
|
|
MIRROR_QUELLE_DIR = $(TMP_ROOT)/svn-$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)
|
|
|
|
|
|
|
|
# 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)
|
|
|
|
|
|
|
|
# Sonstiges
|
|
|
|
ISO_OPTS = -iso-level 3 -J -joliet-long -relaxed-filenames -f -r -V $(EXPORT_PREFIX)$(REVISIONS_SUFFIX)
|
|
|
|
EINRUECKEN = sed 's/^/\t/'
|
2005-05-10 00:19:17 +02:00
|
|
|
REPOS_URL = https://svn.systemausfall.org/svn/cryptocd
|
2005-04-24 17:02:02 +02:00
|
|
|
|
|
|
|
# Voreinstellungen
|
|
|
|
ARBEITS_REVISION = $(AKTUELLE_REVISION)
|
|
|
|
EXPORT_FILE_SUFFIX := undefiniert
|
|
|
|
# gilt nur fuer "release" und "release_all"
|
|
|
|
|
|
|
|
|
|
|
|
####### Allgemeine targets ###########
|
|
|
|
|
2005-05-10 00:19:17 +02:00
|
|
|
.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 check_progs
|
2005-04-24 17:02:02 +02:00
|
|
|
|
|
|
|
all: doku
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "allgemeine Targets:"
|
|
|
|
@echo " help - diese Uebersicht"
|
|
|
|
@echo " doku - das Doku-Verzeichnis erneuern"
|
|
|
|
@echo " all - dasselbe wie 'doku'"
|
|
|
|
@echo " clean - unnoetige Dateien loeschen"
|
|
|
|
@echo " check - Pruefung der Links"
|
|
|
|
@echo
|
|
|
|
@echo "Export-Targets:"
|
|
|
|
@echo " source[-stable] - die lyx-Quellen und Bilder"
|
|
|
|
@echo " release[-stable] - alles ausser Chaosradio"
|
|
|
|
@echo " release_all[-stable] - mit Chaosradio-Dateien"
|
|
|
|
@echo " website[-stable] - fuer die Webseite: mit Programmen, ohne Chaosradio"
|
|
|
|
@echo " export-all - erstellt alle Export-Formen (auch stable)"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo $(ICH)
|
|
|
|
-make -C doku clean
|
|
|
|
-rm -r $(TMP_ROOT)/*
|
|
|
|
|
|
|
|
check:
|
|
|
|
linkchecker -r 3 --intern='!^mailto:' --extern-strict-all index.html
|
|
|
|
|
|
|
|
|
|
|
|
####### speziell fuer die stable-targets ###########
|
|
|
|
|
|
|
|
%-stable: ARBEITS_REVISION := $(STABLE_REVISION)
|
|
|
|
|
|
|
|
release-stable: release
|
|
|
|
release_all-stable: release_all
|
|
|
|
source-stable: source
|
|
|
|
|
|
|
|
######## die Werkzeuge #########
|
|
|
|
|
|
|
|
doku: hole_quell_daten
|
|
|
|
@echo "Aktualisiere das Doku-Verzeichnis ..."
|
|
|
|
@make -C $(MIRROR_QUELLE_DIR)/doku
|
|
|
|
|
|
|
|
erzeuge_mirror: doku hole_quell_daten
|
|
|
|
@echo "Erzeuge lokalen export-Mirror ..."
|
|
|
|
@$(ERZEUGE_MIRROR)
|
|
|
|
|
|
|
|
setze_releaseinfos: erzeuge_mirror
|
|
|
|
@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
|
|
|
|
@echo "Erzeuge changelog.txt ..."
|
2005-05-10 00:19:17 +02:00
|
|
|
@svn log -r $(ARBEITS_REVISION):1 $(REPOS_URL) >$(TMP_DIR)/changelog.txt
|
2005-04-24 17:02:02 +02:00
|
|
|
|
|
|
|
hole_quell_daten:
|
2005-05-10 00:19:17 +02:00
|
|
|
if [ ! -e "$(MIRROR_QUELLE_DIR)" ] ;\
|
2005-04-24 17:02:02 +02:00
|
|
|
then mkdir -p $(shell dirname "$(MIRROR_QUELLE_DIR)") ;\
|
|
|
|
echo "Exportiere die gewaehlte svn-Revision ($(ARBEITS_REVISION)) ..." ;\
|
2005-05-10 00:19:17 +02:00
|
|
|
svn export -r $(ARBEITS_REVISION) "$(REPOS_URL)" "$(MIRROR_QUELLE_DIR)" | $(EINRUECKEN) ;\
|
2005-04-24 17:02:02 +02:00
|
|
|
else echo "Verwende existierende lokale svn-Kopie" ;\
|
|
|
|
fi
|
|
|
|
|
|
|
|
verlinke_programme: erzeuge_mirror
|
|
|
|
@echo "Erzeuge Links zu den Programmen ..."
|
2005-05-10 00:19:17 +02:00
|
|
|
@[ -e "$(PROG_DIR)" ] && ln -s "$(PROG_DIR)" "$(TMP_DIR)" || (echo "Fehler: kein Programm-Verzeichnis ($(PROG_DIR)) gefunden!" >&2 ; false )
|
2005-04-24 17:02:02 +02:00
|
|
|
|
|
|
|
verlinke_chaosradio: erzeuge_mirror
|
|
|
|
@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
|
|
|
|
|
|
|
|
####### die Ausgabe-Formate ###########
|
|
|
|
|
|
|
|
website: EXPORT_FILE_SUFFIX := _website
|
|
|
|
website: erzeuge_mirror verlinke_programme
|
|
|
|
@echo "Passe Navigations-Frame fuer online-Version an ..."
|
|
|
|
@# jetzt doku/nav.html patchen, um in ausLese auf die Originale zu verweisen
|
|
|
|
@patch < _scripts/nav.html.diff $(TMP_DIR)/doku/nav.html >/dev/null
|
|
|
|
|
|
|
|
@echo "Fuege den unteren online-Frame hinzu ..."
|
|
|
|
@# jetzt _scripts/onlineframe.html nach $(TMP_DIR) kopieren
|
|
|
|
@cp _scripts/onlineframe.html $(TMP_DIR)/doku/onlineframe.html
|
|
|
|
|
|
|
|
@echo "Den online-Frame in der index.html einfuegen ..."
|
|
|
|
@#jetzt die index.html patchen, damit ein dritter unten-frame auf die online-Tatsache hinweist
|
|
|
|
@patch < _scripts/index.html.diff $(TMP_DIR)/index.html >/dev/null
|
|
|
|
|
|
|
|
@echo "Gruppen-Schreibrecht setzen (fuer eduforge) ..."
|
|
|
|
@# fuer die Zugriffsrechte auf dem eduforge-Server
|
|
|
|
@chmod -R g+w $(TMP_DIR)
|
|
|
|
|
|
|
|
@echo "Erzeuge Archiv der online-Dateien ..."
|
|
|
|
@$(ERZEUGE_TAR)
|
|
|
|
|
|
|
|
|
|
|
|
source: EXPORT_FILE_SUFFIX := _src
|
|
|
|
source: TMP_DIR = $(MIRROR_QUELLE_DIR)
|
|
|
|
source: hole_quell_daten
|
|
|
|
@echo "Erzeuge source-Archiv ..."
|
|
|
|
@$(ERZEUGE_TAR)
|
|
|
|
|
|
|
|
|
|
|
|
release: EXPORT_FILE_SUFFIX := _small
|
|
|
|
|
|
|
|
release_all: EXPORT_FILE_SUFFIX := _all
|
|
|
|
release_all: verlinke_chaosradio verlinke_programme
|
|
|
|
|
|
|
|
release release_all: verlinke_programme setze_releaseinfos
|
|
|
|
@echo "Erzeuge zip-Archiv ..."
|
|
|
|
@$(ERZEUGE_ZIP)
|
|
|
|
@echo "Erzeuge iso-Image ..."
|
|
|
|
@$(ERZEUGE_ISO)
|
|
|
|
|
|
|
|
|
|
|
|
export-all:
|
|
|
|
@echo "Erstelle website ..."
|
|
|
|
@make website
|
|
|
|
|
|
|
|
#make website-stable
|
|
|
|
# klappt nicht wegen des restriktiven diffs
|
|
|
|
|
|
|
|
@echo "Erstelle aktuelles Quell-Paket ... "
|
|
|
|
@make source
|
|
|
|
|
|
|
|
@echo "Erstelle stabiles Quell-Paket ..."
|
|
|
|
@make source-stable
|
|
|
|
|
|
|
|
@echo "Erstelle kleine aktuelle Release-Pakete ..."
|
|
|
|
@make release
|
|
|
|
|
|
|
|
@echo "Erstelle kleine stabile Release-Pakete ..."
|
|
|
|
@make release-stable
|
|
|
|
|
|
|
|
@echo "Erstelle grosse aktuelle Release-Pakete ..."
|
|
|
|
@make release_all
|
|
|
|
|
|
|
|
@echo "Erstelle grosse stabile Release-Pakete ..."
|
|
|
|
@make release_all-stable
|
|
|
|
|