Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, September 12, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  Metafox  »  Documentation  »  TXT  »  Makefile

Metafox/txt/Makefile

#
# Makefile for creating distribution of Metafox.
# Type 'make dist' for create tar-gziped and zip archiv. 
#
# Based on phpMyEdit Makefile by Lubomir Host <rajo@platon.sk>
#

# $Platon: Metafox/doc/Makefile,v 1.17 2014-02-22 05:23:50 nepto Exp $

PACKAGE     = Metafox
VERSION     = 0.9.2
VERSION_DIR = 0.9.2
DATE        = 2014-02-22
DATE_HUMAN  = 22nd February 2014
export PACKAGE
export VERSION
export DATE
export DATE_HUMAN

#
# If you want to add directory to distribution, you must write firstly
# directory name into list (with ending slash) and than files from that
# directory.
#
# Wildcars usage is possible, but the convention allows it only for
# autogenerated files. Files in revision system such as CVS should be noted
# explicitly.
#

DISTFILES_CORE = doc doc/VERSION themes/ \
	$(shell cd ../ && find . -maxdepth 1 -name '*.php') \
	$(shell cd ../ && find admin config doc lib lib2 libpub sql themes/default \
	\( -type f -or -type d \) \
	-path 'lib2/*'     -prune -or \
	-path '*/CVS'      -prune -or \
	-path '*/.svn'     -prune -or \
	-name '*.gz'       -prune -or \
	-name '*.tgz'      -prune -or \
	-name '*.bz2'      -prune -or \
	-name '.*.swp'     -prune -or \
	-name '.cvsignore' -prune -or \
	-print) 

DISTFILES_DOC =		

# Extension of archives
ZIP_EXT         = .zip
TGZ_EXT         = .tar.gz
                
TAR             = tar
ZIP             = zip
ZIP_ENV         = -r9
GZIP_ENV        = --best

srcdir			= ..
distdir			= $(PACKAGE)-$(VERSION_DIR)
packname_core	= $(PACKAGE)-$(VERSION)
packname_doc	= $(PACKAGE)-doc-$(VERSION)
top_distdir		= $(distdir)
top_builddir	= .

all: dist

clean:

VERSION: Makefile
	echo $(VERSION) > $@

doc/sgml/defs.sgml: doc/sgml/defs.sgml.in
	sed -e 's/@PACKAGE@/$(PACKAGE)/g; \
	        s/@VERSION@/$(VERSION)/g; \
	        s/@DATE@/$(DATE)/g; \
			s/@DATE_HUMAN@/$(DATE_HUMAN)/g;' $< > $@
.PHONY: doc/sgml/defs.sgml

dist-all: dist
dist: dist-core

dist-core: distdir-core
	GZIP=$(GZIP_ENV) $(TAR) chozf $(packname_core)$(TGZ_EXT) $(distdir)
#	ZIP=$(ZIP_ENV) $(ZIP) $(packname_core)$(ZIP_EXT) $(distdir)
	-rm -rf $(distdir)

dist-doc: distdir-doc
	GZIP=$(GZIP_ENV) $(TAR) chozf $(packname_doc)$(TGZ_EXT) $(distdir)
#	ZIP=$(ZIP_ENV) $(ZIP) $(packname_doc)$(ZIP_EXT) $(distdir)
	-rm -rf $(distdir)

distdir-core:
	@export _DISTFILES="$(DISTFILES_CORE)"; \
	make distdir

distdir-doc: documentation
	@export _DISTFILES="$(DISTFILES_DOC)"; \
	make distdir

distdir: VERSION
	@-rm -rf $(distdir); \
	mkdir $(distdir); \
	here=`cd $(top_builddir) && pwd`; \
	top_distdir=`cd $(distdir) && pwd`; \
	distdir=`cd $(distdir) && pwd`;
	@for file in $(_DISTFILES); 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
	chmod -R u=rwX,g=,o=rX $(distdir)

documentation: html pdf

html: doc/sgml/defs.sgml
	@echo; \
	 echo "----------------------------------------------------"; \
	 echo "Generating HTML documentation, please be patient ..."; \
	 echo "----------------------------------------------------"; \
	 echo; \
	cd doc/									\
	&& docbook2html -o html/ "`pwd`/sgml/$(PACKAGE).sgml"	\
	&& cp -r sgml/images html/				\
	&& rm -rf html/images/CVS

pdf: doc/sgml/defs.sgml
	@echo; \
	 echo "---------------------------------------------------"; \
	 echo "Generating PDF documentation, please be patient ..."; \
	 echo "---------------------------------------------------"; \
	 echo; \
	cd doc/									\
	&& docbook2pdf -o pdf/ "`pwd`/sgml/$(PACKAGE).sgml"	\
	&& mv pdf/$(PACKAGE).pdf pdf/$(PACKAGE)-$(VERSION).pdf \
	&& rm -rf pdf/$(PACKAGE).out pdf/$(PACKAGE).aux pdf/$(PACKAGE).log


Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy