DO IF, LOOP cleanup.
[pspp-builds.git] / src / Makefile.am
1 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
2
3 # PSPP
4
5 include $(top_srcdir)/src/Make.build
6
7 SUBDIRS = expressions
8
9 # If you change this, you must also change the corresponding line in 
10 # config/Makefile.am
11 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
12
13 bin_PROGRAMS = pspp
14
15 MAINTAINERCLEANFILES = Makefile.in
16 EXTRA_DIST = $(q_sources_q) q2c.c
17 ETAGS_ARGS = -l c $(q_sources_c)
18 SUFFIXES = .q
19
20 $(q_sources_c): q2c$(EXEEXT)
21 .q.c:
22         ./q2c $< $@
23
24 q_sources_c =                                   \
25         correlations.c                          \
26         crosstabs.c                             \
27         examine.c                               \
28         file-handle.c                           \
29         frequencies.c                           \
30         list.c                                  \
31         means.c                                 \
32         oneway.c                                \
33         rank.c                                  \
34         regression.c                            \
35         set.c                                   \
36         t-test.c
37
38 CLEANFILES=$(q_sources_c)
39 DISTCLEANFILES=version.c
40
41 q_sources_q =                                   \
42         correlations.q                          \
43         crosstabs.q                             \
44         examine.q                               \
45         file-handle.q                           \
46         frequencies.q                           \
47         list.q                                  \
48         means.q                                 \
49         oneway.q                                \
50         rank.q                                  \
51         regression.q                            \
52         set.q                                   \
53         t-test.q
54
55 if WITHCHARTS
56 chart_sources =                                 \
57         barchart.c                              \
58         box-whisker.c                           \
59         cartesian.c                             \
60         plot-chart.c                            \
61         plot-hist.c                             \
62         piechart.c 
63 else
64 chart_sources = dummy-chart.c
65 endif
66
67 pspp_SOURCES =                                  \
68         $(q_sources_c)                          \
69         $(chart_sources)                        \
70         aggregate.c                             \
71         algorithm.c                             \
72         algorithm.h                             \
73         alloc.c                                 \
74         alloc.h                                 \
75         apply-dict.c                            \
76         ascii.c                                 \
77         autorecode.c                            \
78         bitvector.h                             \
79         calendar.c                              \
80         calendar.h                              \
81         case.c                                  \
82         case.h                                  \
83         casefile.c                              \
84         casefile.h                              \
85         cat.c                                   \
86         cat.h                                   \
87         chart.c                                 \
88         chart.h                                 \
89         ctl-stack.c                             \
90         ctl-stack.h                             \
91         cmdline.c                               \
92         cmdline.h                               \
93         command.c                               \
94         command.def                             \
95         command.h                               \
96         compute.c                               \
97         copyleft.c                              \
98         copyleft.h                              \
99         count.c                                 \
100         data-in.c                               \
101         data-in.h                               \
102         data-list.c                             \
103         data-list.h                             \
104         data-out.c                              \
105         date.c                                  \
106         debug-print.h                           \
107         descript.c                              \
108         devind.c                                \
109         devind.h                                \
110         dfm-read.c                              \
111         dfm-read.h                              \
112         dfm-write.c                             \
113         dfm-write.h                             \
114         dictionary.c                            \
115         dictionary.h                            \
116         do-if.c                                 \
117         echo.c                                  \
118         error.c                                 \
119         error.h                                 \
120         factor_stats.c                          \
121         factor_stats.h                          \
122         file-handle-def.c                       \
123         file-handle-def.h                       \
124         file-handle.h                           \
125         file-type.c                             \
126         filename.c                              \
127         filename.h                              \
128         flip.c                                  \
129         font.h                                  \
130         format.c                                \
131         format-prs.c                            \
132         format.def                              \
133         format.h                                \
134         formats.c                               \
135         get.c                                   \
136         getl.c                                  \
137         getl.h                                  \
138         glob.c                                  \
139         glob.h                                  \
140         groff-font.c                            \
141         group.c                                 \
142         group.h                                 \
143         group_proc.h                            \
144         hash.c                                  \
145         hash.h                                  \
146         histogram.c                             \
147         histogram.h                             \
148         html.c                                  \
149         htmlP.h                                 \
150         include.c                               \
151         inpt-pgm.c                              \
152         lexer.c                                 \
153         lexer.h                                 \
154         lex-def.h                               \
155         lex-def.c                               \
156         levene.c                                \
157         levene.h                                \
158         linked-list.c                           \
159         linked-list.h                           \
160         log.h                                   \
161         loop.c                                  \
162         magic.c                                 \
163         magic.h                                 \
164         main.c                                  \
165         main.h                                  \
166         matrix-data.c                           \
167         mis-val.c                               \
168         misc.c                                  \
169         misc.h                                  \
170         missing-values.c                        \
171         missing-values.h                        \
172         modify-vars.c                           \
173         moments.c                               \
174         moments.h                               \
175         numeric.c                               \
176         output.c                                \
177         output.h                                \
178         percentiles.c                           \
179         percentiles.h                           \
180         permissions.c                           \
181         pfm-read.c                              \
182         pfm-read.h                              \
183         pfm-write.c                             \
184         pfm-write.h                             \
185         pool.c                                  \
186         pool.h                                  \
187         postscript.c                            \
188         print.c                                 \
189         range-prs.c                             \
190         range-prs.h                             \
191         recode.c                                \
192         rename-vars.c                           \
193         repeat.c                                \
194         repeat.h                                \
195         sample.c                                \
196         sel-if.c                                \
197         settings.h                              \
198         sfm-read.c                              \
199         sfm-read.h                              \
200         sfm-write.c                             \
201         sfm-write.h                             \
202         sfmP.h                                  \
203         som.c                                   \
204         som.h                                   \
205         sort.c                                  \
206         sort.h                                  \
207         sort-prs.c                              \
208         sort-prs.h                              \
209         split-file.c                            \
210         str.c                                   \
211         str.h                                   \
212         subclist.c                              \
213         subclist.h                              \
214         sysfile-info.c                          \
215         tab.c                                   \
216         tab.h                                   \
217         temporary.c                             \
218         mkfile.c                                \
219         mkfile.h                                \
220         title.c                                 \
221         val.h                                   \
222         val-labs.c                              \
223         value-labels.c                          \
224         value-labels.h                          \
225         var-display.c                           \
226         var-labs.c                              \
227         var.h                                   \
228         vars-atr.c                              \
229         vars-prs.c                              \
230         vector.c                                \
231         version.h                               \
232         vfm.c                                   \
233         vfm.h                                   \
234         vfmP.h                                  \
235         weight.c
236
237 pspp_LDADD =                                    \
238         expressions/libexpressions.a            \
239         ../lib/gsl-extras/libgsl-extras.a       \
240         ../lib/linreg/liblinreg.a               \
241         ../gl/libgl.a                           \
242         @LIBINTL@
243
244 nodist_pspp_SOURCES = version.c
245
246 version.c:
247         echo "#include <config.h>" > version.c
248         echo "#include \"version.h\"" > version.c
249         echo "const char bare_version[] = \"@VERSION@\";" >> version.c
250         echo "const char version[] = \"GNU @PACKAGE@ @VERSION@\";" >> version.c
251         echo "const char stat_version[] = \"GNU @PACKAGE@ @VERSION@ \
252 (`date`).\";" >> version.c
253         echo "const char host_system[] = \"$(host_triplet)\";" >> version.c
254         echo "const char build_system[] = \"$(build_triplet)\";" >> version.c
255         echo "const char default_config_path[] =\
256 \"~/.pspp:$(pkgsysconfdir)\";" >> version.c
257         echo "const char include_path[] =\
258 \"./:~/.pspp/include:$(pkgdatadir)\";" >> version.c
259         echo "const char groff_font_path[] = \"~/.pspp/font:\" \\" >> version.c
260         echo "  \"$(pkgdatadir)/font:\" \\" >> version.c
261         echo "  \"/usr/local/lib/groff/font:\" \\" >> version.c
262         echo "  \"/usr/lib/groff/font:\" \\" >> version.c
263         echo "  \"/usr/local/share/groff/font:\" \\" >> version.c
264         echo "  \"/usr/share/groff/font\";" >> version.c
265         echo "const char locale_dir[] = \"$(datadir)/locale\";" >> version.c
266
267 noinst_PROGRAMS = q2c
268 q2c_SOURCES = q2c.c