X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=Smake;h=91b4230f5cc2b040165449d769e8ef3fd4e5c17c;hb=2331dc47df5d45733218e418163f7f5ae99a6324;hp=3991dd4c03b584965891d03fcf5e3efa6ac86aed;hpb=76dbb1be016ad9b0d22d43d08414c293807c5a0a;p=pspp
diff --git a/Smake b/Smake
index 3991dd4c03..91b4230f5c 100644
--- a/Smake
+++ b/Smake
@@ -1,5 +1,25 @@
# -*- makefile -*-
+# PSPP - a program for statistical analysis.
+# Copyright (C) 2017 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+
+all: everything
+
# Adjust these to reflect where you've installed gnulib.
GNULIB = ../gnulib
GNULIB_TOOL = $(GNULIB)/gnulib-tool
@@ -19,7 +39,7 @@ GNULIB_MODULES = \
count-one-bits \
crc \
crypto/md4 \
- crypto/md5 \
+ crypto/rijndael \
dirname \
dtoastr \
environ \
@@ -33,6 +53,7 @@ GNULIB_MODULES = \
ftello \
fwriteerror \
getline \
+ getpass \
gettext \
gettimeofday \
getopt-gnu \
@@ -75,10 +96,12 @@ GNULIB_MODULES = \
stpcpy \
strerror \
strftime \
+ strsep \
strtod \
strtok_r \
sys_stat \
tempname \
+ termios \
trunc \
unicase/u8-casecmp \
unicase/u8-casefold \
@@ -118,53 +141,226 @@ GNULIB_MODULES = \
xstrndup \
xvasprintf
+APP_ICONS = \
+src/ui/gui/icons/32x32/apps/pspp.png \
+src/ui/gui/icons/22x22/apps/pspp.png \
+src/ui/gui/icons/24x24/apps/pspp.png \
+src/ui/gui/icons/16x16/apps/pspp.png \
+src/ui/gui/icons/48x48/apps/pspp.png \
+src/ui/gui/icons/256x256/apps/pspp.png \
+src/ui/gui/icons/scalable/apps/pspp.svg
+CATEGORY_ICONS = \
+src/ui/gui/icons/16x16/categories/align-left.png \
+src/ui/gui/icons/16x16/categories/align-center.png \
+src/ui/gui/icons/16x16/categories/align-right.png \
+src/ui/gui/icons/16x16/categories/measure-scale.png \
+src/ui/gui/icons/16x16/categories/measure-ordinal.png \
+src/ui/gui/icons/16x16/categories/measure-nominal.png \
+src/ui/gui/icons/16x16/categories/measure-date-scale.png \
+src/ui/gui/icons/16x16/categories/measure-date-nominal.png \
+src/ui/gui/icons/16x16/categories/measure-date-ordinal.png \
+src/ui/gui/icons/16x16/categories/measure-time-scale.png \
+src/ui/gui/icons/16x16/categories/measure-time-nominal.png \
+src/ui/gui/icons/16x16/categories/measure-time-ordinal.png \
+src/ui/gui/icons/16x16/categories/measure-string-nominal.png \
+src/ui/gui/icons/16x16/categories/measure-string-ordinal.png \
+src/ui/gui/icons/16x16/categories/measure-currency-scale.png \
+src/ui/gui/icons/16x16/categories/measure-currency-nominal.png \
+src/ui/gui/icons/16x16/categories/measure-currency-ordinal.png \
+src/ui/gui/icons/16x16/categories/role-input.png \
+src/ui/gui/icons/16x16/categories/role-target.png \
+src/ui/gui/icons/16x16/categories/role-both.png \
+src/ui/gui/icons/16x16/categories/role-none.png \
+src/ui/gui/icons/16x16/categories/role-partition.png \
+src/ui/gui/icons/16x16/categories/role-split.png
MIMETYPE_ICONS = \
-src/ui/gui/icons/mimetypes/32x32/application-x-spss-por.png \
-src/ui/gui/icons/mimetypes/32x32/application-x-spss-sav.png \
-src/ui/gui/icons/mimetypes/32x32/application-x-spss-sps.png \
-src/ui/gui/icons/mimetypes/22x22/application-x-spss-por.png \
-src/ui/gui/icons/mimetypes/22x22/application-x-spss-sav.png \
-src/ui/gui/icons/mimetypes/22x22/application-x-spss-sps.png \
-src/ui/gui/icons/mimetypes/24x24/application-x-spss-por.png \
-src/ui/gui/icons/mimetypes/24x24/application-x-spss-sav.png \
-src/ui/gui/icons/mimetypes/24x24/application-x-spss-sps.png \
-src/ui/gui/icons/mimetypes/256x256/application-x-spss-por.png \
-src/ui/gui/icons/mimetypes/256x256/application-x-spss-sav.png \
-src/ui/gui/icons/mimetypes/256x256/application-x-spss-sps.png \
-src/ui/gui/icons/mimetypes/16x16/application-x-spss-por.png \
-src/ui/gui/icons/mimetypes/16x16/application-x-spss-sav.png \
-src/ui/gui/icons/mimetypes/16x16/application-x-spss-sps.png \
-src/ui/gui/icons/mimetypes/48x48/application-x-spss-por.png \
-src/ui/gui/icons/mimetypes/48x48/application-x-spss-sav.png \
-src/ui/gui/icons/mimetypes/48x48/application-x-spss-sps.png \
-
-
-ICONS=$(MIMETYPE_ICONS)
-
-
-all: prep_ph icons
+src/ui/gui/icons/32x32/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/32x32/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/32x32/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/32x32/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/22x22/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/22x22/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/22x22/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/22x22/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/24x24/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/24x24/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/24x24/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/24x24/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/256x256/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/256x256/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/256x256/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/256x256/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/16x16/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/16x16/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/16x16/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/16x16/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/48x48/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/48x48/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/48x48/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/48x48/mimetypes/application-x-spss-zsav.png
+
+
+src/ui/gui/artwork/splash-t.svg: src/ui/gui/artwork/splash.svg
+ cp $< $@
+
+src/ui/gui/artwork/splash-r.svg: src/ui/gui/artwork/splash.svg
+ sed -e '/inkscape:label="Overlay"/s/inline/none/' $< > $@
+
+
+MISC_ICONS = src/ui/gui/icons/splash-t.png \
+ src/ui/gui/icons/splash-r.png
+
+
+ACTION_ICONS = \
+src/ui/gui/icons/32x32/actions/data-split-file.png \
+src/ui/gui/icons/32x32/actions/data-select-cases.png \
+src/ui/gui/icons/32x32/actions/data-weight-cases.png \
+src/ui/gui/icons/32x32/actions/transform-compute.png \
+src/ui/gui/icons/32x32/actions/edit-find.png \
+src/ui/gui/icons/32x32/actions/edit-go-to-case.png \
+src/ui/gui/icons/32x32/actions/edit-go-to-variable.png \
+src/ui/gui/icons/32x32/actions/edit-insert-case.png \
+src/ui/gui/icons/32x32/actions/edit-insert-variable.png \
+src/ui/gui/icons/32x32/actions/edit-cut.png \
+src/ui/gui/icons/32x32/actions/edit-copy.png \
+src/ui/gui/icons/32x32/actions/edit-paste.png \
+src/ui/gui/icons/32x32/actions/edit-undo.png \
+src/ui/gui/icons/32x32/actions/edit-redo.png \
+src/ui/gui/icons/32x32/actions/edit-select-all.png \
+src/ui/gui/icons/32x32/actions/file-open-data.png \
+src/ui/gui/icons/32x32/actions/file-save-data.png \
+src/ui/gui/icons/32x32/actions/file-export-data.png \
+src/ui/gui/icons/32x32/actions/file-print.png \
+src/ui/gui/icons/32x32/actions/view-value-labels.png \
+src/ui/gui/icons/32x32/actions/utilities-variables.png \
+src/ui/gui/icons/32x32/actions/run-all.png \
+src/ui/gui/icons/24x24/actions/data-split-file.png \
+src/ui/gui/icons/24x24/actions/data-select-cases.png \
+src/ui/gui/icons/24x24/actions/data-weight-cases.png \
+src/ui/gui/icons/24x24/actions/transform-compute.png \
+src/ui/gui/icons/24x24/actions/edit-find.png \
+src/ui/gui/icons/24x24/actions/edit-go-to-case.png \
+src/ui/gui/icons/24x24/actions/edit-go-to-variable.png \
+src/ui/gui/icons/24x24/actions/edit-insert-case.png \
+src/ui/gui/icons/24x24/actions/edit-insert-variable.png \
+src/ui/gui/icons/24x24/actions/edit-cut.png \
+src/ui/gui/icons/24x24/actions/edit-copy.png \
+src/ui/gui/icons/24x24/actions/edit-paste.png \
+src/ui/gui/icons/24x24/actions/edit-undo.png \
+src/ui/gui/icons/24x24/actions/edit-redo.png \
+src/ui/gui/icons/24x24/actions/edit-select-all.png \
+src/ui/gui/icons/24x24/actions/file-open-data.png \
+src/ui/gui/icons/24x24/actions/file-save-data.png \
+src/ui/gui/icons/24x24/actions/file-export-data.png \
+src/ui/gui/icons/24x24/actions/file-print.png \
+src/ui/gui/icons/24x24/actions/view-value-labels.png \
+src/ui/gui/icons/24x24/actions/utilities-variables.png \
+src/ui/gui/icons/24x24/actions/run-all.png \
+src/ui/gui/icons/16x16/actions/file-new-data.png \
+src/ui/gui/icons/16x16/actions/file-syntax-data.png \
+src/ui/gui/icons/16x16/actions/file-system-data.png \
+src/ui/gui/icons/16x16/actions/file-open-data.png \
+src/ui/gui/icons/16x16/actions/file-import-data.png \
+src/ui/gui/icons/16x16/actions/file-export-data.png \
+src/ui/gui/icons/16x16/actions/file-save-data.png \
+src/ui/gui/icons/16x16/actions/file-save-as.png \
+src/ui/gui/icons/16x16/actions/file-print.png \
+src/ui/gui/icons/16x16/actions/file-rename-data-set.png \
+src/ui/gui/icons/16x16/actions/file-display-information.png \
+src/ui/gui/icons/16x16/actions/display-information-working-file.png \
+src/ui/gui/icons/16x16/actions/display-information-external-file.png \
+src/ui/gui/icons/16x16/actions/file-recently-used.png \
+src/ui/gui/icons/16x16/actions/file-quit.png \
+src/ui/gui/icons/16x16/actions/file-display-information.png \
+src/ui/gui/icons/16x16/actions/edit-insert-variable.png \
+src/ui/gui/icons/16x16/actions/edit-insert-case.png \
+src/ui/gui/icons/16x16/actions/edit-go-to-variable.png \
+src/ui/gui/icons/16x16/actions/edit-go-to-case.png \
+src/ui/gui/icons/16x16/actions/edit-cut.png \
+src/ui/gui/icons/16x16/actions/edit-copy.png \
+src/ui/gui/icons/16x16/actions/edit-paste.png \
+src/ui/gui/icons/16x16/actions/edit-delete.png \
+src/ui/gui/icons/16x16/actions/edit-undo.png \
+src/ui/gui/icons/16x16/actions/edit-redo.png \
+src/ui/gui/icons/16x16/actions/edit-select-all.png \
+src/ui/gui/icons/16x16/actions/edit-clear.png \
+src/ui/gui/icons/16x16/actions/edit-find.png \
+src/ui/gui/icons/16x16/actions/view-font.png \
+src/ui/gui/icons/16x16/actions/view-value-labels.png \
+src/ui/gui/icons/16x16/actions/data-sort-cases.png \
+src/ui/gui/icons/16x16/actions/data-transpose.png \
+src/ui/gui/icons/16x16/actions/data-aggregate.png \
+src/ui/gui/icons/16x16/actions/data-split-file.png \
+src/ui/gui/icons/16x16/actions/data-select-cases.png \
+src/ui/gui/icons/16x16/actions/data-weight-cases.png \
+src/ui/gui/icons/16x16/actions/run-all.png \
+src/ui/gui/icons/16x16/actions/run-selection.png \
+src/ui/gui/icons/16x16/actions/run-current-line.png \
+src/ui/gui/icons/16x16/actions/run-to-end.png \
+src/ui/gui/icons/16x16/actions/transform-compute.png \
+src/ui/gui/icons/16x16/actions/transform-count.png \
+src/ui/gui/icons/16x16/actions/transform-rank-cases.png \
+src/ui/gui/icons/16x16/actions/transform-automatic-recode.png \
+src/ui/gui/icons/16x16/actions/transform-in-to-same-variables.png \
+src/ui/gui/icons/16x16/actions/transform-in-to-different-variables.png \
+src/ui/gui/icons/16x16/actions/transform-run-pending.png \
+src/ui/gui/icons/16x16/actions/analyze-descriptive-statistics.png \
+src/ui/gui/icons/16x16/actions/analyze-compare-means.png \
+src/ui/gui/icons/16x16/actions/analyze-univariate-analysis.png \
+src/ui/gui/icons/16x16/actions/analyze-bivariate-correlation.png \
+src/ui/gui/icons/16x16/actions/analyze-kmeans-cluster.png \
+src/ui/gui/icons/16x16/actions/analyze-factor-analysis.png \
+src/ui/gui/icons/16x16/actions/analyze-reliability.png \
+src/ui/gui/icons/16x16/actions/analyze-regression.png \
+src/ui/gui/icons/16x16/actions/analyze-non-parametric-statistics.png \
+src/ui/gui/icons/16x16/actions/analyze-roc-curve.png \
+src/ui/gui/icons/16x16/actions/utilities-variables.png \
+src/ui/gui/icons/16x16/actions/utilities-data-file-comments.png \
+src/ui/gui/icons/16x16/actions/windows-minimize-all.png \
+src/ui/gui/icons/16x16/actions/windows-split.png \
+src/ui/gui/icons/16x16/actions/help-reference-manual.png \
+src/ui/gui/icons/16x16/actions/help-about.png
+
+
+ICONS=$(CATEGORY_ICONS) $(ACTION_ICONS) $(MIMETYPE_ICONS) $(APP_ICONS) $(MISC_ICONS)
+
+everything: prep_ph icons
$(MAKE) -f Smake Makefile.in configure
icons: $(ICONS)
-src/ui/gui/icons/manifest:
+src/ui/gui/icons/manifest: $(MAKEFILE_LIST)
$(RM) $@
printf '# This is a generated file. Do not edit.\n' >> $@
printf 'icons =' >> $@
for i in $(ICONS); do \
- printf ' \\\n\t '$$i >> $@; \
+ printf ' \\\n\t '$$i >> $@; \
done
echo >> $@
echo >> $@
printf 'icon_srcs = ' >> $@
for i in $(ICONS); do \
- printf ' \\\n\t '$$i | sed -e 's/\.png$$/.svg/' -e 's%/icons/%/artwork/%' >> $@ ; \
+ printf ' \\\n\t ' >> $@ ;\
+ printf $$i | awk '{ gsub(".png",".svg")gsub("icons","artwork");printf $$0}' >> $@ ; \
done
echo ' ' >> $@
echo >> $@
+
+src/ui/gui/resources.xml: $(ICONS)
+ printf '\n' > $@
+ printf '\n' >> $@
+ printf ' \n' >> $@
+ for x in $^; do \
+ z=`echo "$$x" | sed -e 's%src/ui/gui/%%'` ; \
+ printf " $$z\n" >> $@ ; \
+ done
+ printf ' \n' >> $@
+ printf '\n' >> $@
+
+
.PHONY: prep_ph
prep_ph:
test -e ChangeLog || touch ChangeLog
@@ -182,18 +378,18 @@ prep_ph:
echo >&2 "libtoolize not found"; \
exit 1; \
fi; \
- $$LIBTOOLIZE --force --automake
+ $$LIBTOOLIZE --force --automake --copy
aclocal.m4:
aclocal -I m4 -I gl/m4
configure: configure.ac aclocal.m4
- autoconf
+ autoconf || rm $@ # autoconf 2.69 has (what I think is) a bug. It will create configure even when failure is detected.
config.h.in: configure.ac
autoheader
-Makefile.in: Makefile.am config.h.in aclocal.m4 src/ui/gui/icons/manifest
+Makefile.in: Makefile.am config.h.in aclocal.m4 src/ui/gui/resources.xml src/ui/gui/icons/manifest
automake --add-missing --copy --no-force --include-deps
@@ -219,8 +415,7 @@ _debug: all
-PO_FILES = po/ChangeLog \
-po/Rules-quot po/boldquot.sed \
+PO_FILES = po/Rules-quot po/boldquot.sed \
po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header \
po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po \
po/Makevars.template po/pspp.pot
@@ -240,14 +435,26 @@ clean:
rm -f doc/stamp-vti
rm -f config.h.in~
rm -f config.h.in
- find . -name Makefile.in -exec rm -f {} \;
+ rm -f gl/Makefile.in
+ rm -f Makefile.in
rm -f compile
rm -f ltmain.sh
rm -f reloc-ldflags install-reloc
.PHONY: all gettextize clean
-src/ui/gui/icons/%.png: src/ui/gui/artwork/%.svg src/ui/gui/icons/COPYING_CCBYSA3
+
+# The "convert" program from imagemagick can be used to create png from svg but doesn't properly deal
+# with the alpha channels. Therefore, it is not recommended for production pspp builds, but might
+# be useful to get something working on a platform which doesn't have a working gimp.
+
+#svg2png=convert -background transparent $1 $3
+
+src/ui/gui/icons/%.png: src/ui/gui/artwork/%.svg build-aux/svg2png src/ui/gui/icons/COPYING_CCBYSA3
mkdir -p $(dir $@)
- 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)'
+ build-aux/svg2png "$<" "$(lastword $^)" "$@"
+
+src/ui/gui/icons/%.svg: src/ui/gui/artwork/%.svg
+ mkdir -p $(dir $@)
+ cp $< $@