1## Process this file with automake to produce Makefile.in
2#
3#    Copyright (C) 1987-2015 by Jeffery P. Hansen
4#
5#    This program is free software; you can redistribute it and/or modify
6#    it under the terms of the GNU General Public License as published by
7#    the Free Software Foundation; either version 2 of the License, or
8#    (at your option) any later version.
9#
10#    This program is distributed in the hope that it will be useful,
11#    but WITHOUT ANY WARRANTY; without even the implied warranty of
12#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13#    GNU General Public License for more details.
14#
15#    You should have received a copy of the GNU General Public License along
16#    with this program; if not, write to the Free Software Foundation, Inc.,
17#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18#
19
20AUTOMAKE_OPTIONS = foreign
21ACLOCAL_AMFLAGS = -I m4
22
23#
24# List of directories that contain data files necessary for tkgate to run.
25#
26TKG_DATADIRS=scripts bindings doc gdf images locale primitives vlib vpd test
27
28#
29# List of data which will be included in distribution
30#
31TKG_DISTITEMS=$(TKG_DATADIRS) povray pkg-comment pkg-descr
32
33#
34# Subdirectories in which more makefiles can be found
35#
36SUBDIRS = src
37
38#
39# List of data files in this directory that should be included with a tkgate distribution.
40#
41dist_pkgdata_DATA = site-preferences
42
43#
44# List of man pages for tkgate
45#
46dist_man_MANS = tkgate.1 verga.1 gmac.1
47
48#
49# List of common documentation files
50#
51dist_doc_DATA = README README.verga COPYING TODO ChangeLog
52
53#
54# Desktop file
55#
56desktopdir = $(datadir)/applications
57dist_desktop_DATA = tkgate.desktop
58
59#
60# Pixmap files
61#
62pixmapdir = $(datadir)/pixmaps
63dist_pixmap_DATA = tkgate.png tkgate.xpm
64
65#
66# List of header files that should not be automatically installed
67#
68noinst_HEADERS = options.h
69
70#
71# Update the release data for this compilation
72#
73release:
74	echo 'char *release_date = "'`(LANG=; date "+%b %d %Y")`'";' > $(srcdir)/src/tkgate/release.c
75
76dist-hook:
77	@echo Packaging data files...
78	@for d in $(TKG_DISTITEMS); do \
79	   cp -pR $(srcdir)/$$d $(distdir); \
80	done
81
82tests:
83	cd test/verga;./runtests.sh
84
85#
86# Make sure the libexec directory has symbolic links to the 'tkgate' and 'verga' executables.
87#
88install-exec-hook:
89	@echo Creating symbolic links in libexec...
90	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/libexec
91	dir2=$(DESTDIR)$(bindir) ; \
92	dir1=$(DESTDIR)$(pkgdatadir)/libexec ; \
93	$(am__relativize) ; relpath=$$reldir ; \
94	for p in tkgate verga; do \
95	   f=`echo "$$p" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
96	   rm -f $(DESTDIR)$(pkgdatadir)/libexec/$$p; \
97	   $(LN_S) $$relpath/$$f $(DESTDIR)$(pkgdatadir)/libexec/$$p; \
98	done
99#
100# Copy all the data files we need
101#
102install-data-hook:
103	@echo Installing data files...
104	@for d in $(TKG_DATADIRS); do \
105	   cp -pR $(srcdir)/$$d $(DESTDIR)$(pkgdatadir); \
106	done
107	rm -f $(DESTDIR)$(pkgdatadir)/locale/*.sh
108	rm -f $(DESTDIR)$(pkgdatadir)/locale/*.pot
109	rm -f $(DESTDIR)$(pkgdatadir)/locale/*.tcl
110	rm -f $(DESTDIR)$(pkgdatadir)/locale/*/config.txt
111	rm -f $(DESTDIR)$(pkgdatadir)/locale/*/*.po
112
113uninstall-local:
114	@echo Uninstalling data files...
115	@for d in $(TKG_DATADIRS); do \
116	   chmod -R u+w $(DESTDIR)$(pkgdatadir)/$$d; \
117	   rm -rf $(DESTDIR)$(pkgdatadir)/$$d; \
118	done
119	@echo Uninstalling libexec links...
120	chmod -R u+w $(DESTDIR)$(pkgdatadir)/libexec
121	rm -f $(DESTDIR)$(pkgdatadir)/libexec/tkgate
122	rm -f $(DESTDIR)$(pkgdatadir)/libexec/verga
123	rmdir $(DESTDIR)$(pkgdatadir)/libexec
124