File: [Platon] / doc / soft-doc-sys / Makefile (download)
Revision 1.11, Fri Mar 26 23:44:51 2004 UTC (20 years ago) by nepto
Changes since 1.10: +3 -2
lines
Added slides/index.php into distribution.
|
#
# Makefile
#
# Developed by Lubomir Host 'rajo' <rajo AT platon.sk>
# Copyright (c) 2003-2004 Platon SDG, http://platon.sk/
# Licensed under terms of GNU General Public License.
# All rights reserved.
#
# Changelog:
# 31/07/2003 - created
# 26/03/2004 - changed building stuff according to new directory structure
#
# $Platon: doc/soft-doc-sys/Makefile,v 1.10 2004/03/26 22:38:11 nepto Exp $
# Makefile for creating distribution of soft-doc-sys package
# Type 'make dist' for create tar-gziped archiv.
PACKAGE = soft-doc-sys
VERSION = 1.2
unexport SUBDIRS
unexport SUBDIR_OBJECTS
unexport MAKEFILES
unexport CONFIGURE_SCRIPTS
export PACKAGE
export VERSION
# Directories {{{
srcdir = .
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
top_builddir = .
# }}} Directories
# Targets {{{
# if you have subdirectories with Makefiles,
# add names of directories here
SUBDIRS =
HTML_OUTPUT = html/en/index.html \
html/sk/index.html
PDF_OUTPUT = pdf/en/Software-documentation-systems.pdf \
pdf/sk/Systemy-softverovej-dokumentacie.pdf
EN_SGML = sgml/en/developer-doc-systems.sgml \
sgml/en/index.sgml \
sgml/en/introduction.sgml \
sgml/en/other-doc-systems.sgml \
sgml/en/user-doc-systems.sgml
SK_SGML = sgml/sk/developer-doc-systems.sgml \
sgml/sk/index.sgml \
sgml/sk/introduction.sgml \
sgml/sk/other-doc-systems.sgml \
sgml/sk/user-doc-systems.sgml \
SLIDES = slides/data.php \
slides/slide.css \
slides/slide.php \
slides/index.php
DISTFILES = Makefile \
slides/ \
$(SLIDES) \
sgml/ \
sgml/en/ \
sgml/sk/ \
$(EN_SGML) $(SK_SGML) \
html/ \
html/en/ \
html/en/* \
html/sk/ \
html/sk/* \
pdf/ \
pdf/en/ \
pdf/sk/ \
$(PDF_OUTPUT)
# }}} Targets
# Programs {{{
TAR = tar
ZIP = zip
ZIP_ENV = -r9
GZIP_ENV = --best
DOCBOOK2HTML = docbook2html
DOCBOOK2PDF = docbook2pdf
# }}} Programs
all: Makefile directories html pdf $(SLIDES)
directories:
mkdir -p html/en/
mkdir -p html/sk/
mkdir -p pdf/en/
mkdir -p pdf/sk/
html: $(HTML_OUTPUT)
pdf: $(PDF_OUTPUT)
pdf/en/%.pdf: Makefile $(EN_SGML)
$(DOCBOOK2PDF) sgml/en/index.sgml && mv index.pdf "$@"
pdf/sk/%.pdf: Makefile $(SK_SGML)
SP_ENCODING=iso-8859-2 \
$(DOCBOOK2PDF) sgml/sk/index.sgml && mv index.pdf "$@"
html/en/*:
html/en/%.html: Makefile $(EN_SGML)
$(DOCBOOK2HTML) -o html/en/ sgml/en/index.sgml
html/sk/*:
html/sk/%.html: Makefile $(SK_SGML)
$(DOCBOOK2HTML) -o html/sk/ sgml/sk/index.sgml
#
# False targets.
#
.PHONY: dummy
#
# A rule to do nothing
#
dummy:
clean: clean-subdirs
-rm -f index.out
#
# A rule to make subdirectories
#
subdir-list-all = $(sort $(patsubst %,_subdir_%,$(SUBDIRS)))
all-subdirs: dummy $(subdir-list-all)
ifdef SUBDIRS
$(subdir-list-all) : dummy
$(MAKE) -C $(patsubst _subdir_%,%,$@)
endif
#
# A rule to make clean in subdirectories
#
subdir-list-clean = $(sort $(patsubst %,_subdir_clean_%,$(SUBDIRS)))
clean-subdirs: dummy $(subdir-list-clean)
ifdef SUBDIRS
$(subdir-list-clean) : dummy
$(MAKE) -C $(patsubst _subdir_clean_%,%,$@) clean
endif
# Distribution targets {{{
dist: all distdir
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
#ZIP=$(ZIP_ENV) $(ZIP) $(distdir).zip $(distdir)
-rm -rf $(distdir)
dist-all: distdir
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
#ZIP=$(ZIP_ENV) $(ZIP) $(distdir).zip $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
@here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`;
@FILES=`echo "$(DISTFILES)" | awk 'BEGIN{RS=" "}{print}' | sort -u`; \
for file in $$FILES; do \
d=$(srcdir); \
if test -d $$d/$$file; then \
mkdir $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
# }}}
# vim600: fdm=marker fdc=3
Platon Group <platon@platon.org> http://platon.org/
|