1
## $Id: Makefile.am,v 1.17 2004/06/19 02:14:42 daniel Exp $
3
## Copyright (c) 2004 Daniel Elstner <daniel.elstner@gmx.net>
5
## This program is free software; you can redistribute it and/or modify
6
## it under the terms of the GNU General Public License VERSION 2 as
7
## published by the Free Software Foundation. You are not allowed to
8
## use any other version of the license; unless you got the explicit
9
## permission from the author to do so.
11
## This program is distributed in the hope that it will be useful,
1
## Copyright (c) 2004-2007 Daniel Elstner <daniel.kitta@gmail.com>
3
## This file is part of regexxer.
5
## regexxer 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.
10
## regexxer is distributed in the hope that it will be useful,
12
11
## but WITHOUT ANY WARRANTY; without even the implied warranty of
13
12
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
13
## GNU General Public License for more details.
16
15
## You should have received a copy of the GNU General Public License
17
## along with this program; if not, write to the Free Software
18
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
DISTCHECK_CONFIGURE_FLAGS = --disable-schemas-install --enable-warnings=hardcore
23
SUBDIRS = pixmaps ui src po
25
desktop_in_files = regexxer.desktop.in
16
## along with regexxer; if not, write to the Free Software Foundation, Inc.,
17
## 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
## This project does not use recursive make, but a single toplevel Makefile
20
## to build the entire tree (excluding the po subdirectory as gettext comes
21
## with its own build system). Read Peter Miller's excellent paper to learn
22
## why recursive make invocations are both slow and error-prone:
23
## http://members.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html
25
AUTOMAKE_OPTIONS = subdir-objects
26
ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_FLAGS)
27
DISTCHECK_CONFIGURE_FLAGS = --disable-schemas-install --enable-warnings=fatal
31
bin_PROGRAMS = src/regexxer
33
src_regexxer_SOURCES = \
38
src/filebufferundo.cc \
39
src/filebufferundo.h \
46
src/filetreeprivate.cc \
47
src/filetreeprivate.h \
69
nodist_src_regexxer_SOURCES = \
72
# The location of the gettext catalogs as defined by intltool.
73
rxlocaledir = $(prefix)/$(DATADIRNAME)/locale
75
global_defs = -DREGEXXER_LOCALEDIR=\""$(rxlocaledir)"\" -DREGEXXER_PKGDATADIR=\""$(pkgdatadir)"\"
76
AM_CPPFLAGS = $(global_defs) -I$(top_builddir) $(REGEXXER_MODULES_CFLAGS) $(REGEXXER_WARNING_FLAGS)
78
src_regexxer_DEPENDENCIES = src/exported-symbols
79
src_regexxer_LDFLAGS = $(REGEXXER_VERSION_SCRIPT)
80
src_regexxer_LDADD = $(REGEXXER_MODULES_LIBS) $(INTLLIBS)
82
dist_pkgdata_DATA = ui/mainwindow.glade ui/prefdialog.glade
84
iconthemedir = $(datadir)/icons/hicolor
85
appicondir = $(iconthemedir)/48x48/apps
86
dist_appicon_DATA = ui/regexxer.png
88
schemas_in_files = ui/regexxer.schemas.in
89
schemasdir = $(GCONF_SCHEMA_FILE_DIR)
90
schemas_DATA = ui/regexxer.schemas
92
desktop_in_files = ui/regexxer.desktop.in
26
93
desktopdir = $(datadir)/applications
27
desktop_DATA = regexxer.desktop
29
@INTLTOOL_DESKTOP_RULE@
31
schemas_in_files = regexxer.schemas.in
32
schemasdir = $(GCONF_SCHEMA_FILE_DIR)
33
schemas_DATA = regexxer.schemas
35
@INTLTOOL_SCHEMAS_RULE@
37
dist_macros = macros/cxx.m4 macros/misc.m4 macros/pcre.m4
94
desktop_DATA = ui/regexxer.desktop
38
96
dist_intltool = intltool-extract.in intltool-merge.in intltool-update.in
97
stockimages = ui/stock_save_all_16.png ui/stock_save_all_24.png
99
dist_noinst_DATA = src/exported-symbols $(stockimages) $(dist_intltool) \
100
$(desktop_in_files) $(schemas_in_files)
40
101
dist_noinst_SCRIPTS = autogen.sh
41
dist_noinst_DATA = po/LINGUAS $(dist_macros) $(dist_intltool) $(desktop_in_files) $(schemas_in_files)
43
CLEANFILES = $(desktop_DATA) $(schemas_DATA)
103
BUILT_SOURCES = $(nodist_src_regexxer_SOURCES)
104
CLEANFILES = $(nodist_src_regexxer_SOURCES) $(desktop_DATA) $(schemas_DATA)
44
105
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
46
gconftool_command = GCONF_CONFIG_SOURCE='$(GCONF_SCHEMA_CONFIG_SOURCE)' $(GCONFTOOL)
107
pixbuf_csource = $(GDK_PIXBUF_CSOURCE) --raw
108
update_icon_cache = $(GTK_UPDATE_ICON_CACHE) --ignore-theme-index --force
109
gconftool = GCONF_CONFIG_SOURCE='$(GCONF_SCHEMA_CONFIG_SOURCE)' $(GCONFTOOL)
111
@INTLTOOL_SCHEMAS_RULE@
112
@INTLTOOL_DESKTOP_RULE@
48
114
if GCONF_SCHEMAS_INSTALL
49
install-data-hook: install-schemas
50
uninstall-hook: uninstall-schemas
115
install-data-hook: install-schemas install-update-icon-cache
116
uninstall-hook: uninstall-schemas uninstall-update-icon-cache
118
install-data-hook: install-update-icon-cache
119
uninstall-hook: uninstall-update-icon-cache
122
# Note that this rule creates the ui/ build directory as a side effect.
123
# This works just fine because the target is in BUILT_SOURCES and thus
124
# built before everything else. Otherwise a special ui/.dirstamp rule
125
# would be necessary.
126
ui/stockimages.h: $(stockimages)
127
@mkdir ui >/dev/null 2>&1 || test -d ui
128
@build_list='--build-list'; \
129
list='$(stockimages)'; for file in $$list; do \
130
name=`expr "X/$$file" : '.*[\\/]\([^.]*\)' | sed 'y/-/_/'`; \
131
dir=; test -f "$$file" || dir='$(srcdir)/'; \
132
build_list="$$build_list $$name $$dir$$file"; \
134
echo " $(pixbuf_csource) $$build_list >$@"; \
135
$(pixbuf_csource) $$build_list >$@
56
137
install-schemas: $(schemas_DATA)
58
$(gconftool_command) --makefile-install-rule $(schemas_DATA)
60
echo "*** NOTE ***"; \
61
echo "If you executed src/regexxer before running 'make install' as privileged user,"; \
62
echo "it might be necessary to restart the GConf daemon now in order for the default"; \
63
echo "configuration values to take effect. Do to so, run (as ordinary user):"; \
65
echo " gconftool-2 --shutdown; gconftool-2 --spawn"; \
139
test -n "$(DESTDIR)" || $(gconftool) --makefile-install-rule $(schemas_DATA)
68
141
uninstall-schemas: $(schemas_DATA)
70
$(gconftool_command) --makefile-uninstall-rule $(schemas_DATA)
143
test -n "$(DESTDIR)" || $(gconftool) --makefile-uninstall-rule $(schemas_DATA)
145
install-update-icon-cache:
147
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
149
uninstall-update-icon-cache:
151
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
153
.PHONY: install-schemas uninstall-schemas install-update-icon-cache uninstall-update-icon-cache