From f7f4010e52b7cfc63389d8737650bf469fd2fd88 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 9 Aug 2011 19:34:12 +0000 Subject: [PATCH] make, scripts, tmpl/tex/de_presentation: Merged changes from V_1_2_0_35_NEUHAUS --- make/defs.mk | 2 + make/dirs.mk | 11 ++- make/run.mk | 39 +++++++-- make/tex.mk | 30 ++++--- scripts/integrate-distro.sh | 7 +- scripts/parse-valgrind-suppressions.sh | 57 +++++++++++++ tmpl/tex/de_presentation/Makefile | 8 ++ tmpl/tex/de_presentation/frontpage.tex.tmpl | 80 +++++++++++++++++++ tmpl/tex/de_presentation/header.tex.tmpl | 12 +++ tmpl/tex/de_presentation/index_head.html.tmpl | 54 +++++++++++++ tmpl/tex/de_presentation/index_tail.html.tmpl | 10 +++ 11 files changed, 285 insertions(+), 25 deletions(-) create mode 100644 scripts/parse-valgrind-suppressions.sh create mode 100644 tmpl/tex/de_presentation/Makefile create mode 100644 tmpl/tex/de_presentation/frontpage.tex.tmpl create mode 100644 tmpl/tex/de_presentation/header.tex.tmpl create mode 100644 tmpl/tex/de_presentation/index_head.html.tmpl create mode 100644 tmpl/tex/de_presentation/index_tail.html.tmpl diff --git a/make/defs.mk b/make/defs.mk index 89b997b6..c81c7db6 100644 --- a/make/defs.mk +++ b/make/defs.mk @@ -103,6 +103,8 @@ ifeq ($(DEVELOPMENT),true) ifneq ($(wildcard $(TOPDIR)/make/cfg_dev.mk),) -include $(TOPDIR)/make/cfg_dev.mk endif + export G_SLICE=always-malloc + export G_DEBUG=gc-friendly,resident-modules else -include $(MODDIR)/make/defs-dist.mk ifneq ($(wildcard $(TOPDIR)/make/cfg_dist.mk),) diff --git a/make/dirs.mk b/make/dirs.mk index 65506f13..ac8f06d5 100644 --- a/make/dirs.mk +++ b/make/dirs.mk @@ -39,7 +39,16 @@ dirs-%.done: touch $@ ifeq ($(DEVELOPMENT),true) -dirs-all.done: $(wildcard $(BUILD_HDRDIR)) $(PREREQ_DIRS_DONE) + +dirs-all.done: $(wildcard $(BUILD_HDRDIR)) + +ifeq ($(MAKECMDGOALS),all) +dirs-all.done: $(PREREQ_DIRS_DONE) +endif +ifeq ($(MAKECMDGOALS),install) +dirs-all.done: $(PREREQ_DIRS_DONE) +endif + dirs-install.done: dirs-all.done endif diff --git a/make/run.mk b/make/run.mk index 25bc889d..78d798d9 100644 --- a/make/run.mk +++ b/make/run.mk @@ -21,16 +21,15 @@ include $(MODDIR)/make/debugger.mk EXE_PATH ?= ./$(EXE) +ifneq ($(wildcard local.supp),) +VALGRIND_OPTS += --suppressions=local.supp +endif + all: install: -valgrind: - rm -f $(CORE) - valgrind $(VALGRIND_OPTS) $(EXE_PATH) $(EXE_ARGS) - -callgrind: - rm -f $(CORE) - valgrind --tool=callgrind $(VALGRIND_OPTS) $(EXE_PATH) $(EXE_ARGS) - +clean: +distclean: + ifeq ($(TARGET),mingw) run test: all @echo "wine $(EXE_PATH) $(EXE_ARGS)" @@ -46,6 +45,7 @@ clean: winrunclean winrunclean: rm -f start.bat + else run test: all rm -f $(CORE) @@ -54,6 +54,8 @@ start: all rm -f $(CORE) $(EXE_PATH) $(EXE_ARGS) & +clean: vg-clean-supp + # unfortunately iwatch only supports one directory :-( autorun: make run & @@ -65,6 +67,27 @@ wait-stop: restart: stop wait-stop all start +valgrind: + rm -f $(CORE) + valgrind $(VALGRIND_OPTS) $(EXE_PATH) $(EXE_ARGS) + +supp.tmp: + valgrind --gen-suppressions=all $(EXE_PATH) $(EXE_ARGS) 2>$@.tmp; mv $@.tmp $@ || exit 0 + +vg-create-supp: supp.tmp + cat $< | $(MOD_SCRIPT_DIR)/parse-valgrind-suppressions.sh > local.supp + rm -f supp.tmp + +vg-add-supp: + cat | $(MOD_SCRIPT_DIR)/parse-valgrind-suppressions.sh >> local.supp + +vg-clean-supp: + rm -f local.supp + +callgrind: + rm -f $(CORE) + valgrind --tool=callgrind $(VALGRIND_OPTS) $(EXE_PATH) $(EXE_ARGS) + endif stop: diff --git a/make/tex.mk b/make/tex.mk index 02ee42fd..73293c1a 100644 --- a/make/tex.mk +++ b/make/tex.mk @@ -10,6 +10,8 @@ ifeq ($(TEX_TMPL_DIR), "") TEX_TMPL_DIR = thisisnotadirectory endif latex = latex +PDFLATEX = pdflatex +PDF_VIEWER = $(firstword $(shell which okular kpdf acroread)) # this is what is there already PRE_FIG_LOCAL = $(wildcard *.fig) @@ -32,6 +34,7 @@ GENERATED_HTML = $(filter %.html,$(GENERATED)) CMD_PARSE_GRAPHICS = sed '/includegraphics/ !d; s/[^{]*{\([^}]*\).*/\1/; /^\.\./ d; s/^.\///' *.tex *.tmpl | sort -u +CONTACT_EMAIL ?= contact@jannet.de ifeq ($(DIST_VERSION),) DIST_VERSION = $(VERSION) endif @@ -92,9 +95,10 @@ define mangle_tmpl @echo "+ generating $< -> $@" @if [ $(suffix $@) = tex ]; then echo -e $(TEX_WARN_DONT_EDIT) > $@; fi @if [ $(suffix $@) = html ]; then echo -e $(HTML_WARN_DONT_EDIT) > $@; fi - @cat $< | sed -e "\ + cat $< | sed -e "\ s%__DATE__%$(DATE)%g; \ s%__AUTHORS__%$(AUTHORS)%g; \ + s%__CONTACT_EMAIL__%$(CONTACT_EMAIL)%g; \ s%__TITLE__%$(TITLE)%g; \ s%__VERSION__%$(DIST_VERSION)%g; \ s%__SUBTITLE__%$(SUBTITLE)%g; \ @@ -111,13 +115,13 @@ define mangle_tmpl s%__DOCUMENT_CLASS__%$(DOCUMENT_CLASS)%g; \ s%__UPLOAD_MODULE_PATH__%$(UPLOAD_MODULE_PATH)%g; \ s%__UPLOAD_TEST_PREFIX__%$(UPLOAD_TEST_PREFIX)%g; \ - s%ä%\\\\\"a%g; \ - s%Ä%\\\\\"A%g; \ - s%ö%\\\\\"o%g; \ - s%Ö%\\\\\"O%g; \ - s%ü%\\\\\"u%g; \ - s%Ü%\\\\\"U%g; \ - s%ß%\\\"s%g; \ + s%ä%\\\\\"a%g; \ + s%Ä%\\\\\"A%g; \ + s%ö%\\\\\"o%g; \ + s%Ö%\\\\\"O%g; \ + s%ü%\\\\\"u%g; \ + s%Ü%\\\\\"U%g; \ + s%ß%\\\"s%g; \ s%\xc3\xa4%\\\\\"a%g; \ s%\xc3\x84%\\\\\"A%g; \ s%\xc3\xb6%\\\\\"o%g; \ @@ -226,8 +230,8 @@ xdvi: $(LATEX_INPUT) xpdf: $(LATEX_INPUT) @echo "-- running latex just once ..." - pdflatex $(MAIN).tex - kpdf $(MAIN).pdf + $(PDFLATEX) $(MAIN).tex + $(PDF_VIEWER) $(MAIN).pdf $(OUT).tex.zip: cfgtest $(LATEX_INPUT) @echo "-- creating zipfile with tex source files" @@ -281,7 +285,7 @@ $(OUT).html.zip: $(HTMLDIR) $(OUTPUT).pdf: $(GENERATED) @echo "-- creating pdf file" - @for i in 1 2 3 ; do echo "================================================================== pass $$i: running pdflatex $(MAIN).tex"; pdflatex $(MAIN).tex || exit 1; done + @for i in 1 2 3 ; do echo "================================================================== pass $$i: running $(PDFLATEX) $(MAIN).tex"; $(PDFLATEX) $(MAIN).tex || exit 1; done @mv $(MAIN).pdf $(OUTPUT).pdf $(OUT).pdf.zip: $(OUTPUT).pdf @@ -302,7 +306,7 @@ html_install: $(HTMLDIR) clean: @echo "-- cleaning up ..." - rm -rf *.aux *.toc *.dvi *.pdf *.ps *~ *.log *.done *.rep \ + rm -rf *.aux *.toc *.dvi *.pdf *.ps *~ *.log *.done *.rep *.nav *.snm \ *.4ct *.4tc *.4of *.4oo *.4os *.4og */*.4og *.css *.html *.idv *.lg *.xref *.odt \ *.lol *.bak *.idx *.ilg *.ind *.out *.brf .\#* \#* \ $(NEWDIRS) $(OUTPUT).txt \ @@ -316,7 +320,7 @@ priceclean: clean done view: pdf - kpdf *.pdf + $(PDF_VIEWER) *.pdf unzip: unzip *.zip diff --git a/scripts/integrate-distro.sh b/scripts/integrate-distro.sh index d8ae9d69..a7d7e7d4 100644 --- a/scripts/integrate-distro.sh +++ b/scripts/integrate-distro.sh @@ -73,6 +73,7 @@ payload_pkgs=" fuse mdadm + smartmontools device-mapper insserv suspend @@ -757,9 +758,6 @@ cmd_install() cp -rp $c $root$c done - # seed the ldap database - slapcat | chroot $root /usr/sbin/slapadd -qw - make_netboot_etc_ldap_conf > $root/etc/ldap.conf.netboot make_netboot_etc_openldap_ldap_conf > $root/etc/openldap/ldap.conf.netboot make_netboot_etc_hosts > $root/etc/hosts.netboot @@ -791,6 +789,9 @@ cmd_install() # chroot $root zypper $zypper_global_opts -t srcpackage --download-only $payload_pkgs #kernel_version=`readlink -f $root/boot/vmlinuz 2>/dev/null | xargs basename | sed 's/vmlinuz-//'` + # seed the ldap database + slapcat | chroot $root /usr/sbin/slapadd -qw + [ "$install_dev" ] && setup_boot_loader_local setup_boot_loader_net (cd $root/boot; ln -sf vmlinuz-$kernel_version vmlinuz) diff --git a/scripts/parse-valgrind-suppressions.sh b/scripts/parse-valgrind-suppressions.sh new file mode 100644 index 00000000..e42da24a --- /dev/null +++ b/scripts/parse-valgrind-suppressions.sh @@ -0,0 +1,57 @@ +#! /usr/bin/awk -f +# A script to extract the actual suppression info from the output of (for example) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all ./minimal +# The desired bits are between ^{ and ^} (including the braces themselves). +# The combined output should either be appended to /usr/lib/valgrind/default.supp, or placed in a .supp of its own +# If the latter, either tell valgrind about it each time with --suppressions=, or add that line to ~/.valgrindrc + +# NB This script uses the |& operator, which I believe is gawk-specific. In case of failure, check that you're using gawk rather than some other awk + +# The script looks for suppressions. When it finds one it stores it temporarily in an array, +# and also feeds it line by line to the external app 'md5sum' which generates a unique checksum for it. +# The checksum is used as an index in a different array. If an item with that index already exists the suppression must be a duplicate and is discarded. + +BEGIN { suppression=0; md5sum = "md5sum" } + # If the line begins with '{', it's the start of a supression; so set the var and initialise things + /^{/ { + suppression=1; i=0; next + } + # If the line begins with '}' its the end of a suppression + /^}/ { + if (suppression) + { suppression=0; + close(md5sum, "to") # We've finished sending data to md5sum, so close that part of the pipe + ProcessInput() # Do the slightly-complicated stuff in functions + delete supparray # We don't want subsequent suppressions to append to it! + } + } + # Otherwise, it's a normal line. If we're inside a supression, store it, and pipe it to md5sum. Otherwise it's cruft, so ignore it + { if (suppression) + { + supparray[++i] = $0 + print |& md5sum + } + } + + + function ProcessInput() + { + # Pipe the result from md5sum, then close it + md5sum |& getline result + close(md5sum) + # gawk can't cope with enormous ints like $result would be, so stringify it first by prefixing a definite string + resultstring = "prefix"result + + if (! (resultstring in chksum_array) ) + { chksum_array[resultstring] = 0; # This checksum hasn't been seen before, so add it to the array + OutputSuppression() # and output the contents of the suppression + } + } + + function OutputSuppression() + { + # A suppression is surrounded by '{' and '}'. Its data was stored line by line in the array + print "{" + for (n=1; n <= i; ++n) + { print supparray[n] } + print "}" + } diff --git a/tmpl/tex/de_presentation/Makefile b/tmpl/tex/de_presentation/Makefile new file mode 100644 index 00000000..c4978a6c --- /dev/null +++ b/tmpl/tex/de_presentation/Makefile @@ -0,0 +1,8 @@ +# (c) 2001 jannet it services +# contact@jannet.de +# $Id$ + +TOPDIR = ../.. + +include $(TOPDIR)/make/proj.mk +include $(MODDIR)/make/text.mk diff --git a/tmpl/tex/de_presentation/frontpage.tex.tmpl b/tmpl/tex/de_presentation/frontpage.tex.tmpl new file mode 100644 index 00000000..94165ad6 --- /dev/null +++ b/tmpl/tex/de_presentation/frontpage.tex.tmpl @@ -0,0 +1,80 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% tex frontpage for technical documents % +% (c) 2001 jannet it services % +% Authors: Jan Lindemann % +% contact@jannet.de % +% patches, bugfixes and comments are welcome at patch@jannet.de % +% % +% $Id$ +% % +% This program is free software; permission to use, copy, modify, % +% distribute, and sell this software and its documentation under the % +% terms of the GNU Public license as published by the Free Software % +% Foundation, either version 2 or any later version of the license, is % +% hereby granted without fee, provided that (i) the above copyright % +% notices and this permission notice appear in all copies of the % +% software and related documentation, and (ii) the name of jannet may % +% not be used in any advertising or publicity relating to the software % +% without the specific, prior written permission of jannet. % +% % +% This program is distributed in the hope that it will be useful, but % +% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- % +% TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General % +% Public License for more details. % +% % +% You should have received a copy of the GNU General Public License % +% along with this program; if not, write to the Free Software Founda- % +% tion, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\thispagestyle{empty} + +%\begin{figure}[t] +%\begin{flushright} +%%\begin{minipage}[t]{8cm} +%%\includegraphics[width=6cm,height=3cm]{__FRONTLOGO_EPS__} +%\includegraphics{__FRONTLOGO_EPS__} +%%%\end{minipage} +%\end{flushright} +%\end{figure} + +\begin{center} +\fbox{ +\parbox[t]{15cm} +{ +\vspace{0.3cm} + +\centerline{\Huge \bf __TITLE__} + +\vspace{0.3cm} + +\centerline{\Huge \bf __SUBTITLE__} + +\vspace{0.3cm} + +}} + +\vspace{3cm} + +\centerline{\Large __DATE__} + +\vspace{0.3cm} + +\centerline{\Large Dokumentversion: __VERSION__} + +\vspace{0.3cm} + +\end{center} + +%\begin{figure}[b] +%\begin{flushright} +%\begin{minipage}[b]{12cm} +%\begin{flushright} +%{\Large __AUTHORS__} +%\end{flushright} +%\end{minipage} +%\end{flushright} +%\end{figure} + + diff --git a/tmpl/tex/de_presentation/header.tex.tmpl b/tmpl/tex/de_presentation/header.tex.tmpl new file mode 100644 index 00000000..4c63208d --- /dev/null +++ b/tmpl/tex/de_presentation/header.tex.tmpl @@ -0,0 +1,12 @@ +% vim: set filetype=tex : +\documentclass[slidestop,usepdftitle=false]{beamer} +\usepackage[accumulated]{beamerseminar} +\usepackage{beamertexpower} +\usepackage{beamerthemeshadow} + +\usepackage{tikz} +\usetikzlibrary{decorations.pathreplacing} + +\title{__TITLE__ - __SUBTITLE__} +\author[__AUTHORS__]{__AUTHORS__\\\code{mailto:__CONTACT_EMAIL__}} +\date{__DATE__} diff --git a/tmpl/tex/de_presentation/index_head.html.tmpl b/tmpl/tex/de_presentation/index_head.html.tmpl new file mode 100644 index 00000000..de4f1d7e --- /dev/null +++ b/tmpl/tex/de_presentation/index_head.html.tmpl @@ -0,0 +1,54 @@ + + + + + + + + __TITLE__ + + + + + + + + + +
+
+ +
+ +
+ +
+ +

__TITLE__

+

__SUBTITLE__

+

__DATE__

+

Version: __VERSION__

+  +  +

__AUTHORS__

+  +
+
+ +
+

+ +

Achtung!

+ +Diese Website wurde automatisch mit Hilfe des Skripts +latex2html erstellt. +Obwohl es ein sehr nützliches Programm ist, ist bei seiner Anwendung ein Teil des ursprüichen Dokuments verloren gegangen. +Wenn Sie das ganze Dokument fehlerfrei einsehen wollen, dann benutzen Sie bitte eine der unten zum Download angebotenen Versionen. +

+ +

diff --git a/tmpl/tex/de_presentation/index_tail.html.tmpl b/tmpl/tex/de_presentation/index_tail.html.tmpl new file mode 100644 index 00000000..5c8e0703 --- /dev/null +++ b/tmpl/tex/de_presentation/index_tail.html.tmpl @@ -0,0 +1,10 @@ +

+

+
+
+  +  +contents +
+ +