2006-01-13 11:44:02 +00:00
|
|
|
#
|
|
|
|
# ccollect
|
|
|
|
# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006
|
|
|
|
#
|
|
|
|
|
|
|
|
INSTALL=install
|
2007-06-22 09:21:17 +00:00
|
|
|
CCOLLECT_SOURCE=ccollect.sh
|
|
|
|
CCOLLECT_DEST=ccollect.sh
|
2006-01-13 11:44:02 +00:00
|
|
|
LN=ln -sf
|
2006-05-12 13:41:49 +00:00
|
|
|
ASCIIDOC=asciidoc
|
|
|
|
DOCBOOKTOTEXI=docbook2x-texi
|
2006-05-12 15:17:28 +00:00
|
|
|
DOCBOOKTOMAN=docbook2x-man
|
2006-10-26 09:55:16 +00:00
|
|
|
XSLTPROC=xsltproc
|
|
|
|
XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl
|
2007-08-17 09:07:55 +00:00
|
|
|
A2X=a2x
|
2006-01-13 11:44:02 +00:00
|
|
|
|
2006-03-08 22:02:34 +00:00
|
|
|
prefix=/usr/packages/ccollect-git
|
2007-06-22 09:23:37 +00:00
|
|
|
bindir=${prefix}/bin
|
|
|
|
destination=${bindir}/${CCOLLECT_DEST}
|
2006-01-13 11:44:02 +00:00
|
|
|
|
2007-08-17 09:07:55 +00:00
|
|
|
mandest=${prefix}/man/man1
|
|
|
|
manlink=/usr/local/man/man1
|
|
|
|
|
2006-01-13 11:44:02 +00:00
|
|
|
path_dir=/usr/local/bin
|
2007-06-22 09:23:37 +00:00
|
|
|
path_destination=${path_dir}/${CCOLLECT_DEST}
|
2006-01-13 11:44:02 +00:00
|
|
|
|
2006-01-17 11:11:05 +00:00
|
|
|
# where to publish
|
2006-10-15 19:27:29 +00:00
|
|
|
host=home.schottelius.org
|
|
|
|
dir=www/org/schottelius/unix/www/ccollect/
|
2007-06-22 09:23:37 +00:00
|
|
|
docdir=${dir}/doc
|
2006-01-17 11:11:05 +00:00
|
|
|
|
2006-05-12 13:54:38 +00:00
|
|
|
#
|
|
|
|
# Asciidoc will be used to generate other formats later
|
|
|
|
#
|
2007-08-17 09:07:55 +00:00
|
|
|
MANDOCS = doc/man/ccollect.text \
|
|
|
|
doc/man/add_ccollect_source.text \
|
|
|
|
doc/man/delete_ccollect_source.text \
|
|
|
|
doc/man/list_ccollect_intervals.text
|
|
|
|
|
2007-06-22 09:23:37 +00:00
|
|
|
DOCS = ${MANDOCS} doc/ccollect.text doc/ccollect-DE.text
|
2006-05-12 13:54:38 +00:00
|
|
|
|
2006-10-26 09:55:16 +00:00
|
|
|
#
|
|
|
|
# Doku
|
|
|
|
#
|
2007-06-22 09:23:37 +00:00
|
|
|
HTMLDOCS = ${DOCS:.text=.html}
|
|
|
|
DBHTMLDOCS = ${DOCS:.text=.htm}
|
2006-10-26 09:55:16 +00:00
|
|
|
|
2007-08-17 09:23:32 +00:00
|
|
|
# texi is broken currently, don't know why xslt things complain yet
|
2007-06-22 09:23:37 +00:00
|
|
|
TEXIDOCS = ${DOCS:.text=.texi}
|
2007-08-17 09:23:32 +00:00
|
|
|
TEXIDOCS =
|
|
|
|
|
|
|
|
PDFDOCS = ${DOCS:.text=.pdf}
|
2006-10-26 09:55:16 +00:00
|
|
|
|
2007-06-22 09:23:37 +00:00
|
|
|
MANPDOCS = ${MANDOCS:.text=.man}
|
2006-10-26 09:55:16 +00:00
|
|
|
|
2007-06-22 09:23:37 +00:00
|
|
|
DOCBDOCS = ${DOCS:.text=.docbook}
|
2006-10-26 09:55:16 +00:00
|
|
|
|
2007-08-17 09:23:32 +00:00
|
|
|
DOC_ALL = ${HTMLDOCS} ${DBHTMLDOCS} ${TEXIDOCS} ${MANPDOCS} ${PDFDOCS}
|
2006-10-26 09:55:16 +00:00
|
|
|
|
2007-06-22 09:23:37 +00:00
|
|
|
html: ${HTMLDOCS}
|
|
|
|
htm: ${DBHTMLDOCS}
|
|
|
|
info: ${TEXIDOCS}
|
|
|
|
man: ${MANPDOCS}
|
2007-08-17 09:23:32 +00:00
|
|
|
pdf: ${PDFDOCS}
|
2007-06-22 09:23:37 +00:00
|
|
|
documentation: ${DOC_ALL}
|
2006-10-26 09:55:16 +00:00
|
|
|
|
2006-01-22 11:53:45 +00:00
|
|
|
#
|
|
|
|
# End user targets
|
|
|
|
#
|
2006-01-13 11:44:02 +00:00
|
|
|
all:
|
2006-06-15 21:56:47 +00:00
|
|
|
@echo "----------- ccollect make targets --------------"
|
|
|
|
@echo "documentation: generate HTMl, Texinfo and manpage"
|
|
|
|
@echo "html: only generate HTML"
|
|
|
|
@echo "info: only generate Texinfo"
|
2007-06-22 09:23:37 +00:00
|
|
|
@echo "man: only generate manpage{s}"
|
|
|
|
@echo "install: install ccollect to ${prefix}"
|
2006-01-13 11:44:02 +00:00
|
|
|
|
2007-08-17 09:07:55 +00:00
|
|
|
install: install-link install-manlink
|
2006-01-22 11:53:45 +00:00
|
|
|
|
|
|
|
install-link: install-script
|
2007-06-22 09:23:37 +00:00
|
|
|
${LN} ${destination} ${path_destination}
|
2006-01-17 11:13:30 +00:00
|
|
|
|
2006-01-22 11:53:45 +00:00
|
|
|
install-script:
|
2007-06-22 09:23:37 +00:00
|
|
|
${INSTALL} -D -m 0755 ${CCOLLECT_SOURCE} ${destination}
|
2006-01-22 11:53:45 +00:00
|
|
|
|
2007-08-17 09:07:55 +00:00
|
|
|
install-man: man
|
|
|
|
${INSTALL} -d -m 0755 ${mandest}
|
|
|
|
${INSTALL} -D -m 0644 doc/man/*.1 ${mandest}
|
|
|
|
|
|
|
|
install-manlink: install-man
|
|
|
|
${INSTALL} -d -m 0755 ${manlink}
|
|
|
|
for man in ${mandest}/*; do ${LN} $$man ${manlink}; done
|
|
|
|
|
2006-05-12 13:41:49 +00:00
|
|
|
|
2006-10-26 09:55:16 +00:00
|
|
|
# docbook gets .htm, asciidoc directly .html
|
|
|
|
%.htm: %.docbook
|
|
|
|
${XSLTPROC} -o $@ ${XSL} $<
|
|
|
|
|
|
|
|
%.html: %.text %.docbook
|
|
|
|
${ASCIIDOC} -n -o $@ $<
|
|
|
|
|
2006-05-12 13:41:49 +00:00
|
|
|
%.html: %.text
|
|
|
|
${ASCIIDOC} -n -o $@ $<
|
|
|
|
|
|
|
|
%.docbook: %.text
|
|
|
|
${ASCIIDOC} -n -b docbook -o $@ $<
|
|
|
|
|
|
|
|
%.texi: %.docbook
|
|
|
|
${DOCBOOKTOTEXI} --to-stdout $< > $@
|
2006-01-13 11:44:02 +00:00
|
|
|
|
2007-08-17 09:07:55 +00:00
|
|
|
#%.mandocbook: %.text
|
|
|
|
# ${ASCIIDOC} -b docbook -d manpage -o $@ $<
|
|
|
|
|
|
|
|
#%.man: %.mandocbook
|
|
|
|
# ${DOCBOOKTOMAN} --to-stdout $< > $@
|
|
|
|
|
|
|
|
%.man: %.text
|
|
|
|
${A2X} -f manpage $<
|
2006-05-12 15:42:08 +00:00
|
|
|
|
2007-08-17 09:23:32 +00:00
|
|
|
%.pdf: %.text
|
|
|
|
${A2X} -f pdf $<
|
|
|
|
|
2006-05-12 15:17:28 +00:00
|
|
|
|
2006-01-17 11:13:30 +00:00
|
|
|
#
|
|
|
|
# Developer targets
|
|
|
|
#
|
|
|
|
update:
|
2006-10-15 19:27:29 +00:00
|
|
|
@cg-update home
|
2006-01-17 11:13:30 +00:00
|
|
|
|
|
|
|
push-work:
|
2006-10-15 19:27:29 +00:00
|
|
|
@cg-push home
|
2006-02-23 08:42:05 +00:00
|
|
|
@cg-push sygroup
|
2006-01-17 11:13:30 +00:00
|
|
|
|
2006-01-17 11:11:05 +00:00
|
|
|
publish-doc: documentation
|
2007-06-22 09:23:37 +00:00
|
|
|
@echo "Transferring files to ${host}"
|
|
|
|
@chmod a+r ${DOCS} ${DOC_ALL}
|
|
|
|
@tar c ${DOCS} ${DOC_ALL} | ssh ${host} "cd ${dir}; tar xv"
|
2006-05-12 13:54:38 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Distribution
|
|
|
|
#
|
2007-08-17 09:23:32 +00:00
|
|
|
clean:
|
2007-06-22 09:23:37 +00:00
|
|
|
rm -f ${DOC_ALL}
|
2007-08-17 09:07:55 +00:00
|
|
|
rm -f doc/man/*.[0-9] doc/man/*.xml
|
2006-05-12 13:54:38 +00:00
|
|
|
|
2007-08-17 09:23:32 +00:00
|
|
|
distclean: clean
|
2007-06-22 09:23:37 +00:00
|
|
|
rm -f ${DOCBDOCS}
|
2006-05-12 13:54:38 +00:00
|
|
|
|
2006-06-15 21:56:47 +00:00
|
|
|
#
|
|
|
|
# Be nice with the users and generate documentation for them
|
|
|
|
#
|
2006-05-12 13:54:38 +00:00
|
|
|
dist: distclean documentation
|
2007-08-14 12:57:26 +00:00
|
|
|
|
2007-08-17 09:23:32 +00:00
|
|
|
test: ccollect.sh documentation
|
2007-08-14 12:57:26 +00:00
|
|
|
CCOLLECT_CONF=./conf ./ccollect.sh daily "source with spaces"
|