Makefile.am 2.2 KB
Newer Older
1 2
# FileManager-Actions
# A file-manager extension which offers configurable context menu actions.
3 4
#
# Copyright (C) 2005 The GNOME Foundation
5
# Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
Pierre Wieser's avatar
Pierre Wieser committed
6
# Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
7
#
8
# FileManager-Actions is free software; you can redistribute it and/or
9 10
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
11 12
# the License, or (at your option) any later version.
#
13
# FileManager-Actions is distributed in the hope that it will be useful,
14 15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
# General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with FileManager-Actions; see the file COPYING. If not, see
20
# <http://www.gnu.org/licenses/>.
21 22 23 24 25 26 27
#
# Authors:
#   Frederic Ruaudel <grumz@grumz.net>
#   Rodrigo Moya <rodrigo@gnome-db.org>
#   Pierre Wieser <pwieser@trychlos.org>
#   ... and many others (see AUTHORS)

28 29
if HAVE_GCONF

30 31 32 33
schemas_in_files = \
	nautilus-actions-prefs.schemas.in					\
	nautilus-actions-confs.schemas.in					\
	$(NULL)
34

Pierre Wieser's avatar
Pierre Wieser committed
35
schemas_files = $(schemas_in_files:.schemas.in=.schemas)
36

37
nautilus-actions-confs.schemas.in:
38
	$(top_srcdir)/src/utils/na-print-schemas -s > $@
39

40
schemasdir = $(pkgdatadir)/gconf-schemas
41

Pierre Wieser's avatar
Pierre Wieser committed
42
schemas_DATA = $(schemas_files)
43 44 45 46 47 48 49 50 51

@INTLTOOL_SCHEMAS_RULE@

if GCONF_SCHEMAS_INSTALL
NA_INSTALL_SCHEMAS  = yes
else
NA_INSTALL_SCHEMAS = no
endif

Pierre Wieser's avatar
Pierre Wieser committed
52
EXTRA_DIST = \
53
	$(schemas_in_files)									\
Pierre Wieser's avatar
Pierre Wieser committed
54 55 56
	$(NULL)

install-data-hook:
57
	@if test "$(NA_INSTALL_SCHEMAS)" = "yes"; then \
Pierre Wieser's avatar
Pierre Wieser committed
58 59 60 61 62 63 64
		if test `id -u` != 0; then \
			echo "***"; \
			echo "*** You need to be root to install GConf schemas"; \
			echo "***"; \
			exit 1; \
		fi; \
		for p in $(schemas_DATA); do \
65 66 67
			GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
		done \
	fi
Pierre Wieser's avatar
Pierre Wieser committed
68 69 70 71 72 73 74 75 76

CLEANFILES = $(schemas_files)

uninstall-hook:
	@if test "$(NA_INSTALL_SCHEMAS)" = "yes"; then \
		for p in $(schemas_DATA); do \
			GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $$p; \
		done \
	fi
77 78

endif