#
# Copyright (C) 2003 - 2006 Bojan Smojver, Rexursive
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 2.1 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
# for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
#
ACLOCAL_AMFLAGS=-I m4
EXTRA_DIST=buildconf \
src/rxv_spin.h \
src/parser.y src/parser.c src/parser.h \
src/scanner.l src/scanner.c src/scanner.h \
src/config.m4 \
src/eatdoxygen.l src/eatdoxygen.c \
tests/comprehensive.sm tests/create-spintest.sql \
create-store.sql create-store-mysql.sql \
docs \
mod_spin.pc mod_spin.spec doxygen.conf spin.conf
SUBDIRS=src
# Configuration script
bin_SCRIPTS = rxv_spin-config
CLEANFILES = $(bin_SCRIPTS)
# Local targets (pkgconfig stuff, docs etc.)
all-local: mod_spin.pc
clean-local: docs-clean
rm -f mod_spin.pc mod_spin.spec doxygen.conf
# Some more data that want to build
noinst_DATA=mod_spin.spec doxygen.conf
# Documentation
doc_DATA=README INSTALL COPYING NEWS ChangeLog
# Manual pages
man_MANS=docs/man/man3/rxv_spin_as_functions.3 \
docs/man/man3/rxv_spin_connection_functions.3 \
docs/man/man3/rxv_spin_context_functions.3 \
docs/man/man3/rxv_spin_crypto_functions.3 \
docs/man/man3/rxv_spin_data.3 \
docs/man/man3/rxv_spin_database_functions.3 \
docs/man/man3/rxv_spin_data_functions.3 \
docs/man/man3/rxv_spin_dso_functions.3 \
docs/man/man3/rxv_spin_entry_functions.3 \
docs/man/man3/rxv_spin.h.3
# This should build all documentation
docs/man/man3/rxv_spin_as_functions.3: docs
tags/apr.tag:
mkdir tags || true
cp $(APR_TAG_FILES_LOCATION)/apr.tag tags || \
(echo '' > $@; touch -r src $@)
tags/apu.tag:
mkdir tags || true
cp $(APR_TAG_FILES_LOCATION)/apu.tag tags || \
cp $(APR_TAG_FILES_LOCATION)/apr.tag tags/apu.tag || \
(echo '' > $@; touch -r src $@)
tags/apreq2.tag:
mkdir tags || true
cp $(APREQ_TAG_FILES_LOCATION)/apreq2.tag tags || \
(echo '' > $@; touch -r src $@)
tags-clean:
rm -f tags/*
docs: src/rxv_spin.h README INSTALL COPYING NEWS doxygen.conf \
tags/apr.tag tags/apu.tag tags/apreq2.tag
doxygen doxygen.conf 2>/dev/null && touch docs
sed -e s@'.*'@'$(includedir)'@g \
docs/mod_spin.tag > docs/mod_spin.tag.fixed
mv -f docs/mod_spin.tag.fixed docs/mod_spin.tag
make -iC docs/latex
cp docs/latex/refman.pdf docs/mod_spin.pdf
docs-clean:
rm -rf docs tags
# Full directories have to be installed separately
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 mod_spin.pc $(DESTDIR)$(libdir)/pkgconfig
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(docdir)/html
$(INSTALL_DATA) docs/mod_spin.pdf $(DESTDIR)$(docdir)
$(INSTALL_DATA) docs/*.tag $(DESTDIR)$(docdir)
$(INSTALL_DATA) docs/html/*.{html,css,png,gif} $(DESTDIR)$(docdir)/html
$(INSTALL_SCRIPT) docs/html/installdox $(DESTDIR)$(docdir)/html
$(mkinstalldirs) $(DESTDIR)$(aclocaldir)
test "`tail -n 1 $(DESTDIR)$(aclocaldir)/mod_spin.m4`" = 'dnl PACKAGE' || \
$(INSTALL_DATA) m4/mod_spin.m4 $(DESTDIR)$(aclocaldir) || true
if PACKAGERBUILD
install-data-hook:
test "`tail -n 1 $(DESTDIR)$(aclocaldir)/mod_spin.m4`" = 'dnl PACKAGE' || \
echo 'dnl PACKAGE' >> $(DESTDIR)$(aclocaldir)/mod_spin.m4 || true
else
install-data-hook:
endif
uninstall-local:
rm -f $(DESTDIR)$(libdir)/pkgconfig/mod_spin.pc
rm -rf $(DESTDIR)$(docdir)/docs
test "`tail -n 1 $(DESTDIR)$(aclocaldir)/mod_spin.m4`" = 'dnl PACKAGE' || \
rm -f $(DESTDIR)$(aclocaldir)/mod_spin.m4 || true
uninstall-hook:
rmdir $(DESTDIR)$(docdir) || true
# Clean up unnecessary stuff from docs directory before distribution
dist-hook:
rm -rf $(distdir)/docs/latex