add link to cdist speeches

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2013-07-09 14:53:00 +02:00
parent 04b81f2a51
commit 5bdc2e1ba9
4 changed files with 63 additions and 61 deletions

104
Makefile
View File

@ -23,50 +23,83 @@ A2XH=a2x -f xhtml --no-xmllint -a encoding=UTF-8
helper=./bin/build-helper
MANDIR=docs/man
MAN1DSTDIR=$(MANDIR)/man1
MAN7DSTDIR=$(MANDIR)/man7
MANREF=$(MAN7DSTDIR)/cdist-reference.text
MANREFSH=$(MANDIR)/cdist-reference.text.sh
SPEECHDIR=docs/speeches
TYPEDIR=cdist/conf/type
WEBDIR=$$HOME/www.nico.schottelius.org
WEBBLOG=$(WEBDIR)/blog
WEBTOPDIR=$(WEBDIR)/software
WEBBASE=$(WEBTOPDIR)/cdist
WEBPAGE=$(WEBBASE).mdwn
CHANGELOG_VERSION=$(shell $(helper) changelog-version)
################################################################################
# Manpages for types
# Manpages
#
MAN1DSTDIR=$(MANDIR)/man1
MAN7DSTDIR=$(MANDIR)/man7
# Manpages #1: Types
# Use shell / ls to get complete list - $(TYPEDIR)/*/man.text does not work
TYPEMANSRC=$(shell ls $(TYPEDIR)/*/man.text)
MANTYPESRC=$(shell ls $(TYPEDIR)/*/man.text)
# replace first path component
TYPEMANPREFIX=$(subst cdist/conf/type/,docs/man/man7/cdist-type,$(TYPEMANSRC))
MANTYPEPREFIX=$(subst $(TYPEDIR),$(MAN7DSTDIR)/cdist-type,$(MANTYPESRC))
# replace man.text with .7 or .html
TYPEMANPAGES=$(subst /man.text,.7,$(TYPEMANPREFIX))
TYPEMANHTML=$(subst /man.text,.html,$(TYPEMANPREFIX))
MANTYPEMAN=$(subst /man.text,.7,$(MANTYPEPREFIX))
MANTYPEHTML=$(subst /man.text,.html,$(MANTYPEPREFIX))
MANTYPEALL=$(TYPEMANPAGES) $(TYPEMANHTML)
# Link manpage so A2XH does not create man.html but correct named file
$(MAN7DSTDIR)/cdist-type%.text: $(TYPEDIR)/%/man.text
ln -sf "../../../$^" $@
# Manpages #2: reference
MANREF=$(MAN7DSTDIR)/cdist-reference.text
MANREFSH=$(MANDIR)/cdist-reference.text.sh
MANREFMAN=$(MANREF:.text=.7)
MANREFHTML=$(MANREF:.text=.html)
MANREFALL=$(MANREFMAN) $(MANREFHTML)
$(MANREF): $(MANREFSH)
$(MANREFSH)
# Manpages #3: static pages
MAN1STATIC=$(shell ls $(MAN1DSTDIR)/*.text)
MAN7STATIC=$(shell ls $(MAN7DSTDIR)/*.text)
MANSTATICMAN=$(MAN1STATIC:.text=.1) $(MAN7STATIC:.text=.7)
MANSTATICHTML=$(MAN1STATIC:.text=.html) $(MAN7STATIC:.text=.html)
MANSTATICALL=$(MANSTATICMAN) $(MANSTATICHTML)
# Manpages #4: generic part
# Creating the type manpage
$(MAN7DSTDIR)/cdist-type%.7: $(MAN7DSTDIR)/cdist-type%.text
%.1 %.7: %.text
$(A2XM) $^
# Creating the type html page
$(MAN7DSTDIR)/cdist-type%.html: $(MAN7DSTDIR)/cdist-type%.text
%.html: %.text
$(A2XH) $^
typemanpage: $(TYPEMANPAGES)
typemanhtml: $(TYPEMANHTML)
man: $(MANTYPEALL) $(MANREFALL) $(MANSTATICALL)
# Manpages #5: release part
MANWEBDIR=$(WEBBASE)/man/$(CHANGELOG_VERSION)
release-man: man
rm -rf "${MANWEBDIR}"
mkdir -p "${MANWEBDIR}/man1" "${MANWEBDIR}/man7"
cp ${MAN1DSTDIR}/*.html ${MAN1DSTDIR}/*.css ${MANWEBDIR}/man1
cp ${MAN7DSTDIR}/*.html ${MAN7DSTDIR}/*.css ${MANWEBDIR}/man7
cd ${MANWEBDIR} && git add . && git commit -m "cdist manpages update: $(CHANGELOG_VERSION)"
################################################################################
# Speeches
#
SPEECHESOURCES=$(SPEECHDIR)/*.tex
SPEECHES=$(SPEECHESOURCES:.tex=.pdf)
SPEECHESWEBDIR=$(WEBBASE)/speeches
# Create speeches and ensure Toc is up-to-date
$(SPEECHDIR)/%.pdf: $(SPEECHDIR)/%.tex
@ -76,6 +109,12 @@ $(SPEECHDIR)/%.pdf: $(SPEECHDIR)/%.tex
speeches: $(SPEECHES)
release-speeches: speeches
rm -rf "${SPEECHESWEBDIR}"
mkdir -p "${SPEECHESWEBDIR}"
cp ${SPEECHES} "${SPEECHESWEBDIR}"
cd ${SPEECHESWEBDIR} && git add . && git commit -m "cdist speeches updated"
################################################################################
CHECKS=check-version check-date
@ -98,26 +137,6 @@ $(versionfile):
$(DIST): dist-check
$(RELEASE): $(DIST) $(CHECKS)
man: $(MANREF) mantype manbuild
$(MANREF): $(MANREFSH)
$(MANREFSH)
################################################################################
# manpage
# generate links from types
# build manpages
#
mantypedocuments=cdist/conf/type/*/man.text
mantypelist: $(mantypedocuments)
echo $^ >> $@
link-type-manpages:
$(helper) $@
################################################################################
# dist code
#
@ -135,7 +154,8 @@ $(archlinuxtar): PKGBUILD dist-pypi
################################################################################
# release code
#
release: pub $(RELEASE)
#release: pub $(RELEASE)
release: release-man
echo "Don't forget...: linkedin"
@ -157,7 +177,7 @@ PKGBUILD: PKGBUILD.in
clean:
rm -f $(MAN7DSTDIR)/cdist-reference.text
find "$(MANDIR)" -mindepth 2 -type l \
find "$(MANDIR)" -mindepth 2 -type l \
-o -name "*.1" \
-o -name "*.7" \
-o -name "*.html" \
@ -173,9 +193,3 @@ distclean:
# Archlinux
rm -f cdist-*.pkg.tar.xz cdist-*.tar.gz
rm -rf pkg/ src/
################################################################################
# generic call
%:
$(helper) $@

View File

@ -46,16 +46,6 @@ MAN7DSTDIR=${MANDIR}/man7
SPEECHESDIR=docs/speeches
case "$1" in
release-man)
version=$($0 changelog-version)
rm -rf "${WEBMAN}"
mkdir -p "${WEBMAN}/man1" "${WEBMAN}/man7"
cp ${MAN1DSTDIR}/*.html ${MAN1DSTDIR}/*.css ${WEBMAN}/man1
cp ${MAN7DSTDIR}/*.html ${MAN7DSTDIR}/*.css ${WEBMAN}/man7
cd ${WEBMAN} && git add . && git commit -m "Cdist Manpage update: $version"
;;
changelog-changes)
awk -F: 'BEGIN { start=0 } { if ($0 ~ /^[[:digit:]]/) { if(start == 0) {start = 1 } else { exit } } else { if(start==1) {print $0 }} }' "$basedir/docs/changelog"
;;
@ -245,12 +235,8 @@ eof
echo "VERSION = \"$(git describe)\"" > cdist/version.py
;;
# Targets handled in the makefile
speeches|clean|dist-clean)
;;
*)
echo "Unknown target $@ - aborting"
echo "Unknown helper target $@ - aborting"
exit 1
;;

View File

@ -4,7 +4,7 @@ Changelog
* Changes are always commented with their author in (braces)
* Exception: No braces means author == Nico Schottelius
next:
2.1.2: 2013-07-09
* Build: Change clean-dist target to "distclean"
* Core: Make global explorers available to initial manifest (Arkaitz Jimenez)
* Core: Change execution order to run object as one unit

View File

@ -4,4 +4,6 @@ You can browse the latest
[latest version of the manpages](/software/cdist/man/latest) or
have a look at [all versions](/software/cdist/man).
You can also view [speeches about cdist](/software/cdist/speeches).
[[!tag cdist unix]]