1##############################################################################
2#               Makefile.am
3#
4# Process this file with automake to produce Makefile.in
5#
6# from Persistence of Vision(tm) Ray Tracer version 3.6.
7# Copyright 1991-2003 Persistence of Vision Team
8# Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.
9#---------------------------------------------------------------------------
10# NOTICE: This source code file is provided so that users may experiment
11# with enhancements to POV-Ray and to port the software to platforms other
12# than those supported by the POV-Ray developers. There are strict rules
13# regarding how you are permitted to use this file. These rules are contained
14# in the distribution and derivative versions licenses which should have been
15# provided with this file.
16#
17# These licences may be found online, linked from the end-user license
18# agreement that is located at http://www.povray.org/povlegal.html
19#---------------------------------------------------------------------------
20# This program is based on the popular DKB raytracer version 2.12.
21# DKBTrace was originally written by David K. Buck.
22# DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
23#---------------------------------------------------------------------------
24#
25#===========================================================================
26# This file is part of MegaPOV, a modified and unofficial version of POV-Ray
27# For more information on MegaPOV visit our website:
28# http://megapov.inetart.net/
29#===========================================================================
30#
31##############################################################################
32
33# Makefile.am for the source distribution of POV-Ray 3.6 for UNIX
34# Written by Nicolas Calimet <pov4grasp@free.fr>
35
36# Directories.
37povlibdir = @datadir@/@PACKAGE@-@VERSION_BASE@
38povdocdir = @datadir@/doc/@PACKAGE@-@VERSION_BASE@
39povconfdir = @sysconfdir@/@PACKAGE@/@VERSION_BASE@
40povconfuser = $(HOME)/.@PACKAGE@/@VERSION_BASE@
41
42# Directories to build.
43SUBDIRS = libraries source unix
44
45# Additional files to distribute.
46EXTRA_DIST = \
47  bootstrap kde_install.sh \
48  doc icons include ini libraries scenes scripts \
49  povray.ini.in
50
51# Additional files to clean with 'make distclean'.
52DISTCLEANFILES = $(top_builddir)/povray.ini
53CONFIG_CLEAN_FILES = $(top_builddir)/source/jversion.h
54
55# Render a test scene for 'make check'.
56# This is meant to run before 'make install'.
57check: all
58	$(top_builddir)/unix/megapov +i$(top_srcdir)/scenes/advanced/biscuit.pov -f +d +p +v +w320 +h240 +a0.3 +L$(top_srcdir)/include
59
60# Install scripts in povlibdir.
61nobase_povlib_SCRIPTS = scripts/dummy.sh
62
63# Install documentation in povdocdir.
64povdoc_DATA = AUTHORS ChangeLog NEWS
65
66# Install configuration and INI files in povconfdir.
67dist_povconf_DATA = povray.conf
68povray.conf:
69
70povconf_DATA = povray.ini
71povray.ini:
72	cat $(top_srcdir)/povray.ini.in | sed "s,__POVLIBDIR__,$(povlibdir),g" > $(top_builddir)/povray.ini
73
74# Install man page.
75dist_man_MANS = povray.1
76
77# Remove all unwanted files in unix and libraries for 'make dist'.
78# Make all files user read-writeable.
79dist-hook:
80	rm -f    `find ./@PACKAGE@-@VERSION@ -name "*.h.in~"`
81	rm -f -r `find ./@PACKAGE@-@VERSION@ -name autom4te.cache`
82	rm -f    `find ./@PACKAGE@-@VERSION@/libraries -name "*.o"`
83	rm -f    `find ./@PACKAGE@-@VERSION@/libraries -name "lib*.a"`
84	rm -f    `find ./@PACKAGE@-@VERSION@/libraries -name config.log`
85	rm -f    `find ./@PACKAGE@-@VERSION@/libraries -name config.status`
86	rm -f    `find ./@PACKAGE@-@VERSION@/libraries -name Makefile`
87	rm -f    ./@PACKAGE@-@VERSION@/source/jversion.h
88	rm -f    ./@PACKAGE@-@VERSION@/libraries/tiff/libtiff/mkg3states
89	rm -f    ./@PACKAGE@-@VERSION@/libraries/tiff/libtiff/mkversion
90	rm -f    ./@PACKAGE@-@VERSION@/libraries/tiff/libtiff/port.h
91	rm -f    ./@PACKAGE@-@VERSION@/libraries/tiff/libtiff/tif_fax3sm.c
92	rm -f    ./@PACKAGE@-@VERSION@/libraries/tiff/libtiff/tiffvers.h
93	chmod -R u+rw ./@PACKAGE@-@VERSION@
94	chmod 755 ./@PACKAGE@-@VERSION@/scripts/*
95
96# Manage various data files for 'make install'.
97install-data-local:
98	$(mkdir_p) $(DESTDIR)$(povlibdir)
99	@list='$(top_srcdir)/icons $(top_srcdir)/include $(top_srcdir)/ini $(top_srcdir)/scenes'; \
100	echo "Creating data directories..."; \
101	dirlist=`find $$list -type d | sed s,$(top_srcdir)/,,`; \
102	for p in $$dirlist ; do \
103	  $(mkdir_p) $(DESTDIR)$(povlibdir)/$$p ; \
104	done; \
105	echo "Copying data files..."; \
106	filelist=`find $$list -type f | sed s,$(top_srcdir)/,,`; \
107	for f in $$filelist ; do \
108	  $(INSTALL_DATA) $(top_srcdir)/$$f $(DESTDIR)$(povlibdir)/$$f ; \
109	done
110	@echo "Creating documentation directories..."; \
111	$(mkdir_p) $(DESTDIR)$(povdocdir); \
112	dirlist=`find $(top_srcdir)/doc/ -type d | sed s,$(top_srcdir)/doc/,,`; \
113	for p in $$dirlist ; do \
114	  $(mkdir_p) $(DESTDIR)$(povdocdir)/$$p ; \
115	done
116	@echo "Copying documentation files..."; \
117	filelist=`find $(top_srcdir)/doc/ -type f | sed s,$(top_srcdir)/doc/,,`; \
118	for f in $$filelist ; do \
119	  $(INSTALL_DATA) $(top_srcdir)/doc/$$f $(DESTDIR)$(povdocdir)/$$f ; \
120	done
121	@echo "Copying user configuration and INI files..."; \
122	$(mkdir_p) $(povconfuser); \
123	filelist='povray.conf povray.ini'; \
124	for f in $$filelist ; do \
125	  if test -e $(povconfuser)/$$f; then \
126	    echo "Creating backup of $(povconfuser)/$$f"; \
127	    mv -f $(povconfuser)/$$f $(povconfuser)/$$f.bak; \
128	  fi; \
129	done; \
130	$(INSTALL_DATA) $(top_srcdir)/povray.conf $(povconfuser)/povray.conf ; \
131	$(INSTALL_DATA) $(top_builddir)/povray.ini $(povconfuser)/povray.ini
132
133# For 'make uninstall' we remove the whole POV-Ray data directory.
134# We have to use uninstall-local and not uninstall-data-local.
135uninstall-local:
136	-rm -f -r $(DESTDIR)$(povlibdir)
137	-rm -f -r $(DESTDIR)$(povdocdir)
138	-rm -f $(DESTDIR)$(povconfdir)/povray.ini
139	if test -d $(DESTDIR)$(povconfdir) && test -z "`ls -A $(DESTDIR)$(povconfdir)`"; then \
140	  rm -f -r $(DESTDIR)$(povconfdir); \
141	fi
142	if test -d $(DESTDIR)$(sysconfdir)/@PACKAGE@ && test -z "`ls -A $(DESTDIR)$(sysconfdir)/@PACKAGE@`"; then \
143	  rm -f -r $(DESTDIR)$(sysconfdir)/@PACKAGE@; \
144	fi
145	-rm -f $(HOME)/.@PACKAGE@/@VERSION_BASE@/povray.conf
146	-rm -f $(HOME)/.@PACKAGE@/@VERSION_BASE@/povray.ini
147	if test -d $(HOME)/.@PACKAGE@/@VERSION_BASE@ && test -z "`ls -A $(HOME)/.@PACKAGE@/@VERSION_BASE@`"; then \
148	  rm -f -r $(HOME)/.@PACKAGE@/@VERSION_BASE@; \
149	fi
150	if test -d $(HOME)/.@PACKAGE@ && test -z "`ls -A $(HOME)/.@PACKAGE@`"; then \
151	  rm -f -r $(HOME)/.@PACKAGE@; \
152	fi
153