cryptocd/Makefile

156 lines
4.4 KiB
Makefile
Raw Normal View History

2005-04-23 22:35:52 +02:00
########## Variablendefinitionen ###########
2005-12-12 21:47:35 +01:00
# Revisions-Variablen
REVISIONS_NR := $(shell svn -R info| grep ^Revision| cut -f2 -d " " | sort | tail -1)
REVISIONS_SUFFIX = _r$(REVISIONS_NR)
2005-04-23 22:35:52 +02:00
# Verzeichnisse
ROOT_DIR := $(shell pwd)
# 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
EXPORT_FILE_SUFFIX := undefiniert
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)
CHAOSRADIO_DIR = $(CCD_BUILD_DIR)/ausLese/chaosradio
PROGRAMM_DIR = $(CCD_BUILD_DIR)/programme
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))
ERZEUGE_ZIP = cd $(dir $(CCD_BUILD_DIR)); zip -9qr $(EXPORT_FILE).zip $(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
# 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)
# Ausgabe-Filter zum Einruecken
2005-04-23 22:35:52 +02:00
EINRUECKEN = sed 's/^/\t/'
# Voreinstellung - wird nur fuer "make website" ueberschrieben
2005-04-23 22:35:52 +02:00
LINE_STATUS = offline
2005-12-12 21:47:35 +01:00
######### Variablen vererben ###########
export CCD_BUILD_DIR
2005-04-23 22:35:52 +02:00
########### Allgemeine targets ###########
2005-04-23 22:35:52 +02:00
2005-12-12 21:47:35 +01:00
.PHONY : clean all documents check help website small big source all cd-template kopiere_programme kopiere_chaosradio
2005-04-23 22:35:52 +02:00
help:
@echo "allgemeine Targets:"
@echo " help - diese Uebersicht"
@echo " doku - das Doku-Verzeichnis erneuern"
@echo " clean - unnoetige Dateien loeschen"
@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:"
@echo " source - die lyx-Quellen und Bilder"
@echo " website - fuer die Webseite: mit Programmen, ohne Chaosradio"
2005-12-12 21:47:35 +01:00
@echo " small - alles ausser Chaosradio"
@echo " big - mit Chaosradio-Dateien"
@echo " all - erstellt alle Export-Formen"
2005-04-23 22:35:52 +02:00
clean:
@echo $(ICH)
-make -C documents clean
2005-04-23 22:35:52 +02:00
-rm -r $(TMP_ROOT)/* 2>/dev/null
2005-12-12 21:47:35 +01:00
@downloads/get_files.sh clean
2005-04-23 22:35:52 +02:00
check:
2005-12-12 21:47:35 +01:00
make -C documents
2005-04-23 22:35:52 +02:00
linkchecker -r 3 --intern='!^mailto:' --extern-strict-all start.html
2005-12-12 21:47:35 +01:00
validate:
make -C documents
validate documents/_output/*.html
# pruefe, ob alle notwendigen/empfohlenen Verzeichnisse existieren
2005-12-12 21:47:35 +01:00
verzeichnisstruktur: $(CREATE_DIRS)
2005-12-12 21:47:35 +01:00
$(CREATE_DIRS):
@if [ ! -e "$@" ] ; \
2005-12-12 21:47:35 +01:00
then echo -e "directory ($@) does not exist - I will create it" ; \
mkdir -p "$@" ; \
fi
2005-04-23 22:35:52 +02:00
######## die Werkzeuge #########
2005-04-24 14:46:10 +02:00
cd-template: verzeichnisstruktur
@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-04-24 14:46:10 +02:00
doku: cd-template
@echo "Aktualisiere das Doku-Verzeichnis ..."
@make -C documents $(LINE_STATUS)
2005-12-12 21:47:35 +01:00
@#Kopieren der Dateien ins das Abbild-Verzeichnis
@make -C documents install
2005-04-23 22:35:52 +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-04-23 22:35:52 +02:00
2005-12-12 21:47:35 +01:00
kopiere_chaosradio: cd-template
@echo "Kopiere die ChaosRadio-Dateien ..."
@downloads/get_files.sh chaosradio download
@downloads/get_files.sh chaosradio verify
@downloads/get_files.sh chaosradio install "$(CHAOSRADIO_DIR)"
2005-04-23 22:35:52 +02:00
####### die Ausgabe-Formate ###########
website: LINE_STATUS=online
2005-04-23 22:35:52 +02:00
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
source:
2005-12-12 21:47:35 +01:00
@echo "Exportiere die gewaehlte svn-Revision ($(REVISIONS_NR)) ..." ;\
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-12 21:47:35 +01:00
small: EXPORT_FILE_SUFFIX := _small
small: doku kopiere_programme
2005-04-23 22:35:52 +02:00
@echo "Erzeuge zip-Archiv ..."
@$(ERZEUGE_ZIP)
2005-12-12 21:47:35 +01:00
big: EXPORT_FILE_SUFFIX := _big
big: doku kopiere_programme kopiere_chaosradio
2005-04-23 22:35:52 +02:00
@echo "Erzeuge iso-Image ..."
@$(ERZEUGE_ISO)
2005-12-12 21:47:35 +01:00
all:
@echo "Erstelle die Web-Seite ..."
2005-04-23 22:35:52 +02:00
@make website
2005-12-12 21:47:35 +01:00
@echo "Erstelle das kleine Release-Paket ..."
@make small
2005-04-23 22:35:52 +02:00
2005-12-12 21:47:35 +01:00
@echo "Erstelle das grosse Release-Paket ..."
@make big
2005-04-23 22:35:52 +02:00
@echo "Erstelle das Quell-Paket ... "
@make source
2005-04-23 22:35:52 +02:00