Revert "Fixed a use after free error when manipulating datasets."
[pspp] / src / ui / gui / automake.mk
1 # PSPP - a program for statistical analysis.
2 # Copyright (C) 2017, 2020 Free Software Foundation, Inc.
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 #
17 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
18
19 UI_FILES = \
20         src/ui/gui/aggregate.ui \
21         src/ui/gui/autorecode.ui \
22         src/ui/gui/binomial.ui \
23         src/ui/gui/compute.ui \
24         src/ui/gui/barchart.ui \
25         src/ui/gui/correlation.ui \
26         src/ui/gui/count.ui \
27         src/ui/gui/comments.ui \
28         src/ui/gui/crosstabs.ui \
29         src/ui/gui/chi-square.ui \
30         src/ui/gui/descriptives.ui \
31         src/ui/gui/entry-dialog.ui \
32         src/ui/gui/examine.ui \
33         src/ui/gui/goto-case.ui \
34         src/ui/gui/factor.ui \
35         src/ui/gui/find.ui \
36         src/ui/gui/frequencies.ui \
37         src/ui/gui/histogram.ui \
38         src/ui/gui/indep-samples.ui \
39         src/ui/gui/k-independent.ui \
40         src/ui/gui/k-means.ui \
41         src/ui/gui/k-related.ui \
42         src/ui/gui/ks-one-sample.ui \
43         src/ui/gui/logistic.ui \
44         src/ui/gui/means.ui \
45         src/ui/gui/missing-val-dialog.ui \
46         src/ui/gui/oneway.ui \
47         src/ui/gui/options.ui \
48         src/ui/gui/paired-samples.ui \
49         src/ui/gui/rank.ui \
50         src/ui/gui/runs.ui \
51         src/ui/gui/sort.ui \
52         src/ui/gui/split-file.ui \
53         src/ui/gui/recode.ui \
54         src/ui/gui/regression.ui \
55         src/ui/gui/reliability.ui \
56         src/ui/gui/roc.ui \
57         src/ui/gui/scatterplot.ui \
58         src/ui/gui/select-cases.ui \
59         src/ui/gui/t-test.ui \
60         src/ui/gui/text-data-import.ui \
61         src/ui/gui/transpose.ui \
62         src/ui/gui/univariate.ui \
63         src/ui/gui/val-labs-dialog.ui \
64         src/ui/gui/variable-info.ui \
65         src/ui/gui/data-editor.ui \
66         src/ui/gui/output-window.ui \
67         src/ui/gui/syntax-editor.ui \
68         src/ui/gui/var-type-dialog.ui \
69         src/ui/gui/weight.ui
70
71
72 $(top_srcdir)/doc/help-pages-list: $(UI_FILES)
73          $(AM_V_GEN)cat $^ | grep '"help[-_]page"' | \
74    $(SED) -e 's% *<property name="help[-_]page">\([^<]*\)</property>%//*[@id='"'"'\1'"'"']%' \
75         -e 's%#%'"'"']/*[@id='"'"'%g' > $@,tmp
76         test -s $@,tmp
77         mv $@,tmp $@
78
79 EXTRA_DIST += doc/help-pages-list
80
81
82 EXTRA_DIST += \
83         src/ui/gui/memorandum.txt \
84         src/ui/gui/org.fsf.pspp.metainfo.xml.in \
85         src/ui/gui/org.fsf.pspp.desktop.in \
86         src/ui/gui/marshaller-list \
87         src/ui/gui/pspplogo.svg
88
89 src_ui_gui_psppire_CPPFLAGS=
90
91 if HAVE_GUI
92 bin_PROGRAMS += src/ui/gui/psppire
93 noinst_PROGRAMS += src/ui/gui/spreadsheet-test
94
95 src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) $(SPREAD_SHEET_WIDGET_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
96 src_ui_gui_spreadsheet_test_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
97
98
99 src_ui_gui_psppire_LDFLAGS = \
100         $(PSPPIRE_LDFLAGS) \
101         $(PG_LDFLAGS)
102
103
104 if RELOCATABLE_VIA_LD
105 src_ui_gui_psppire_LDFLAGS += `$(RELOCATABLE_LDFLAGS) $(bindir)`
106 else
107 src_ui_gui_psppire_LDFLAGS += -rpath $(pkglibdir)
108 endif
109
110
111 src_ui_gui_psppire_LDADD = \
112         src/ui/libuicommon.la \
113         src/libpspp.la \
114         src/libpspp-core.la \
115         $(GTK_LIBS) \
116         $(GTHREAD_LIBS) \
117         $(GTKSOURCEVIEW_LIBS) \
118         $(SPREAD_SHEET_WIDGET_LIBS) \
119         $(CAIRO_LIBS) \
120         $(LIBINTL) \
121         $(GSL_LIBS)
122
123
124 src_ui_gui_spreadsheet_test_LDADD = \
125         src/libpspp-core.la \
126         $(GTK_LIBS) \
127         $(GTHREAD_LIBS)
128
129
130 src_ui_gui_spreadsheet_test_SOURCES = src/ui/gui/spreadsheet-test.c src/ui/gui/psppire-spreadsheet-model.c
131
132 src_ui_gui_psppiredir = $(pkgdatadir)
133
134
135 install-lang:
136         $(INSTALL_DATA) $(top_srcdir)/src/ui/gui/pspp.lang $(DESTDIR)$(pkgdatadir)
137
138 INSTALL_DATA_HOOKS += install-lang
139
140 dist_src_ui_gui_psppire_DATA = \
141         $(UI_FILES) \
142         $(top_srcdir)/src/ui/gui/pspp.lang
143
144 src_ui_gui_psppire_SOURCES = \
145         src/ui/gui/psppire-dialog.c \
146         src/ui/gui/psppire-keypad.c \
147         src/ui/gui/psppire-selector.c \
148         src/ui/gui/psppire-buttonbox.c \
149         src/ui/gui/psppire-buttonbox.h \
150         src/ui/gui/psppire-scanf.c \
151         src/ui/gui/psppire-scanf.h \
152         src/ui/gui/psppire-acr.c \
153         src/ui/gui/psppire-import-assistant.c \
154         src/ui/gui/psppire-import-assistant.h \
155         src/ui/gui/builder-wrapper.c \
156         src/ui/gui/builder-wrapper.h \
157         src/ui/gui/dialog-common.c \
158         src/ui/gui/dialog-common.h \
159         src/ui/gui/dict-display.h \
160         src/ui/gui/dict-display.c \
161         src/ui/gui/entry-dialog.c \
162         src/ui/gui/entry-dialog.h \
163         src/ui/gui/executor.c \
164         src/ui/gui/executor.h \
165         src/ui/gui/find-dialog.c \
166         src/ui/gui/find-dialog.h \
167         src/ui/gui/goto-case-dialog.c \
168         src/ui/gui/goto-case-dialog.h \
169         src/ui/gui/helper.c \
170         src/ui/gui/help-menu.c \
171         src/ui/gui/help-menu.h \
172         src/ui/gui/helper.h \
173         src/ui/gui/main.c \
174         src/ui/gui/missing-val-dialog.c \
175         src/ui/gui/missing-val-dialog.h \
176         src/ui/gui/options-dialog.c \
177         src/ui/gui/options-dialog.h \
178         src/ui/gui/psppire.c \
179         src/ui/gui/psppire.h \
180         src/ui/gui/psppire-acr.h \
181         src/ui/gui/psppire-checkbox-treeview.c \
182         src/ui/gui/psppire-checkbox-treeview.h \
183         src/ui/gui/psppire-conf.c \
184         src/ui/gui/psppire-conf.h \
185         src/ui/gui/psppire-data-editor.c \
186         src/ui/gui/psppire-data-editor.h \
187         src/ui/gui/psppire-data-store.c \
188         src/ui/gui/psppire-data-store.h \
189         src/ui/gui/psppire-data-window.c \
190         src/ui/gui/psppire-data-window.h \
191         src/ui/gui/psppire-dialog.h \
192         src/ui/gui/psppire-dialog-action.c \
193         src/ui/gui/psppire-dialog-action.h \
194         src/ui/gui/psppire-dialog-action-aggregate.c \
195         src/ui/gui/psppire-dialog-action-aggregate.h \
196         src/ui/gui/psppire-dialog-action-autorecode.c \
197         src/ui/gui/psppire-dialog-action-autorecode.h \
198         src/ui/gui/psppire-dialog-action-1sks.c \
199         src/ui/gui/psppire-dialog-action-1sks.h \
200         src/ui/gui/psppire-dialog-action-barchart.c \
201         src/ui/gui/psppire-dialog-action-barchart.h \
202         src/ui/gui/psppire-dialog-action-binomial.c \
203         src/ui/gui/psppire-dialog-action-binomial.h \
204         src/ui/gui/psppire-dialog-action-chisquare.c \
205         src/ui/gui/psppire-dialog-action-chisquare.h \
206         src/ui/gui/psppire-dialog-action-compute.c \
207         src/ui/gui/psppire-dialog-action-compute.h \
208         src/ui/gui/psppire-dialog-action-comments.c \
209         src/ui/gui/psppire-dialog-action-comments.h \
210         src/ui/gui/psppire-dialog-action-count.c \
211         src/ui/gui/psppire-dialog-action-count.h \
212         src/ui/gui/psppire-dialog-action-correlation.c \
213         src/ui/gui/psppire-dialog-action-correlation.h \
214         src/ui/gui/psppire-dialog-action-crosstabs.c \
215         src/ui/gui/psppire-dialog-action-crosstabs.h \
216         src/ui/gui/psppire-dialog-action-descriptives.c \
217         src/ui/gui/psppire-dialog-action-descriptives.h \
218         src/ui/gui/psppire-dialog-action-examine.c \
219         src/ui/gui/psppire-dialog-action-examine.h \
220         src/ui/gui/psppire-dialog-action-factor.c \
221         src/ui/gui/psppire-dialog-action-factor.h \
222         src/ui/gui/psppire-dialog-action-flip.c \
223         src/ui/gui/psppire-dialog-action-flip.h \
224         src/ui/gui/psppire-dialog-action-frequencies.c \
225         src/ui/gui/psppire-dialog-action-frequencies.h \
226         src/ui/gui/psppire-dialog-action-histogram.c \
227         src/ui/gui/psppire-dialog-action-histogram.h \
228         src/ui/gui/psppire-dialog-action-indep-samps.c \
229         src/ui/gui/psppire-dialog-action-indep-samps.h \
230         src/ui/gui/psppire-dialog-action-kmeans.c \
231         src/ui/gui/psppire-dialog-action-kmeans.h \
232         src/ui/gui/psppire-dialog-action-logistic.c \
233         src/ui/gui/psppire-dialog-action-logistic.h \
234         src/ui/gui/psppire-dialog-action-k-independent.c \
235         src/ui/gui/psppire-dialog-action-k-independent.h \
236         src/ui/gui/psppire-dialog-action-k-related.c \
237         src/ui/gui/psppire-dialog-action-k-related.h \
238         src/ui/gui/psppire-dialog-action-means.c \
239         src/ui/gui/psppire-dialog-action-means.h \
240         src/ui/gui/psppire-dialog-action-oneway.c \
241         src/ui/gui/psppire-dialog-action-oneway.h \
242         src/ui/gui/psppire-dialog-action-paired.c \
243         src/ui/gui/psppire-dialog-action-paired.h \
244         src/ui/gui/psppire-dialog-action-rank.c \
245         src/ui/gui/psppire-dialog-action-rank.h \
246         src/ui/gui/psppire-dialog-action-recode.c \
247         src/ui/gui/psppire-dialog-action-recode.h \
248         src/ui/gui/psppire-dialog-action-recode-same.c \
249         src/ui/gui/psppire-dialog-action-recode-same.h \
250         src/ui/gui/psppire-dialog-action-recode-different.c \
251         src/ui/gui/psppire-dialog-action-recode-different.h \
252         src/ui/gui/psppire-dialog-action-regression.c \
253         src/ui/gui/psppire-dialog-action-regression.h \
254         src/ui/gui/psppire-dialog-action-reliability.c \
255         src/ui/gui/psppire-dialog-action-reliability.h \
256         src/ui/gui/psppire-dialog-action-roc.c \
257         src/ui/gui/psppire-dialog-action-roc.h \
258         src/ui/gui/psppire-dialog-action-runs.c \
259         src/ui/gui/psppire-dialog-action-runs.h \
260         src/ui/gui/psppire-dialog-action-scatterplot.c \
261         src/ui/gui/psppire-dialog-action-scatterplot.h \
262         src/ui/gui/psppire-dialog-action-sort.c \
263         src/ui/gui/psppire-dialog-action-sort.h \
264         src/ui/gui/psppire-dialog-action-select.c \
265         src/ui/gui/psppire-dialog-action-select.h \
266         src/ui/gui/psppire-dialog-action-split.c \
267         src/ui/gui/psppire-dialog-action-split.h \
268         src/ui/gui/psppire-dialog-action-tt1s.c \
269         src/ui/gui/psppire-dialog-action-tt1s.h \
270         src/ui/gui/psppire-dialog-action-two-sample.c \
271         src/ui/gui/psppire-dialog-action-two-sample.h \
272         src/ui/gui/psppire-dialog-action-univariate.c \
273         src/ui/gui/psppire-dialog-action-univariate.h \
274         src/ui/gui/psppire-dialog-action-var-info.c \
275         src/ui/gui/psppire-dialog-action-var-info.h \
276         src/ui/gui/psppire-dialog-action-weight.c \
277         src/ui/gui/psppire-dialog-action-weight.h \
278         src/ui/gui/psppire-dict.c \
279         src/ui/gui/psppire-dict.h \
280         src/ui/gui/psppire-dictview.c \
281         src/ui/gui/psppire-dictview.h \
282         src/ui/gui/psppire-encoding-selector.c \
283         src/ui/gui/psppire-encoding-selector.h \
284         src/ui/gui/psppire-format.c \
285         src/ui/gui/psppire-format.h \
286         src/ui/gui/psppire-keypad.h \
287         src/ui/gui/psppire-lex-reader.c \
288         src/ui/gui/psppire-lex-reader.h \
289         src/ui/gui/psppire-means-layer.c \
290         src/ui/gui/psppire-means-layer.h \
291         src/ui/gui/psppire-output-view.c \
292         src/ui/gui/psppire-output-view.h \
293         src/ui/gui/psppire-output-window.c \
294         src/ui/gui/psppire-output-window.h \
295         src/ui/gui/psppire-var-view.c \
296         src/ui/gui/psppire-var-view.h \
297         src/ui/gui/psppire-spreadsheet-model.c \
298         src/ui/gui/psppire-spreadsheet-model.h \
299         src/ui/gui/psppire-selector.h \
300         src/ui/gui/psppire-select-dest.c \
301         src/ui/gui/psppire-select-dest.h \
302         src/ui/gui/psppire-syntax-window.c \
303         src/ui/gui/psppire-syntax-window.h \
304         src/ui/gui/psppire-delimited-text.c \
305         src/ui/gui/psppire-delimited-text.h \
306         src/ui/gui/psppire-text-file.c \
307         src/ui/gui/psppire-text-file.h \
308         src/ui/gui/psppire-val-chooser.c \
309         src/ui/gui/psppire-val-chooser.h \
310         src/ui/gui/psppire-value-entry.c \
311         src/ui/gui/psppire-value-entry.h \
312         src/ui/gui/psppire-var-ptr.c \
313         src/ui/gui/psppire-var-ptr.h \
314         src/ui/gui/psppire-data-sheet.c \
315         src/ui/gui/psppire-data-sheet.h \
316         src/ui/gui/psppire-variable-sheet.c \
317         src/ui/gui/psppire-variable-sheet.h \
318         src/ui/gui/psppire-var-sheet-header.h \
319         src/ui/gui/psppire-var-sheet-header.c \
320         src/ui/gui/psppire-window.c \
321         src/ui/gui/psppire-window.h \
322         src/ui/gui/psppire-window-base.c \
323         src/ui/gui/psppire-window-base.h \
324         src/ui/gui/psppire-window-register.c \
325         src/ui/gui/psppire-window-register.h \
326         src/ui/gui/t-test-options.c \
327         src/ui/gui/t-test-options.h \
328         src/ui/gui/val-labs-dialog.c \
329         src/ui/gui/val-labs-dialog.h \
330         src/ui/gui/var-display.c \
331         src/ui/gui/var-display.h \
332         src/ui/gui/var-type-dialog.c \
333         src/ui/gui/var-type-dialog.h \
334         src/ui/gui/value-variant.c \
335         src/ui/gui/value-variant.h \
336         src/ui/gui/widget-io.c \
337         src/ui/gui/widget-io.h \
338         src/ui/gui/widgets.c \
339         src/ui/gui/widgets.h \
340         src/ui/gui/windows-menu.c \
341         src/ui/gui/windows-menu.h
342
343
344 OBSOLETE = \
345         src/ui/gui/page-assistant.c \
346         src/ui/gui/page-intro.c \
347         src/ui/gui/page-intro.h \
348         src/ui/gui/page-file.c \
349         src/ui/gui/page-first-line.c \
350         src/ui/gui/page-first-line.h \
351         src/ui/gui/page-formats.c \
352         src/ui/gui/page-formats.h \
353         src/ui/gui/page-separators.c \
354         src/ui/gui/page-separators.h \
355         src/ui/gui/page-sheet-spec.c \
356         src/ui/gui/page-sheet-spec.h \
357         src/ui/gui/text-data-import-dialog.c \
358         src/ui/gui/text-data-import-dialog.h
359
360
361 nodist_src_ui_gui_psppire_SOURCES = \
362         src/ui/gui/psppire-marshal.c \
363         src/ui/gui/psppire-marshal.h \
364         src/ui/gui/resources.c
365
366 yelp-check:
367         @if ! yelp --version > /dev/null 2>&1 ; then \
368                 echo    ; \
369                 echo '    The Yelp document viewer does not seem to be installed on the system.' ; \
370                 echo '    If Yelp is not available at run time, then the PSPPIRE online reference' ; \
371                 echo '    manual will not be available.' ; \
372                 echo '    Yelp is available from the GNOME project.  ftp://ftp.gnome.org/pub/gnome/sources/yelp' ; \
373                 echo ; \
374         fi
375
376 PHONY += yelp-check
377
378 AM_CPPFLAGS += -Isrc
379
380 src/ui/gui/org.fsf.pspp.metainfo.xml: src/ui/gui/org.fsf.pspp.metainfo.xml.in $(POFILES)
381         $(AM_V_GEN)$(MSGFMT) --xml --template $< -o $@ -d $(top_srcdir)/po || \
382           $(MSGFMT) -L appdata --xml --template $< -o $@ -d $(top_srcdir)/po
383
384 src/ui/gui/org.fsf.pspp.desktop: src/ui/gui/org.fsf.pspp.desktop.in $(POFILES)
385         $(AM_V_GEN)$(MSGFMT) --desktop --template $< -o $@ -d $(top_srcdir)/po
386
387 CLEANFILES+=src/ui/gui/org.fsf.pspp.desktop \
388             src/ui/gui/org.fsf.pspp.metainfo.xml
389
390 src/ui/gui/resources.c: src/ui/gui/resources.xml
391         $(AM_V_at)$(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/src/ui/gui --generate-source $< --target=$@,out
392         $(AM_V_GEN)echo '#include <config.h>' > $@,tmp
393         cat $@,out >> $@,tmp
394         $(RM) $@,out
395         mv $@,tmp $@
396
397 src/ui/gui/psppire-marshal.c: src/ui/gui/marshaller-list
398         $(AM_V_GEN)echo '#include <config.h>' > $@
399         $(AM_V_at)$(GLIB_GENMARSHAL) --body --prefix=psppire_marshal $? >> $@
400
401 src/ui/gui/psppire-marshal.h: src/ui/gui/marshaller-list
402         $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=psppire_marshal $? > $@
403
404 mimedir = $(datadir)/mime/packages
405 mime_DATA = src/ui/gui/pspp.xml
406 EXTRA_DIST += src/ui/gui/pspp.xml
407
408 desktopdir = $(datadir)/applications
409 desktop_DATA = src/ui/gui/org.fsf.pspp.desktop
410
411 appdatadir = $(datadir)/metainfo
412 dist_appdata_DATA = src/ui/gui/org.fsf.pspp.metainfo.xml
413
414 BUILT_SOURCES += src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h src/ui/gui/resources.c
415
416 CLEANFILES += src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h \
417         src/ui/gui/resources.c $(nodist_src_ui_gui_psppire_DATA)
418
419 endif HAVE_GUI
420
421 #ensure the installcheck passes even if there is no X server available
422 installcheck-local:
423         DISPLAY=/invalid/port $(MAKE) $(AM_MAKEFLAGS) installcheck-binPROGRAMS
424
425 # <gtk/gtk.h> wrapper
426 src_ui_gui_psppire_CPPFLAGS += $(AM_CPPFLAGS) -Isrc/ui/gui/include
427 BUILT_SOURCES += src/ui/gui/include/gtk/gtk.h
428 src/ui/gui/include/gtk/gtk.h: src/ui/gui/include/gtk/gtk.in.h
429         @$(MKDIR_P) src/ui/gui/include/gtk
430         $(AM_V_GEN)rm -f $@-t $@ && \
431         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
432           $(SED) -e 's|%''INCLUDE_NEXT''%|$(INCLUDE_NEXT)|g' \
433               -e 's|%''PRAGMA_SYSTEM_HEADER''%|$(PRAGMA_SYSTEM_HEADER)|g' \
434               -e 's|%''PRAGMA_COLUMNS''%|$(PRAGMA_COLUMNS)|g' \
435               -e 's|%''NEXT_GTK_GTK_H''%|$(NEXT_GTK_GTK_H)|g' \
436               < $(srcdir)/src/ui/gui/include/gtk/gtk.in.h; \
437         } > $@-t && \
438         mv $@-t $@
439 CLEANFILES += src/ui/gui/include/gtk/gtk.h
440 EXTRA_DIST += src/ui/gui/include/gtk/gtk.in.h src/ui/gui/resources.xml
441
442 include $(top_srcdir)/src/ui/gui/icons/automake.mk
443
444 UNINSTALL_DATA_HOOKS += update-icon-cache
445 INSTALL_DATA_HOOKS += update-icon-cache
446