2c8e02b6ff364be572f90929b1d45727d8431e0a
[pspp] / src / ui / gui / automake.mk
1 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
2
3 include $(top_srcdir)/src/ui/gui/sheet/automake.mk
4
5 UI_FILES = \
6         src/ui/gui/aggregate.ui \
7         src/ui/gui/autorecode.ui \
8         src/ui/gui/binomial.ui \
9         src/ui/gui/compute.ui \
10         src/ui/gui/correlation.ui \
11         src/ui/gui/count.ui \
12         src/ui/gui/crosstabs.ui \
13         src/ui/gui/chi-square.ui \
14         src/ui/gui/descriptives.ui \
15         src/ui/gui/entry-dialog.ui \
16         src/ui/gui/examine.ui \
17         src/ui/gui/goto-case.ui \
18         src/ui/gui/factor.ui \
19         src/ui/gui/find.ui \
20         src/ui/gui/frequencies.ui \
21         src/ui/gui/k-means.ui \
22         src/ui/gui/k-related.ui \
23         src/ui/gui/ks-one-sample.ui \
24         src/ui/gui/oneway.ui \
25         src/ui/gui/paired-samples.ui \
26         src/ui/gui/psppire.ui \
27         src/ui/gui/rank.ui \
28         src/ui/gui/runs.ui \
29         src/ui/gui/sort.ui \
30         src/ui/gui/split-file.ui \
31         src/ui/gui/recode.ui \
32         src/ui/gui/regression.ui \
33         src/ui/gui/reliability.ui \
34         src/ui/gui/roc.ui \
35         src/ui/gui/select-cases.ui \
36         src/ui/gui/t-test.ui \
37         src/ui/gui/text-data-import.ui \
38         src/ui/gui/var-sheet-dialogs.ui \
39         src/ui/gui/variable-info.ui \
40         src/ui/gui/data-editor.ui \
41         src/ui/gui/output-viewer.ui \
42         src/ui/gui/syntax-editor.ui
43
44 EXTRA_DIST += \
45         src/ui/gui/OChangeLog \
46         src/ui/gui/psppicon.png \
47         src/ui/gui/marshaller-list \
48         src/ui/gui/pspp.desktop
49
50 if HAVE_GUI
51 bin_PROGRAMS += src/ui/gui/psppire 
52
53 src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
54
55
56 src_ui_gui_psppire_LDFLAGS = \
57         $(PSPPIRE_LDFLAGS) \
58         $(PG_LDFLAGS)
59
60
61 if RELOCATABLE_VIA_LD
62 src_ui_gui_psppire_LDFLAGS += `$(RELOCATABLE_LDFLAGS) $(bindir)`
63 else
64 src_ui_gui_psppire_LDFLAGS += -rpath $(pkglibdir)
65 endif
66
67
68 src_ui_gui_psppire_LDADD = \
69         src/ui/gui/sheet/libsheet.la \
70         lib/gtk-contrib/libgtksheet.a \
71         src/ui/libuicommon.la \
72         src/libpspp.la \
73         src/libpspp-core.la \
74         $(GTK_LIBS) \
75         $(GTKSOURCEVIEW_LIBS) \
76         $(CAIRO_LIBS) \
77         $(LIBINTL)
78
79 src_ui_gui_psppiredir = $(pkgdatadir)
80
81
82 themedir = $(DESTDIR)$(datadir)/icons/hicolor
83 context = apps
84
85
86 install-lang:
87         $(INSTALL) $(top_srcdir)/src/ui/gui/pspp.lang $(pkgdatadir)
88         
89 install-icons:
90         for size in 16x16 ; do \
91           $(MKDIR_P) $(themedir)/$$size/$(context) ; \
92           $(INSTALL) $(top_srcdir)/src/ui/gui/icons/$$size/* $(themedir)/$$size/$(context) ; \
93         done 
94         gtk-update-icon-cache --ignore-theme-index $(themedir)
95
96 INSTALL_DATA_HOOKS += install-icons install-lang
97
98 uninstall-icons:
99         for size in 16x16 ; do \
100           rm -f $(themedir)/$$size/$(context)/psppicon.png ; \
101         done 
102         gtk-update-icon-cache --ignore-theme-index $(themedir)
103
104 UNINSTALL_DATA_HOOKS += uninstall-icons
105
106 dist_src_ui_gui_psppire_DATA = \
107         $(UI_FILES) \
108         $(top_srcdir)/src/ui/gui/pspp.lang \
109         $(top_srcdir)/src/ui/gui/pspplogo.png \
110         $(top_srcdir)/src/ui/gui/icons/value-labels.png \
111         $(top_srcdir)/src/ui/gui/icons/goto-variable.png\
112         $(top_srcdir)/src/ui/gui/icons/insert-case.png \
113         $(top_srcdir)/src/ui/gui/icons/insert-variable.png \
114         $(top_srcdir)/src/ui/gui/icons/recent-dialogs.png \
115         $(top_srcdir)/src/ui/gui/icons/split-file.png \
116         $(top_srcdir)/src/ui/gui/icons/select-cases.png \
117         $(top_srcdir)/src/ui/gui/icons/weight-cases.png \
118         $(top_srcdir)/src/ui/gui/icons/16x16/nominal.png  \
119         $(top_srcdir)/src/ui/gui/icons/16x16/ordinal.png \
120         $(top_srcdir)/src/ui/gui/icons/16x16/scale.png \
121         $(top_srcdir)/src/ui/gui/icons/16x16/string.png \
122         $(top_srcdir)/src/ui/gui/icons/16x16/date-scale.png \
123         $(top_srcdir)/src/ui/gui/icons/splash.png
124
125
126 src_ui_gui_psppire_SOURCES = \
127         src/ui/gui/psppire-dialog.c \
128         src/ui/gui/psppire-keypad.c \
129         src/ui/gui/psppire-selector.c \
130         src/ui/gui/psppire-buttonbox.c \
131         src/ui/gui/psppire-hbuttonbox.c \
132         src/ui/gui/psppire-vbuttonbox.c \
133         src/ui/gui/psppire-scanf.c \
134         src/ui/gui/psppire-scanf.h \
135         src/ui/gui/psppire-acr.c \
136         src/ui/gui/autorecode-dialog.c \
137         src/ui/gui/autorecode-dialog.h \
138         src/ui/gui/aggregate-dialog.c \
139         src/ui/gui/aggregate-dialog.h \
140         src/ui/gui/binomial-dialog.c \
141         src/ui/gui/binomial-dialog.h \
142         src/ui/gui/checkbox-treeview.c \
143         src/ui/gui/checkbox-treeview.h \
144         src/ui/gui/comments-dialog.c \
145         src/ui/gui/comments-dialog.h \
146         src/ui/gui/compute-dialog.c \
147         src/ui/gui/compute-dialog.h \
148         src/ui/gui/chi-square-dialog.c \
149         src/ui/gui/chi-square-dialog.h \
150         src/ui/gui/correlation-dialog.c \
151         src/ui/gui/correlation-dialog.h \
152         src/ui/gui/count-dialog.c \
153         src/ui/gui/count-dialog.h \
154         src/ui/gui/crosstabs-dialog.c \
155         src/ui/gui/crosstabs-dialog.h \
156         src/ui/gui/customentry.c \
157         src/ui/gui/customentry.h \
158         src/ui/gui/descriptives-dialog.c \
159         src/ui/gui/descriptives-dialog.h \
160         src/ui/gui/dialog-common.c \
161         src/ui/gui/dialog-common.h \
162         src/ui/gui/dict-display.h \
163         src/ui/gui/dict-display.c \
164         src/ui/gui/entry-dialog.c \
165         src/ui/gui/entry-dialog.h \
166         src/ui/gui/examine-dialog.c \
167         src/ui/gui/examine-dialog.h \
168         src/ui/gui/executor.c \
169         src/ui/gui/executor.h \
170         src/ui/gui/find-dialog.c \
171         src/ui/gui/find-dialog.h \
172         src/ui/gui/factor-dialog.c \
173         src/ui/gui/factor-dialog.h \
174         src/ui/gui/frequencies-dialog.c \
175         src/ui/gui/frequencies-dialog.h \
176         src/ui/gui/goto-case-dialog.c \
177         src/ui/gui/goto-case-dialog.h \
178         src/ui/gui/helper.c \
179         src/ui/gui/help-menu.c \
180         src/ui/gui/help-menu.h \
181         src/ui/gui/helper.h \
182         src/ui/gui/k-related-dialog.c \
183         src/ui/gui/k-related-dialog.h \
184         src/ui/gui/k-means-dialog.c \
185         src/ui/gui/k-means-dialog.h \
186         src/ui/gui/ks-one-sample-dialog.c \
187         src/ui/gui/ks-one-sample-dialog.h \
188         src/ui/gui/main.c \
189         src/ui/gui/missing-val-dialog.c \
190         src/ui/gui/missing-val-dialog.h \
191         src/ui/gui/oneway-anova-dialog.c \
192         src/ui/gui/oneway-anova-dialog.h \
193         src/ui/gui/paired-dialog.c \
194         src/ui/gui/paired-dialog.h \
195         src/ui/gui/psppire.c \
196         src/ui/gui/psppire.h \
197         src/ui/gui/psppire-acr.h \
198         src/ui/gui/psppire-buttonbox.h \
199         src/ui/gui/psppire-conf.c \
200         src/ui/gui/psppire-conf.h \
201         src/ui/gui/psppire-data-editor.c \
202         src/ui/gui/psppire-data-editor.h \
203         src/ui/gui/psppire-data-store.c \
204         src/ui/gui/psppire-data-store.h \
205         src/ui/gui/psppire-data-window.c \
206         src/ui/gui/psppire-data-window.h \
207         src/ui/gui/psppire-dialog.h \
208         src/ui/gui/psppire-dict.c \
209         src/ui/gui/psppire-dict.h \
210         src/ui/gui/psppire-dictview.c \
211         src/ui/gui/psppire-dictview.h \
212         src/ui/gui/psppire-encoding-selector.c \
213         src/ui/gui/psppire-encoding-selector.h \
214         src/ui/gui/psppire-hbuttonbox.h \
215         src/ui/gui/psppire-keypad.h \
216         src/ui/gui/psppire-output-window.c \
217         src/ui/gui/psppire-output-window.h \
218         src/ui/gui/psppire-var-view.c \
219         src/ui/gui/psppire-var-view.h \
220         src/ui/gui/psppire-selector.h \
221         src/ui/gui/psppire-select-dest.c \
222         src/ui/gui/psppire-select-dest.h \
223         src/ui/gui/psppire-syntax-window.c \
224         src/ui/gui/psppire-syntax-window.h \
225         src/ui/gui/psppire-val-chooser.c \
226         src/ui/gui/psppire-val-chooser.h \
227         src/ui/gui/psppire-var-ptr.c \
228         src/ui/gui/psppire-var-ptr.h \
229         src/ui/gui/psppire-var-sheet.c \
230         src/ui/gui/psppire-var-sheet.h \
231         src/ui/gui/psppire-var-store.c \
232         src/ui/gui/psppire-var-store.h \
233         src/ui/gui/psppire-vbuttonbox.h \
234         src/ui/gui/psppire-window.c \
235         src/ui/gui/psppire-window.h \
236         src/ui/gui/psppire-window-register.c \
237         src/ui/gui/psppire-window-register.h \
238         src/ui/gui/rank-dialog.c \
239         src/ui/gui/rank-dialog.h \
240         src/ui/gui/recode-dialog.c \
241         src/ui/gui/recode-dialog.h \
242         src/ui/gui/regression-dialog.c \
243         src/ui/gui/regression-dialog.h \
244         src/ui/gui/reliability-dialog.c \
245         src/ui/gui/reliability-dialog.h \
246         src/ui/gui/roc-dialog.c \
247         src/ui/gui/roc-dialog.h \
248         src/ui/gui/runs-dialog.c \
249         src/ui/gui/runs-dialog.h \
250         src/ui/gui/select-cases-dialog.c \
251         src/ui/gui/select-cases-dialog.h \
252         src/ui/gui/sort-cases-dialog.c \
253         src/ui/gui/sort-cases-dialog.h \
254         src/ui/gui/split-file-dialog.c \
255         src/ui/gui/split-file-dialog.h \
256         src/ui/gui/text-data-import-dialog.c \
257         src/ui/gui/text-data-import-dialog.h \
258         src/ui/gui/transpose-dialog.c \
259         src/ui/gui/transpose-dialog.h \
260         src/ui/gui/t-test-independent-samples-dialog.c \
261         src/ui/gui/t-test-independent-samples-dialog.h \
262         src/ui/gui/t-test-one-sample.c \
263         src/ui/gui/t-test-one-sample.h \
264         src/ui/gui/t-test-options.c \
265         src/ui/gui/t-test-options.h \
266         src/ui/gui/t-test-paired-samples.c \
267         src/ui/gui/t-test-paired-samples.h \
268         src/ui/gui/npar-two-sample-related.c \
269         src/ui/gui/npar-two-sample-related.h \
270         src/ui/gui/val-labs-dialog.c \
271         src/ui/gui/val-labs-dialog.h \
272         src/ui/gui/var-display.c \
273         src/ui/gui/var-display.h \
274         src/ui/gui/variable-info-dialog.c \
275         src/ui/gui/variable-info-dialog.h \
276         src/ui/gui/var-type-dialog.c \
277         src/ui/gui/var-type-dialog.h \
278         src/ui/gui/weight-cases-dialog.c \
279         src/ui/gui/weight-cases-dialog.h \
280         src/ui/gui/widget-io.c \
281         src/ui/gui/widget-io.h \
282         src/ui/gui/widgets.c \
283         src/ui/gui/widgets.h
284
285 nodist_src_ui_gui_psppire_SOURCES = \
286         src/ui/gui/psppire-marshal.c \
287         src/ui/gui/psppire-marshal.h
288
289 yelp-check:
290         @if ! yelp --version > /dev/null 2>&1 ; then \
291                 echo    ; \
292                 echo '    The Yelp document viewer does not seem to be installed on the system.' ; \
293                 echo '    If Yelp is not available at run time, then the PSPPIRE online reference' ; \
294                 echo '    manual will not be available.' ; \
295                 echo '    Yelp is available from the GNOME project.  ftp://ftp.gnome.org/pub/gnome/sources/yelp' ; \
296                 echo ; \
297         fi
298
299 PHONY += yelp-check
300
301 AM_CPPFLAGS += -Isrc
302
303 src/ui/gui/psppire-marshal.c: src/ui/gui/marshaller-list
304         echo '#include <config.h>' > $@
305         $(GLIB_GENMARSHAL) --body --prefix=psppire_marshal $? >> $@
306
307 src/ui/gui/psppire-marshal.h: src/ui/gui/marshaller-list
308         $(GLIB_GENMARSHAL) --header --prefix=psppire_marshal $? > $@
309
310 desktopdir = $(datadir)/applications
311 desktop_DATA = src/ui/gui/pspp.desktop
312
313 BUILT_SOURCES += src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h
314 CLEANFILES += src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h \
315         $(nodist_src_ui_gui_psppire_DATA)
316 endif HAVE_GUI
317
318 #ensure the installcheck passes even if there is no X server available
319 installcheck-local:
320         DISPLAY=/invalid/port $(MAKE) $(AM_MAKEFLAGS) installcheck-binPROGRAMS
321
322 # <gtk/gtk.h> wrapper
323 src_ui_gui_psppire_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/ui/gui/include
324 BUILT_SOURCES += src/ui/gui/include/gtk/gtk.h
325 src/ui/gui/include/gtk/gtk.h: src/ui/gui/include/gtk/gtk.in.h
326         @$(MKDIR_P) src/ui/gui/include/gtk
327         $(AM_V_GEN)rm -f $@-t $@ && \
328         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
329           sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
330               -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
331               -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
332               -e 's|@''NEXT_GTK_GTK_H''@|$(NEXT_GTK_GTK_H)|g' \
333               < $(srcdir)/src/ui/gui/include/gtk/gtk.in.h; \
334         } > $@-t && \
335         mv $@-t $@
336 CLEANFILES += src/ui/gui/include/gtk/gtk.h
337 EXTRA_DIST += src/ui/gui/include/gtk/gtk.in.h