Replaced the splash screen with a new one
[pspp] / Smake
1 # -*- makefile -*-
2
3 # Adjust these to reflect where you've installed gnulib.
4 GNULIB = ../gnulib
5 GNULIB_TOOL = $(GNULIB)/gnulib-tool
6
7 GNULIB_MODULES = \
8         assert \
9         byteswap \
10         c-snprintf \
11         c-strcase \
12         c-strcasestr \
13         c-ctype \
14         c-strtod \
15         c-xvasprintf \
16         clean-temp \
17         close \
18         configmake \
19         count-one-bits \
20         crc \
21         crypto/md4 \
22         crypto/md5 \
23         dirname \
24         dtoastr \
25         environ \
26         fatal-signal \
27         fcntl \
28         fpieee \
29         fprintf-posix \
30         full-read \
31         full-write \
32         fseeko \
33         ftello \
34         fwriteerror \
35         getline \
36         gettext \
37         gettimeofday \
38         getopt-gnu \
39         gitlog-to-changelog \
40         include_next \
41         isfinite \
42         isinf \
43         isnan \
44         intprops \
45         inttostr \
46         localcharset \
47         mbchar \
48         mbiter \
49         memcasecmp \
50         memchr \
51         memchr2 \
52         mempcpy \
53         memrchr \
54         minmax \
55         mkdtemp \
56         mkstemp \
57         pipe2 \
58         printf-posix \
59         printf-safe \
60         progname \
61         rawmemchr \
62         read-file \
63         regex \
64         relocatable-prog \
65         rename \
66         round \
67         select \
68         snprintf \
69         snprintf-posix \
70         sprintf-posix \
71         stdarg \
72         stdbool \
73         stdint \
74         strcasestr \
75         stpcpy \
76         strerror \
77         strftime \
78         strtod \
79         strtok_r \
80         sys_stat \
81         tempname \
82         trunc \
83         unicase/u8-casecmp \
84         unicase/u8-casefold \
85         unicase/u8-tolower \
86         unicase/u8-toupper \
87         unictype/ctype-print \
88         unictype/category-of \
89         unigbrk/uc-is-grapheme-break \
90         unilbrk/u8-possible-linebreaks \
91         uninorm/nfkd \
92         unistd \
93         unistr/u8-check \
94         unistr/u8-cpy \
95         unistr/u8-mblen \
96         unistr/u8-mbtouc \
97         unistr/u8-mbtoucr \
98         unistr/u8-strlen \
99         unistr/u8-strmbtouc \
100         unistr/u8-strncat \
101         unistr/u8-uctomb \
102         uniwidth/u8-strwidth \
103         unitypes \
104         unlocked-io \
105         vasprintf-posix \
106         version-etc \
107         version-etc-fsf \
108         vfprintf-posix \
109         vprintf-posix \
110         vsnprintf \
111         vsnprintf-posix \
112         vsprintf-posix \
113         xalloc \
114         xalloc-die \
115         xmalloca \
116         xmemdup0 \
117         xsize \
118         xstrndup \
119         xvasprintf
120
121 APP_ICONS = \
122 src/ui/gui/icons/apps/32x32/pspp.png \
123 src/ui/gui/icons/apps/22x22/pspp.png \
124 src/ui/gui/icons/apps/24x24/pspp.png \
125 src/ui/gui/icons/apps/256x256/pspp.png \
126 src/ui/gui/icons/apps/16x16/pspp.png \
127 src/ui/gui/icons/apps/48x48/pspp.png
128
129
130 MIMETYPE_ICONS = \
131 src/ui/gui/icons/mimetypes/32x32/application-x-spss-por.png \
132 src/ui/gui/icons/mimetypes/32x32/application-x-spss-sav.png \
133 src/ui/gui/icons/mimetypes/32x32/application-x-spss-sps.png \
134 src/ui/gui/icons/mimetypes/22x22/application-x-spss-por.png \
135 src/ui/gui/icons/mimetypes/22x22/application-x-spss-sav.png \
136 src/ui/gui/icons/mimetypes/22x22/application-x-spss-sps.png \
137 src/ui/gui/icons/mimetypes/24x24/application-x-spss-por.png \
138 src/ui/gui/icons/mimetypes/24x24/application-x-spss-sav.png \
139 src/ui/gui/icons/mimetypes/24x24/application-x-spss-sps.png \
140 src/ui/gui/icons/mimetypes/256x256/application-x-spss-por.png \
141 src/ui/gui/icons/mimetypes/256x256/application-x-spss-sav.png \
142 src/ui/gui/icons/mimetypes/256x256/application-x-spss-sps.png \
143 src/ui/gui/icons/mimetypes/16x16/application-x-spss-por.png \
144 src/ui/gui/icons/mimetypes/16x16/application-x-spss-sav.png \
145 src/ui/gui/icons/mimetypes/16x16/application-x-spss-sps.png \
146 src/ui/gui/icons/mimetypes/48x48/application-x-spss-por.png \
147 src/ui/gui/icons/mimetypes/48x48/application-x-spss-sav.png \
148 src/ui/gui/icons/mimetypes/48x48/application-x-spss-sps.png \
149
150 MISC_ICONS = src/ui/gui/icons/splash.png
151
152
153 ICONS=$(MIMETYPE_ICONS) $(APP_ICONS) $(MISC_ICONS)
154
155
156 all: prep_ph  icons
157         $(MAKE) -f Smake Makefile.in configure
158
159 icons: $(ICONS)
160
161 src/ui/gui/icons/manifest:
162         $(RM) $@
163         printf '# This is a generated file. Do not edit.\n' >> $@
164         printf 'icons =' >> $@
165         for i in  $(ICONS); do \
166           printf ' \\\n\t '$$i >> $@; \
167         done
168         echo >> $@
169         echo >> $@
170         printf 'icon_srcs = ' >> $@
171         for i in  $(ICONS); do \
172           printf ' \\\n\t '$$i | sed -e 's/\.png$$/.svg/' -e 's%/icons/%/artwork/%' >> $@ ; \
173         done
174         echo ' ' >> $@
175         echo >> $@
176
177 .PHONY: prep_ph
178 prep_ph: 
179         test -e ChangeLog || touch ChangeLog
180         test -d m4 || mkdir m4
181         touch m4/Makefile.am
182         $(GNULIB_TOOL) --add-import --no-changelog --m4-base=gl/m4 \
183                 --source-base=gl --lib=libgl --tests-base=tests \
184                 --doc-base=gl/doc --aux-dir=build-aux  \
185                 --libtool $(GNULIB_MODULES)
186         if (glibtoolize --version) >/dev/null 2>&1; then        \
187                 LIBTOOLIZE=glibtoolize;                         \
188         elif (libtoolize --version) >/dev/null 2>&1; then       \
189                 LIBTOOLIZE=libtoolize;                          \
190         else                                                    \
191                 echo >&2 "libtoolize not found";                \
192                 exit 1;                                         \
193         fi;                                                     \
194         $$LIBTOOLIZE --force --automake
195
196 aclocal.m4:
197         aclocal -I m4 -I gl/m4
198
199 configure: configure.ac aclocal.m4
200         autoconf
201
202 config.h.in: configure.ac
203         autoheader
204
205 Makefile.in: Makefile.am config.h.in aclocal.m4 src/ui/gui/icons/manifest
206         automake --add-missing --copy --no-force --include-deps
207
208
209 gettextize:
210         test -d m4 || mkdir m4
211         touch m4/Makefile.am
212         gettextize --force --no-changelog
213
214 check: all
215         rm -rf _check
216         mkdir _check
217         cd _check && ../configure $(CONFIGUREFLAGS)
218         cd _check && make distcheck
219         rm -rf _check
220
221 _build: all
222         test -d _build || mkdir _build
223         cd _build && ../configure $(CONFIGUREFLAGS)
224
225 _debug: all
226         test -d _debug || mkdir _debug
227         cd _debug && ../configure $(CONFIGUREFLAGS) --enable-debug
228
229
230
231 PO_FILES = po/ChangeLog \
232 po/Rules-quot po/boldquot.sed           \
233 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
234 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
235 po/Makevars.template po/pspp.pot
236
237 clean:
238         rm -f config.sub config.guess config.rpath
239         rm -fr autom4te.cache
240         rm -f aclocal.m4
241         rm -f missing mkinstalldirs
242         rm -f install-sh
243         rm -f configure Makefile 
244         rm -f depcomp
245         rm -rf intl gl
246         rm -f m4/*.m4
247         rm -f $(PO_FILES) po/*.gmo 
248         rm -f mdate-sh texinfo.tex
249         rm -f doc/stamp-vti
250         rm -f config.h.in~
251         rm -f config.h.in
252         find . -name Makefile.in -exec rm -f {} \; 
253         rm -f compile
254         rm -f ltmain.sh
255         rm -f reloc-ldflags install-reloc
256
257 .PHONY: all gettextize clean
258
259 src/ui/gui/icons/%.png: src/ui/gui/artwork/%.svg src/ui/gui/icons/COPYING_CCBYSA3
260         mkdir -p $(dir $@)
261         gimp -i -b '(let* ((image  (car  (gimp-file-load 1  "$<"  "$<"))))  (gimp-image-attach-parasite image (list "gimp-comment" 0 "$(shell cat $(lastword $^))" ))  (gimp-file-save 1 image (car  (gimp-image-get-active-drawable image)) "$@" "$@")) (gimp-quit 1)'
262