2 # Gnumeric's Makefile.am
3 # Author: Miguel de Icaza (miguel@kernel.org)
4 -include $(INTROSPECTION_MAKEFILE)
6 INTROSPECTION_SCANNER_ARGS = \
7 --add-include-path="${INTROSPECTION_GIRDIR}" \
8 -v --warn-all --accept-unprefixed \
9 --identifier-prefix="Gnm" --identifier-prefix="Gnumeric" \
11 -DGOFFICE_NAMESPACE_DISABLE
12 INTROSPECTION_COMPILER_ARGS = \
13 --includedir=$(srcdir) \
15 --includedir="${INTROSPECTION_GIRDIR}"
19 lib_LTLIBRARIES = libspreadsheet.la
23 noinst_PROGRAMS = sstest
25 noinst_HEADERS = dead-kittens.h compilation.h gnm-i18n.h
28 bin_PROGRAMS += gnumeric
31 bin_PROGRAMS += ssconvert ssindex ssgrep ssdiff
39 # A hint is needed to build these headers first:
47 # These also need to occur in gnm.gresource.xml
49 dialogs/advanced-filter.ui \
50 dialogs/anova-one.ui \
51 dialogs/anova-two.ui \
52 dialogs/autofilter-expression.ui \
53 dialogs/autofilter-top10.ui \
54 dialogs/autoformat.ui \
56 dialogs/cell-comment.ui \
57 dialogs/cell-format-cond.ui \
58 dialogs/cell-format.ui \
59 dialogs/cell-sort.ui \
60 dialogs/chi-squared.ui \
61 dialogs/col-width.ui \
63 dialogs/consolidate.ui \
64 dialogs/correlation.ui \
65 dialogs/covariance.ui \
67 dialogs/data-slicer.ui \
68 dialogs/data-table.ui \
69 dialogs/define-name.ui \
70 dialogs/delete-cells.ui \
71 dialogs/descriptive-stats.ui \
72 dialogs/dialog-stf-export.ui \
73 dialogs/dialog-stf.ui \
74 dialogs/dialog-zoom.ui \
75 dialogs/doc-meta-data.ui \
76 dialogs/exp-smoothing.ui \
77 dialogs/fill-series.ui \
78 dialogs/formula-guru.ui \
79 dialogs/fourier-analysis.ui \
80 dialogs/frequency.ui \
81 dialogs/function-select.ui \
84 dialogs/hf-config.ui \
85 dialogs/hf-dt-format.ui \
86 dialogs/histogram.ui \
87 dialogs/hyperlink.ui \
88 dialogs/insert-cells.ui \
89 dialogs/kaplan-meier.ui \
90 dialogs/mean-tests.ui \
92 dialogs/moving-averages.ui \
93 dialogs/normality-tests.ui \
94 dialogs/one-mean-test.ui \
95 dialogs/paste-special.ui \
96 dialogs/plugin-manager.ui \
97 dialogs/preferences.ui \
98 dialogs/principal-components.ui \
101 dialogs/random-generation-cor.ui \
102 dialogs/random-generation.ui \
105 dialogs/regression.ui \
106 dialogs/row-height.ui \
107 dialogs/sampling.ui \
108 dialogs/scenario-add.ui \
109 dialogs/scenario-manager.ui \
110 dialogs/search-replace.ui \
112 dialogs/sheet-compare.ui \
113 dialogs/sheet-order.ui \
114 dialogs/sheet-rename.ui \
115 dialogs/sheet-resize.ui \
116 dialogs/sheetobject-size.ui \
118 dialogs/sign-test-two.ui \
119 dialogs/sign-test.ui \
120 dialogs/simulation.ui \
121 dialogs/so-button.ui \
122 dialogs/so-checkbox.ui \
123 dialogs/so-frame.ui \
125 dialogs/so-radiobutton.ui \
126 dialogs/so-scrollbar.ui \
128 dialogs/tabulate.ui \
129 dialogs/variance-tests.ui \
132 dialogs/wilcoxon-mann-whitney.ui \
133 dialogs/workbook-attr.ui
136 dialogs/dao-gui-utils.c \
137 dialogs/dialog-about.c \
138 dialogs/dialog-advanced-filter.c \
139 dialogs/dialog-analysis-tools.c \
140 dialogs/dialog-analysis-tool-chi-squared.c \
141 dialogs/dialog-analysis-tool-frequency.c \
142 dialogs/dialog-analysis-tool-kaplan-meier.c \
143 dialogs/dialog-analysis-tool-normality.c \
144 dialogs/dialog-analysis-tool-one-mean.c \
145 dialogs/dialog-analysis-tool-principal-components.c \
146 dialogs/dialog-analysis-tool-sign-test.c \
147 dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c \
148 dialogs/dialog-autofilter.c \
149 dialogs/dialog-autoformat.c \
150 dialogs/dialog-autosave.c \
151 dialogs/dialog-cell-comment.c \
152 dialogs/dialog-cell-format.c \
153 dialogs/dialog-cell-format-cond.c \
154 dialogs/dialog-cell-sort.c \
155 dialogs/dialog-col-width.c \
156 dialogs/dialog-col-row.c \
157 dialogs/dialog-consolidate.c \
158 dialogs/dialog-data-slicer.c \
159 dialogs/dialog-data-table.c \
160 dialogs/dialog-fill-series.c \
161 dialogs/dialog-function-select.c \
162 dialogs/dialog-formula-guru.c \
163 dialogs/dialog-goal-seek.c \
164 dialogs/dialog-goto-cell.c \
165 dialogs/dialog-hyperlink.c \
166 dialogs/dialog-insert-cells.c \
167 dialogs/dialog-define-names.c \
168 dialogs/dialog-delete-cells.c \
169 dialogs/dialog-merge.c \
170 dialogs/dialog-password.c \
171 dialogs/dialog-paste-special.c \
172 dialogs/dialog-plugin-manager.c \
173 dialogs/dialog-preferences.c \
174 dialogs/dialog-random-generator.c \
175 dialogs/dialog-random-generator-cor.c \
176 dialogs/dialog-recent.c \
177 dialogs/dialog-row-height.c \
178 dialogs/dialog-quit.c \
179 dialogs/dialog-scenarios.c \
180 dialogs/dialog-search.c \
181 dialogs/dialog-search-replace.c \
182 dialogs/dialog-sheet-compare.c \
183 dialogs/dialog-sheet-order.c \
184 dialogs/dialog-sheet-rename.c \
185 dialogs/dialog-sheet-resize.c \
186 dialogs/dialog-sheetobject-size.c \
187 dialogs/dialog-shuffle.c \
188 dialogs/dialog-simulation.c \
189 dialogs/dialog-so-list.c \
190 dialogs/dialog-so-styled.c \
191 dialogs/dialog-solver.c \
192 dialogs/dialog-stf.c \
193 dialogs/dialog-stf-main-page.c \
194 dialogs/dialog-stf-csv-page.c \
195 dialogs/dialog-stf-fixed-page.c \
196 dialogs/dialog-stf-format-page.c \
197 dialogs/dialog-stf-preview.c \
198 dialogs/dialog-stf-export.c \
199 dialogs/dialog-tabulate.c \
200 dialogs/dialog-doc-metadata.c \
201 dialogs/dialog-view.c \
202 dialogs/dialog-workbook-attr.c \
203 dialogs/dialog-zoom.c \
204 dialogs/dialog-printer-setup.c
208 dialogs/dao-gui-utils.h \
209 dialogs/dialog-stf.h \
210 dialogs/dialog-stf-preview.h \
211 dialogs/dialog-stf-export.h \
213 dialogs/tool-dialogs.h
217 widgets/gnm-fontbutton.c \
218 widgets/gnm-format-sel.c \
219 widgets/gnm-notebook.c \
220 widgets/gnm-radiobutton.c \
221 widgets/gnm-cell-combo-view.c \
222 widgets/gnm-filter-combo-view.c \
223 widgets/gnm-validation-combo-view.c \
224 widgets/gnm-sheet-sel.c \
225 widgets/gnm-sheet-slicer-combo-view.c \
226 widgets/gnm-so-anchor-mode-chooser.c \
227 widgets/gnm-workbook-sel.c \
228 widgets/gnumeric-cell-renderer-text.c \
229 widgets/gnumeric-cell-renderer-expr-entry.c \
230 widgets/gnumeric-cell-renderer-toggle.c \
231 widgets/gnumeric-dashed-canvas-line.c \
232 widgets/gnumeric-expr-entry.c \
233 widgets/gnumeric-lazy-list.c \
234 widgets/gnumeric-text-view.c
238 widgets/gnm-fontbutton.h \
239 widgets/gnm-format-sel.h \
240 widgets/gnm-notebook.h \
241 widgets/gnm-radiobutton.h \
242 widgets/gnm-cell-combo-view.h \
243 widgets/gnm-cell-combo-view-impl.h \
244 widgets/gnm-filter-combo-view.h \
245 widgets/gnm-validation-combo-view.h \
246 widgets/gnm-sheet-sel.h \
247 widgets/gnm-sheet-slicer-combo-view.h \
248 widgets/gnm-so-anchor-mode-chooser.h \
249 widgets/gnm-workbook-sel.h \
250 widgets/gnumeric-cell-renderer-text.h \
251 widgets/gnumeric-cell-renderer-expr-entry.h \
252 widgets/gnumeric-cell-renderer-toggle.h \
253 widgets/gnumeric-dashed-canvas-line.h \
254 widgets/gnumeric-expr-entry.h \
255 widgets/gnumeric-lazy-list.h \
256 widgets/gnumeric-text-view.h
259 tools/analysis-anova.c \
260 tools/analysis-auto-expression.c \
261 tools/analysis-chi-squared.c \
262 tools/analysis-exp-smoothing.c \
263 tools/analysis-frequency.c \
264 tools/analysis-histogram.c \
265 tools/analysis-kaplan-meier.c \
266 tools/analysis-normality.c \
267 tools/analysis-one-mean-test.c \
268 tools/analysis-principal-components.c \
269 tools/analysis-sign-test.c \
270 tools/analysis-signed-rank-test.c \
271 tools/analysis-tools.c \
272 tools/analysis-wilcoxon-mann-whitney.c \
273 tools/auto-correct.c \
275 tools/data-shuffling.c \
276 tools/fill-series.c \
280 tools/random-generator-cor.c \
281 tools/random-generator.c \
287 tools/analysis-anova.h \
288 tools/analysis-auto-expression.h \
289 tools/analysis-chi-squared.h \
290 tools/analysis-exp-smoothing.h \
291 tools/analysis-frequency.h \
292 tools/analysis-histogram.h \
293 tools/analysis-kaplan-meier.h \
294 tools/analysis-normality.h \
295 tools/analysis-one-mean-test.h \
296 tools/analysis-principal-components.h \
297 tools/analysis-sign-test.h \
298 tools/analysis-signed-rank-test.h \
299 tools/analysis-tools.h \
300 tools/analysis-wilcoxon-mann-whitney.h \
301 tools/auto-correct.h \
303 tools/data-shuffling.h \
304 tools/fill-series.h \
308 tools/random-generator-cor.h \
309 tools/random-generator.h \
316 # Another hint, see bugs #172211 and #172212:
317 non-intermediate: gnm-marshalers.c gnmresources.c
319 resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir) --generate-dependencies $(srcdir)/gnm.gresource.xml)
321 gnmresources.h: gnm.gresource.xml
322 $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
323 --target=$@ --sourcedir=$(top_srcdir) --c-name _gnm --generate-header --manual-register
324 gnmresources.c: gnm.gresource.xml $(resource_files) Makefile
325 $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
326 --target=$@ --sourcedir=$(top_srcdir) --c-name _gnm --generate-source --manual-register
329 CLEANFILES = $(BUILT_SOURCES) \
332 libspreadsheet_la_CPPFLAGS = $(AM_CPPFLAGS) -DGNUMERIC_INTERNAL
333 libspreadsheet_la_LDFLAGS = -release $(VERSION)
334 libspreadsheet_la_LIBADD = \
338 libspreadsheet_la_SOURCES = \
343 go-data-cache-source.c \
344 go-data-cache-source.h \
345 go-data-cache-impl.h \
348 go-data-cache-field-impl.h \
349 go-data-cache-field.h \
350 go-data-cache-field.c \
351 go-data-slicer-impl.h \
354 go-data-slicer-field-impl.h \
355 go-data-slicer-field.h \
356 go-data-slicer-field.c \
358 gnm-data-cache-source.h \
359 gnm-data-cache-source.c \
362 gnm-sheet-slicer-combo.h \
363 gnm-sheet-slicer-combo.c \
378 command-context-stderr.c \
394 gnm-commands-slicer.c \
407 gnumeric-simple-canvas.c \
429 preview-grid-impl.h \
434 rangefunc-strings.c \
446 sheet-control-gui.c \
451 sheet-object-cell-comment.c \
452 sheet-object-component.c \
453 sheet-object-graph.c \
454 sheet-object-image.c \
455 sheet-object-widget.c \
476 workbook-cmd-format.c \
486 libspreadsheet_la_SOURCES += $(widgets_sources)
488 EXTRA_DIST += $(widgets_sources)
491 nodist_libspreadsheet_la_SOURCES = gnmresources.c gnmresources.h
493 # When we switch to subversion fix this to nest as
494 # libspreadsheet-ver/spreadsheet/header
495 # doing it now would require massive cvs surgery.
496 libspreadsheet_includedir = $(includedir)/libspreadsheet-@GNUMERIC_API_VER@/spreadsheet
497 libspreadsheet_include_HEADERS = \
507 command-context-stderr.h \
525 gnm-commands-slicer.h \
526 gnm-data-cache-source.h \
540 gnumeric-simple-canvas.h \
542 go-data-cache-field.h \
543 go-data-cache-source.h \
545 go-data-slicer-field.h \
573 rangefunc-strings.h \
586 sheet-control-gui-priv.h \
587 sheet-control-gui.h \
588 sheet-control-priv.h \
591 sheet-filter-combo.h \
594 sheet-object-cell-comment.h \
595 sheet-object-component.h \
596 sheet-object-graph.h \
597 sheet-object-image.h \
598 sheet-object-impl.h \
599 sheet-object-widget-impl.h \
600 sheet-object-widget.h \
622 workbook-cmd-format.h \
623 workbook-control-priv.h \
643 gnumeric_LDFLAGS = -export-dynamic
645 ssconvert_LDADD = $(gnumeric_LDADD)
646 ssconvert_LDFLAGS = -export-dynamic
647 ssconvert_SOURCES = \
649 ssindex_LDADD = $(gnumeric_LDADD)
650 ssindex_LDFLAGS = -export-dynamic
653 ssgrep_LDADD = $(gnumeric_LDADD)
654 ssgrep_LDFLAGS = -export-dynamic
657 sstest_LDADD = $(gnumeric_LDADD)
658 sstest_LDFLAGS = -export-dynamic
661 ssdiff_LDADD = $(gnumeric_LDADD)
662 ssdiff_LDFLAGS = -export-dynamic
667 gnumeric_LDADD += gnumeric_rc.o
668 gnumeric_LDFLAGS += -mwindows -Wl,--stack,0x4000000
669 ssconvert_LDFLAGS += -mconsole -Wl,--stack,0x4000000
670 ssindex_LDFLAGS += -mconsole
671 ssgrep_LDFLAGS += -mconsole
673 libspreadsheet_la_DEPENDENCIES = libspreadsheet.def
674 libspreadsheet_la_LDFLAGS += -no-undefined -export-symbols libspreadsheet.def
678 libspreadsheet.def: local.def
679 echo EXPORTS > $@ && \
682 local.def: stamp-local.def
685 stamp-local.def: $(libspreadsheet_include_HEADERS) Makefile $(top_srcdir)/tools/dumpdef.pl
686 hdrs='$(libspreadsheet_include_HEADERS) dialogs/dialogs.h dialogs/tool-dialogs.h tools/dao.h tools/goal-seek.h tools/analysis-tools.h tools/gnm-solver.h widgets/gnumeric-expr-entry.h'; \
688 for hdr in $$hdrs; do \
689 if test -f $(srcdir)/$$hdr; then \
690 hdrs_list="$$hdrs_list $(srcdir)/$$hdr"; \
692 hdrs_list="$$hdrs_list $$hdr"; \
695 cat $(top_builddir)/gnumeric-config.h $$hdrs_list | \
696 sed -e 's/^#[ \t]*include[ \t]\+.*$$//g' | \
697 $(CPP) $(AM_CPPFLAGS) "-DGNM_VAR_DECL=__declspec(dllexport)" -P - > xgen-localdef.1 && \
698 perl $(top_srcdir)/tools/dumpdef.pl \
699 xgen-localdef.1 > xgen-localdef.2 \
700 && (cmp -s xgen-localdef.2 local.def || \
701 cp xgen-localdef.2 local.def) \
702 && rm -f xgen-localdef.1 xgen-localdef.2 \
703 && echo timestamp > $@
708 # Rules for the marshalers code:
709 GENMARSHAL_COMMAND = $(GLIB_GENMARSHAL) --prefix=gnm_
712 $(GENMARSHAL_COMMAND) --header $< >$@
715 (echo '/* This file has been automatically generated. Do not edit. */' && \
716 echo '#include "$*.h"' && \
717 $(GENMARSHAL_COMMAND) --body $< ) >$@
719 # Depends on this Makefile, because it uses make variables.
720 gnumeric-paths.h: Makefile
723 echo '/* This file has been automatically generated. Do not edit. */'; \
725 echo '#ifndef GNUMERIC_PATHS_H'; \
726 echo '#define GNUMERIC_PATHS_H'; \
728 echo '#define GNUMERIC_PREFIX "$(prefix)"'; \
729 echo '#define GNUMERIC_SYSCONFDIR "$(sysconfdir)"'; \
730 echo '#define GNUMERIC_DATADIR "$(gnumeric_datadir)"'; \
731 echo '#define GNUMERIC_LIBDIR "$(gnumeric_libdir)"'; \
732 echo '#define GNUMERIC_ICONDIR "$(gnumeric_icondir)"'; \
733 echo '#define GNUMERIC_LOCALEDIR "$(gnumeric_localedir)"'; \
734 echo '#define GNUMERIC_EXTERNPLUGINDIR "$(gnumeric_externplugindir)"'; \
736 echo '#endif /* GNUMERIC_PATHS_H */'; \
739 update-gnumeric-conf:
740 make -C ${top_srcdir}/schemas
741 rm -f gnumeric-conf.c.tmp
742 @PERL@ -pe 'if (/AUTOMATICALLY GENERATED CODE BELOW/) { print; print "\n"; last; }' <gnumeric-conf.c >gnumeric-conf.c.tmp
743 @PERL@ ${top_srcdir}/tools/handle-conf-options --cfile ${top_srcdir}/schemas/org.gnome.gnumeric*.gschema.xml.in >>gnumeric-conf.c.tmp
744 if cmp gnumeric-conf.c gnumeric-conf.c.tmp; then \
745 rm gnumeric-conf.c.tmp; \
747 mv gnumeric-conf.c.tmp gnumeric-conf.c; \
749 rm -f gnumeric-conf.h.tmp
750 @PERL@ -pe 'if (/AUTOMATICALLY GENERATED CODE BELOW/) { print; print "\n"; last; }' <gnumeric-conf.h >gnumeric-conf.h.tmp
751 @PERL@ ${top_srcdir}/tools/handle-conf-options --hfile ${top_srcdir}/schemas/org.gnome.gnumeric*.gschema.xml.in >>gnumeric-conf.h.tmp
752 echo '' >>gnumeric-conf.h.tmp
753 @PERL@ -ne '$$p=1 if (/AUTOMATICALLY GENERATED CODE ABOVE/); print if $$p;' <gnumeric-conf.h >>gnumeric-conf.h.tmp
754 if cmp gnumeric-conf.h gnumeric-conf.h.tmp; then \
755 rm gnumeric-conf.h.tmp; \
757 mv gnumeric-conf.h.tmp gnumeric-conf.h; \
761 gnumeric_rc.o: gnumeric.rc ../gnumeric-config.h
762 $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir) -i $< -o $@
766 cd $(DESTDIR)$(bindir) && \
767 mv -f gnumeric$(EXEEXT) gnumeric-$(VERSION)$(EXEEXT) && \
768 $(LN_S) gnumeric-$(VERSION)$(EXEEXT) gnumeric$(EXEEXT)
772 -cd $(DESTDIR)$(bindir) && \
773 rm -f gnumeric-$(VERSION)$(EXEEXT)
775 # include conditional files to ensure everything gets distributed no matter
779 pixmaps/line_pattern_dash_dot.png \
780 pixmaps/line_pattern_dash_dot_dot.png \
781 pixmaps/line_pattern_dashed.png \
782 pixmaps/line_pattern_dotted.png \
783 pixmaps/line_pattern_double.png \
784 pixmaps/line_pattern_hair.png \
785 pixmaps/line_pattern_medium.png \
786 pixmaps/line_pattern_medium_dash.png \
787 pixmaps/line_pattern_medium_dash_dot.png \
788 pixmaps/line_pattern_medium_dash_dot_dot.png \
789 pixmaps/line_pattern_slant.png \
790 pixmaps/line_pattern_thick.png \
791 pixmaps/line_pattern_thin.png \
792 pixmaps/right-down.png \
793 pixmaps/down-right.png \
794 pixmaps/gnumeric_splash_1.4.png \
795 pixmaps/unknown_image.png \
796 pixmaps/sheet_move_marker.png \
798 gnm-marshalers.list \
801 GNOME_Gnumeric-gtk.xml \
804 if HAVE_INTROSPECTION
806 INTROSPECTION_GIRS += Gnm-@GNUMERIC_API_VER@.gir
808 Gnm-@GNUMERIC_API_VER@.gir: $(INTROSPECTION_SCANNER) libspreadsheet.la Makefile
809 Gnm_@GNUMERIC_API_VER_@_gir_INCLUDES = GObject-2.0 Gio-2.0 libxml2-2.0 \
810 Gsf-1 GOffice-@GOFFICE_API_VER@
811 Gnm_@GNUMERIC_API_VER_@_gir_CFLAGS = $(AM_CPPFLAGS)
812 Gnm_@GNUMERIC_API_VER_@_gir_LIBS = libspreadsheet.la
813 Gnm_@GNUMERIC_API_VER_@_gir_FILES = \
814 $(libspreadsheet_la_SOURCES) \
815 $(libspreadsheet_include_HEADERS)
819 gir_DATA = $(INTROSPECTION_GIRS)
821 typelibsdir = $(TYPELIBDIR)
822 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
824 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
826 endif # HAVE_INTROSPECTION