Autorecode Dialog: Use correct dictionary pointer
[pspp] / src / ui / gui / automake.mk
index 4eeffe9e2c56c3d174a6582439b7227a0015d146..b49423110fcdf6352b36ad85a91a256fa0c17674 100644 (file)
@@ -1,19 +1,19 @@
 # PSPP - a program for statistical analysis.
-# Copyright (C) 2017 Free Software Foundation, Inc.
-# 
+# Copyright (C) 2017, 2020 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 <http://www.gnu.org/licenses/>.
-# 
+#
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
 UI_FILES = \
@@ -81,7 +81,8 @@ EXTRA_DIST += doc/help-pages-list
 
 EXTRA_DIST += \
        src/ui/gui/memorandum.txt \
-       src/ui/gui/gen-dot-desktop.sh \
+       src/ui/gui/org.fsf.pspp.metainfo.xml.in \
+       src/ui/gui/org.fsf.pspp.desktop.in \
        src/ui/gui/marshaller-list \
        src/ui/gui/pspplogo.svg
 
@@ -376,10 +377,15 @@ PHONY += yelp-check
 
 AM_CPPFLAGS += -Isrc
 
-src/ui/gui/pspp.desktop: src/ui/gui/gen-dot-desktop.sh $(POFILES)
-       $(AM_V_GEN)POFILES="$(POFILES)" top_builddir="$(top_builddir)" $(SHELL) $< > $@
+src/ui/gui/org.fsf.pspp.metainfo.xml: src/ui/gui/org.fsf.pspp.metainfo.xml.in $(POFILES)
+       $(AM_V_GEN)$(MSGFMT) --xml --template $< -o $@ -d $(top_srcdir)/po || \
+         $(MSGFMT) -L appdata --xml --template $< -o $@ -d $(top_srcdir)/po
 
-CLEANFILES+=src/ui/gui/pspp.desktop
+src/ui/gui/org.fsf.pspp.desktop: src/ui/gui/org.fsf.pspp.desktop.in $(POFILES)
+       $(AM_V_GEN)$(MSGFMT) --desktop --template $< -o $@ -d $(top_srcdir)/po
+
+CLEANFILES+=src/ui/gui/org.fsf.pspp.desktop \
+            src/ui/gui/org.fsf.pspp.metainfo.xml
 
 src/ui/gui/resources.c: src/ui/gui/resources.xml
        $(AM_V_at)$(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/src/ui/gui --generate-source $< --target=$@,out
@@ -395,11 +401,15 @@ src/ui/gui/psppire-marshal.c: src/ui/gui/marshaller-list
 src/ui/gui/psppire-marshal.h: src/ui/gui/marshaller-list
        $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=psppire_marshal $? > $@
 
+mimedir = $(datadir)/mime/packages
+mime_DATA = src/ui/gui/pspp.xml
+EXTRA_DIST += src/ui/gui/pspp.xml
+
 desktopdir = $(datadir)/applications
-desktop_DATA = src/ui/gui/pspp.desktop
+desktop_DATA = src/ui/gui/org.fsf.pspp.desktop
 
 appdatadir = $(datadir)/metainfo
-dist_appdata_DATA = src/ui/gui/pspp.appdata.xml
+dist_appdata_DATA = src/ui/gui/org.fsf.pspp.metainfo.xml
 
 BUILT_SOURCES += src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h src/ui/gui/resources.c
 
@@ -419,10 +429,10 @@ src/ui/gui/include/gtk/gtk.h: src/ui/gui/include/gtk/gtk.in.h
        @$(MKDIR_P) src/ui/gui/include/gtk
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         $(SED) -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-             -e 's|@''NEXT_GTK_GTK_H''@|$(NEXT_GTK_GTK_H)|g' \
+         $(SED) -e 's|%''INCLUDE_NEXT''%|$(INCLUDE_NEXT)|g' \
+             -e 's|%''PRAGMA_SYSTEM_HEADER''%|$(PRAGMA_SYSTEM_HEADER)|g' \
+             -e 's|%''PRAGMA_COLUMNS''%|$(PRAGMA_COLUMNS)|g' \
+             -e 's|%''NEXT_GTK_GTK_H''%|$(NEXT_GTK_GTK_H)|g' \
              < $(srcdir)/src/ui/gui/include/gtk/gtk.in.h; \
        } > $@-t && \
        mv $@-t $@