1# $Id$
2
3## Process this file with automake to produce Makefile.in
4RSYNC = rsync --rsh=ssh
5
6# build the following subdirectories
7
8SUBDIRS = po src bindings tests etc
9
10if BUILD_DOCS
11SUBDIRS += doc
12endif
13
14if BUILD_EXAMPLES
15SUBDIRS += examples
16endif
17
18 # the following files are not mentioned in any other Makefile
19EXTRA_DIST = COPYRIGHT CHANGES TODO CONTRIBUTORS THREADS VERSION LICENSE \
20             rrdtool.spec favicon.ico bootstrap \
21             libtool .indent.pro \
22             m4/snprintf.m4 \
23             win32/build-rrdtool.dot win32/build-rrdtool.pdf win32/build-rrdtool.svg \
24             win32/librrd-4.def win32/librrd-4.rc win32/librrd-4.vcxproj \
25             win32/Makefile.msc win32/README win32/README-MinGW-w64 win32/rrdcgi.rc win32/rrd_config.h \
26             win32/rrd.sln win32/rrdtool.rc win32/rrdtool.sln win32/rrdtool.vcxproj win32/rrdupdate.rc \
27             win32/rrdupdate.sln win32/rrdupdate.vcxproj win32/uac.manifest \
28             win32/asprintf.c win32/asprintf.h win32/dirent.h win32/vasprintf-msvc.c
29
30CLEANFILES = config.cache
31
32# use relaxed rules when building dists
33AUTOMAKE_OPTIONS= foreign
34
35# where we keep local rules for automake
36ACLOCAL_AMFLAGS=-I m4
37ACLOCAL_M4= $(top_srcdir)/aclocal.m4
38#AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config
39#AUTOCONF = @AUTOCONF@ --localdir=$(top_srcdir)/config
40
41#	$(RSYNC) CHANGES archive/$(PACKAGE)-$(VERSION).tar.gz tobi@ipn.caida.org:/ipn/web/Tools/RRDtool/pub/
42
43etc-install:
44	cd etc && $(MAKE) install
45
46site-perl-inst: site-perl-install
47
48site-perl-install: all bindings/perl-piped/Makefile bindings/perl-shared/Makefile
49	cd bindings/perl-piped && $(MAKE) install
50	cd bindings/perl-shared && $(MAKE) install
51
52site-tcl-install: all
53	cd bindings/tcl && $(MAKE) tcl-install
54
55site-python-install: all
56	cd bindings/python && $(PYTHON) setup.py install $(if $(DESTDIR),--root=$(DESTDIR))
57
58# Skip this part of "make distcheck": the perl, ruby, and tcl files
59# are not uninstalled by "make uninstall".
60distuninstallcheck:
61	@:
62
63# find . -name "*.c" -or -name "*.h" | xargs perl -0777 -n -e 'while (s/typedef\s+(?:unsigned\s+|signed\s+|unival\s+)?\S+\s+\*?([^{}\s;(]+)//){print "-T$1\n"}'
64indent:
65	find ./ -name "*.[ch]" | xargs indent
66
67clean-local:
68	-rm -f config.h bindings/perl-piped/Makefile.old bindings/perl-shared/Makefile.old
69
70
71
72dist-hook: VERSION
73	$(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e 's/^\$$VERSION.+/\$$VERSION='$(NUMVERS)';/' bindings/perl-*/*.pm
74	$(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e 's/RRDtool 1.GIT, Copyright by Tobi Oetiker/RRDtool '$(PACKAGE_VERSION)', Copyright 1997-'`date +%Y`' by Tobi Oetiker/' src/*.h src/*.c
75	$(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e 's/^Version:.+/Version: '$(PACKAGE_VERSION)'/' rrdtool.spec
76	$(AM_V_GEN)$(PERL) -i -p -e 's/rrdtool-[\.\d]+\d(-[a-z0-9]+)?/rrdtool-'$(PACKAGE_VERSION)'/g' doc/rrdbuild.pod
77	$(AM_V_GEN)(cd doc && $(MAKE)) && cp -p doc/rrdbuild.* $(distdir)/doc
78
79##END##
80