2005-04-23 22:35:52 +02:00
|
|
|
########## Variablendefinitionen ###########
|
|
|
|
|
|
|
|
# Revision-Variablen
|
|
|
|
STABLE_REVISION := 143
|
|
|
|
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
|
2005-04-24 14:46:10 +02:00
|
|
|
EXT_DIR = $(ROOT_DIR)/extern
|
|
|
|
EXT_DIR_PROGS = $(EXT_DIR)/programme
|
|
|
|
EXT_DIR_CHAOSRADIO = $(EXT_DIR)/chaosradio
|
2005-04-23 22:35:52 +02:00
|
|
|
# der Name der export-Archive
|
|
|
|
EXPORT_PREFIX := cryptocd
|
|
|
|
TMP_ROOT = $(ROOT_DIR)/tmp
|
2005-04-24 16:54:04 +02:00
|
|
|
CCD_BUILD_DIR = $(TMP_ROOT)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)
|
2005-04-23 22:35:52 +02:00
|
|
|
EXPORT_FILE = $(EXPORT_DIR)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX)
|
2005-04-24 16:54:04 +02:00
|
|
|
ERROR_DIRS = $(TMP_ROOT) $(EXT_DIR) $(EXPORT_DIR) $(EXT_DIR_PROGS)
|
|
|
|
WARNING_DIRS = $(EXT_DIR_CHAOSRADIO)
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
# Aktionen
|
2005-04-24 14:46:10 +02:00
|
|
|
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)
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
# Sonstiges
|
|
|
|
ISO_OPTS = -iso-level 3 -J -joliet-long -relaxed-filenames -f -r -V $(EXPORT_PREFIX)$(REVISIONS_SUFFIX)
|
|
|
|
EINRUECKEN = sed 's/^/\t/'
|
|
|
|
|
|
|
|
# Voreinstellungen
|
|
|
|
ARBEITS_REVISION = $(AKTUELLE_REVISION)
|
|
|
|
LINE_STATUS = offline
|
|
|
|
EXPORT_FILE_SUFFIX := undefiniert
|
|
|
|
# gilt nur fuer "release" und "release_all"
|
|
|
|
|
2005-04-24 16:54:04 +02:00
|
|
|
####### Variablen, die vererbt werden sollen ###########
|
|
|
|
export CCD_BUILD_DIR
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
####### Allgemeine targets ###########
|
|
|
|
|
2005-05-12 21:48:11 +02:00
|
|
|
.PHONY : clean all documents 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
|
2005-04-23 22:35:52 +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)
|
2005-05-12 21:48:11 +02:00
|
|
|
-make -C documents clean
|
2005-04-23 22:35:52 +02:00
|
|
|
-rm -r $(TMP_ROOT)/* 2>/dev/null
|
|
|
|
|
|
|
|
check:
|
|
|
|
make -C doku
|
|
|
|
linkchecker -r 3 --intern='!^mailto:' --extern-strict-all start.html
|
|
|
|
|
2005-04-24 16:54:04 +02:00
|
|
|
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"
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
####### speziell fuer die stable-targets ###########
|
|
|
|
|
|
|
|
%-stable: ARBEITS_REVISION := $(STABLE_REVISION)
|
|
|
|
%-stable: MIRROR_QUELLE_DIR = $(TMP_ROOT)/svn-$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)
|
|
|
|
website: LINE_STATUS=online
|
|
|
|
|
|
|
|
release-stable: release
|
|
|
|
release_all-stable: release_all
|
|
|
|
source-stable: source
|
|
|
|
website-stable: website
|
|
|
|
|
|
|
|
######## die Werkzeuge #########
|
|
|
|
|
2005-04-24 14:46:10 +02:00
|
|
|
cd-template: verzeichnisstruktur
|
2005-04-24 16:54:04 +02:00
|
|
|
@rm -rf $(CCD_BUILD_DIR)
|
|
|
|
@cp --remove-destination -r cd-template $(CCD_BUILD_DIR)
|
|
|
|
@rm -rf `find $(CCD_BUILD_DIR) -type d -name ".svn"`
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-04-24 14:46:10 +02:00
|
|
|
doku: cd-template
|
|
|
|
@echo "Aktualisiere das Doku-Verzeichnis ..."
|
2005-05-14 15:19:19 +02:00
|
|
|
# aufgrund einer Seltsamkeit im doku-Makefile, muss es zweimal aufgerufen werden,
|
|
|
|
# wenn der online- zum offline-Status geaendert wird (und umgekehrt)
|
|
|
|
@make -C documents $(LINE_STATUS) install
|
2005-04-24 14:46:10 +02:00
|
|
|
@make -C documents $(LINE_STATUS) install
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-04-24 14:46:10 +02:00
|
|
|
setze_releaseinfos: cd-template
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo "Passe version.txt an ..."
|
2005-04-24 16:54:04 +02:00
|
|
|
sed -i 's/REVISIONS_PLATZHALTER/$(ARBEITS_REVISION)/g; s/DATUMS_PLATZHALTER/$(REVISIONS_DATUM)/g' $(CCD_BUILD_DIR)/version.txt
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
hole_quell_daten:
|
|
|
|
@if [ ! -e "$(MIRROR_QUELLE_DIR)" ] ;\
|
|
|
|
then mkdir -p $(shell dirname "$(MIRROR_QUELLE_DIR)") ;\
|
|
|
|
echo "Exportiere die gewaehlte svn-Revision ($(ARBEITS_REVISION)) ..." ;\
|
|
|
|
svn export -r $(ARBEITS_REVISION) . "$(MIRROR_QUELLE_DIR)" | $(EINRUECKEN) ;\
|
|
|
|
else echo "Verwende existierende lokale svn-Kopie" ;\
|
|
|
|
fi
|
|
|
|
|
2005-04-24 14:46:10 +02:00
|
|
|
verlinke_programme: cd-template
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo "Erzeuge Links zu den Programmen ..."
|
2005-04-24 16:54:04 +02:00
|
|
|
@ln -s "$(EXT_DIR_PROGS)" "$(CCD_BUILD_DIR)/programme"
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-04-24 14:46:10 +02:00
|
|
|
verlinke_chaosradio: cd-template
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo "Erzeuge Links zu den ChaosRadio-Dateien ..."
|
2005-04-24 16:54:04 +02:00
|
|
|
@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
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
####### die Ausgabe-Formate ###########
|
|
|
|
|
|
|
|
website: EXPORT_FILE_SUFFIX := _website
|
2005-04-24 14:46:10 +02:00
|
|
|
website: cd-template verlinke_programme
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo "Gruppen-Schreibrecht setzen (fuer eduforge) ..."
|
|
|
|
@# fuer die Zugriffsrechte auf dem eduforge-Server
|
|
|
|
@chmod -R g+rw $(TMP_ROOT)
|
|
|
|
|
|
|
|
@echo "Erzeuge Archiv der online-Dateien ..."
|
|
|
|
@$(ERZEUGE_TAR)
|
|
|
|
|
|
|
|
|
|
|
|
source: EXPORT_FILE_SUFFIX := _src
|
2005-04-24 14:46:10 +02:00
|
|
|
source: CCD_BUILD_DIR = $(MIRROR_QUELLE_DIR)
|
2005-04-23 22:35:52 +02:00
|
|
|
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
|
|
|
|
|