2005-04-23 22:35:52 +02:00
|
|
|
########## Variablendefinitionen ###########
|
|
|
|
|
2005-12-12 21:47:35 +01:00
|
|
|
# Revisions-Variablen
|
2005-05-15 17:25:48 +02:00
|
|
|
REVISIONS_NR := $(shell svn -R info| grep ^Revision| cut -f2 -d " " | sort | tail -1)
|
2005-05-15 20:23:56 +02:00
|
|
|
REVISIONS_SUFFIX = _r$(REVISIONS_NR)
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
# Verzeichnisse
|
|
|
|
ROOT_DIR := $(shell pwd)
|
2005-05-15 17:25:48 +02:00
|
|
|
|
|
|
|
# Ablage der erstellten zip/iso-Dateien
|
|
|
|
EXPORT_DIR = $(ROOT_DIR)/export
|
|
|
|
# so beginnt das export-Verzeichnis
|
2005-04-23 22:35:52 +02:00
|
|
|
EXPORT_PREFIX := cryptocd
|
2005-12-12 21:47:35 +01:00
|
|
|
# wird an das export-Verzeichnis und die Archiv/iso-Dateien angehaengt
|
2006-06-10 13:10:03 +02:00
|
|
|
EXPORT_FILE_SUFFIX :=
|
2005-05-15 17:25:48 +02:00
|
|
|
EXPORT_FILE = $(EXPORT_DIR)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX)
|
|
|
|
|
|
|
|
# Zwischenlagerung
|
2005-04-23 22:35:52 +02:00
|
|
|
TMP_ROOT = $(ROOT_DIR)/tmp
|
2005-12-12 21:47:35 +01:00
|
|
|
CCD_BUILD_DIR = $(TMP_ROOT)/$(EXPORT_PREFIX)$(REVISIONS_SUFFIX)$(EXPORT_FILE_SUFFIX)
|
|
|
|
PROGRAMM_DIR = $(CCD_BUILD_DIR)/programme
|
2005-05-15 17:25:48 +02:00
|
|
|
|
2005-12-12 21:47:35 +01:00
|
|
|
# Verzeichnisse, die notfalls erstellt werden muessen
|
|
|
|
CREATE_DIRS = $(TMP_ROOT) $(EXPORT_DIR)
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
# Aktionen
|
2005-04-24 14:46:10 +02:00
|
|
|
ERZEUGE_TAR = tar cjhf $(EXPORT_FILE).tar.bz2 -C $(dir $(CCD_BUILD_DIR)) $(notdir $(CCD_BUILD_DIR))
|
2005-12-12 21:47:35 +01:00
|
|
|
ERZEUGE_ISO = mkisofs -quiet $(ISO_OPTS) -o $(EXPORT_FILE).iso $(CCD_BUILD_DIR) 2>&1 | $(EINRUECKEN)
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
# Sonstiges
|
2005-05-15 17:25:48 +02:00
|
|
|
# Optionen fuer mkisofs
|
2005-04-23 22:35:52 +02:00
|
|
|
ISO_OPTS = -iso-level 3 -J -joliet-long -relaxed-filenames -f -r -V $(EXPORT_PREFIX)$(REVISIONS_SUFFIX)
|
2005-05-15 17:25:48 +02:00
|
|
|
# Ausgabe-Filter zum Einruecken
|
2005-04-23 22:35:52 +02:00
|
|
|
EINRUECKEN = sed 's/^/\t/'
|
|
|
|
|
2005-12-12 21:47:35 +01:00
|
|
|
######### Variablen vererben ###########
|
2005-04-24 16:54:04 +02:00
|
|
|
export CCD_BUILD_DIR
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-05-15 17:25:48 +02:00
|
|
|
########### Allgemeine targets ###########
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2006-06-09 23:21:33 +02:00
|
|
|
.PHONY : clean clean-dist all documents check help website doku-release release source all cd-template kopiere_programme
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "allgemeine Targets:"
|
|
|
|
@echo " help - diese Uebersicht"
|
|
|
|
@echo " doku - das Doku-Verzeichnis erneuern"
|
2006-06-09 23:21:33 +02:00
|
|
|
@echo " clean - unnoetige Dateien loeschen (ohne downloads)"
|
|
|
|
@echo " dist-clean - unnoetige Dateien loeschen (inklusive downloads)"
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo " check - Pruefung der Links"
|
2005-12-12 21:47:35 +01:00
|
|
|
@echo " validate - Pruefung des html-Codes"
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo
|
|
|
|
@echo "Export-Targets:"
|
2005-05-15 17:25:48 +02:00
|
|
|
@echo " source - die lyx-Quellen und Bilder"
|
|
|
|
@echo " website - fuer die Webseite: mit Programmen, ohne Chaosradio"
|
2005-12-13 00:26:52 +01:00
|
|
|
@echo " doku-release - alles ausser Chaosradio"
|
|
|
|
@echo " release - mit Chaosradio-Dateien"
|
2005-12-12 21:47:35 +01:00
|
|
|
@echo " all - erstellt alle Export-Formen"
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2006-06-09 23:21:33 +02:00
|
|
|
|
2005-04-23 22:35:52 +02:00
|
|
|
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
|
2006-06-09 23:21:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
dist-clean: clean
|
|
|
|
# runtergeladene Dateien loeschen
|
|
|
|
@downloads/get_files.sh programme clean
|
2005-12-12 21:47:35 +01:00
|
|
|
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2006-06-10 13:10:03 +02:00
|
|
|
check: doku kopiere_programme
|
|
|
|
linkchecker -r 4 --ignore-url=^mailto: $(CCD_BUILD_DIR)/start.html
|
|
|
|
|
|
|
|
|
|
|
|
validate: doku kopiere_programme
|
|
|
|
validate $(CCD_BUILD_DIR)/doku/*.html
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-12-12 21:47:35 +01:00
|
|
|
|
2005-05-15 17:25:48 +02:00
|
|
|
# pruefe, ob alle notwendigen/empfohlenen Verzeichnisse existieren
|
2005-12-12 21:47:35 +01:00
|
|
|
verzeichnisstruktur: $(CREATE_DIRS)
|
|
|
|
$(CREATE_DIRS):
|
2005-04-24 16:54:04 +02:00
|
|
|
@if [ ! -e "$@" ] ; \
|
2005-12-12 21:47:35 +01:00
|
|
|
then echo -e "directory ($@) does not exist - I will create it" ; \
|
|
|
|
mkdir -p "$@" ; \
|
2005-04-24 16:54:04 +02:00
|
|
|
fi
|
|
|
|
|
2005-04-23 22:35:52 +02:00
|
|
|
######## 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)
|
2005-12-12 21:47:35 +01:00
|
|
|
@svn export cd-template "$(CCD_BUILD_DIR)"
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-05-15 17:25:48 +02:00
|
|
|
|
2005-04-24 14:46:10 +02:00
|
|
|
doku: cd-template
|
|
|
|
@echo "Aktualisiere das Doku-Verzeichnis ..."
|
2006-04-21 11:23:10 +02:00
|
|
|
@make -C documents
|
2005-12-12 21:47:35 +01:00
|
|
|
@#Kopieren der Dateien ins das Abbild-Verzeichnis
|
2005-05-14 16:39:20 +02:00
|
|
|
@make -C documents install
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-05-15 17:25:48 +02:00
|
|
|
|
2005-12-12 21:47:35 +01:00
|
|
|
kopiere_programme: cd-template
|
|
|
|
@echo "Kopiere die Programme ..."
|
|
|
|
@downloads/get_files.sh programme download
|
|
|
|
@downloads/get_files.sh programme verify
|
|
|
|
@downloads/get_files.sh programme install "$(PROGRAMM_DIR)"
|
2005-05-15 17:25:48 +02:00
|
|
|
|
2005-04-23 22:35:52 +02:00
|
|
|
|
|
|
|
####### die Ausgabe-Formate ###########
|
|
|
|
website: EXPORT_FILE_SUFFIX := _website
|
2005-12-12 21:47:35 +01:00
|
|
|
website: doku kopiere_programme
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo "Gruppen-Schreibrecht setzen (fuer eduforge) ..."
|
|
|
|
@chmod -R g+rw $(TMP_ROOT)
|
|
|
|
@echo "Erzeuge Archiv der online-Dateien ..."
|
|
|
|
@$(ERZEUGE_TAR)
|
|
|
|
|
|
|
|
|
|
|
|
source: EXPORT_FILE_SUFFIX := _src
|
2005-05-15 17:25:48 +02:00
|
|
|
source:
|
2005-12-12 21:47:35 +01:00
|
|
|
@echo "Exportiere die gewaehlte svn-Revision ($(REVISIONS_NR)) ..." ;\
|
2005-12-13 00:26:52 +01:00
|
|
|
rm -rf "$(CCD_BUILD_DIR)" ;\
|
|
|
|
svn export . "$(CCD_BUILD_DIR)" | $(EINRUECKEN)
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo "Erzeuge source-Archiv ..."
|
|
|
|
@$(ERZEUGE_TAR)
|
|
|
|
|
|
|
|
|
2005-12-13 00:26:52 +01:00
|
|
|
doku-release: EXPORT_FILE_SUFFIX := _doku
|
|
|
|
doku-release: ZIP_DIR := $(CCD_BUILD_DIR)/$(EXPORT_PREFIX)-doku$(REVISIONS_SUFFIX)
|
|
|
|
doku-release: doku
|
|
|
|
@echo "Kopiere die Doku-Dateien ..."
|
|
|
|
@rm -rf "$(ZIP_DIR)"
|
|
|
|
@rm -f "$(EXPORT_FILE).zip"
|
|
|
|
@cp -r "$(CCD_BUILD_DIR)/doku" "$(ZIP_DIR)"
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo "Erzeuge zip-Archiv ..."
|
2005-12-13 00:26:52 +01:00
|
|
|
@cd "$(dir $(ZIP_DIR))"; zip -9qr "$(EXPORT_FILE).zip" "$(notdir $(ZIP_DIR))"
|
|
|
|
@rm -rf "$(ZIP_DIR)"
|
|
|
|
|
2005-12-12 21:47:35 +01:00
|
|
|
|
2005-12-13 00:26:52 +01:00
|
|
|
release: EXPORT_FILE_SUFFIX := _release
|
|
|
|
release: doku kopiere_programme
|
2005-04-23 22:35:52 +02:00
|
|
|
@echo "Erzeuge iso-Image ..."
|
|
|
|
@$(ERZEUGE_ISO)
|
|
|
|
|
|
|
|
|
2005-12-12 21:47:35 +01:00
|
|
|
all:
|
2005-05-15 17:25:48 +02:00
|
|
|
@echo "Erstelle die Web-Seite ..."
|
2005-04-23 22:35:52 +02:00
|
|
|
@make website
|
|
|
|
|
2005-12-13 00:26:52 +01:00
|
|
|
@echo "Erstelle das Doku-Paket ..."
|
|
|
|
@make doku-release
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-12-13 00:26:52 +01:00
|
|
|
@echo "Erstelle das Release-Paket ..."
|
|
|
|
@make release
|
2005-04-23 22:35:52 +02:00
|
|
|
|
2005-05-15 17:25:48 +02:00
|
|
|
@echo "Erstelle das Quell-Paket ... "
|
|
|
|
@make source
|
2005-04-23 22:35:52 +02:00
|
|
|
|