summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2022-01-04 15:27:36 +0900
committerYuuki Harano <masm+github@masm11.me>2022-01-04 17:29:17 +0900
commit183936ee8e5bdf10e969b0d2cb661f81cf7950f9 (patch)
treeb30a22e4eb52e8e5b0a61d8de13a7cdc1a8eefc8 /Makefile.in
parent3eaf3aeec8a23dda8f9a170909bcc052c3d4ab78 (diff)
downloademacs-183936ee8e5bdf10e969b0d2cb661f81cf7950f9.tar.gz
Remove gsettings.m4 and write directly into Makefile.in
* configure.ac (HAVE_PGTK): Declare substitution (HAVE_GSETTINGS): Declare substitution * Makefile.in (HAVE_PGTK): New variable (HAVE_GSETTINGS): New variable (gsettingsschemadir): Don't use value from gsettings.m4 (distclean): Add clean-gsettings-schemas (install-gsettings-schemas): Implement instead of gsettings.m4 (uninstall-gsettings-schemas): Implement instead of gsettings.m4 (clean-gsettings-schemas): Implement instead of gsettings.m4 ($(gsettings_SCHEMAS:.xml=.valid)): Implement instead of gsettings.m4 * m4/gsettings.m4: Remove
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in34
1 files changed, 29 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 5bafe0f140f..b72127dde67 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -104,6 +104,9 @@ USE_STARTUP_NOTIFICATION = @USE_STARTUP_NOTIFICATION@
HAVE_BE_APP = @HAVE_BE_APP@
+HAVE_PGTK = @HAVE_PGTK@
+HAVE_GSETTINGS = @HAVE_GSETTINGS@
+
# ==================== Where To Install Things ====================
# Location to install Emacs.app under GNUstep / macOS.
@@ -213,7 +216,7 @@ icondir=$(datarootdir)/icons
iconsrcdir=$(srcdir)/etc/images/icons
# Where to install the gsettings schema file.
-gsettingsschemadir = @gsettingsschemadir@
+gsettingsschemadir = $(datadir)/glib-2.0/schemas
# ==================== Emacs-specific directories ====================
@@ -949,7 +952,7 @@ distclean_dirs = $(clean_dirs) leim lisp admin/grammars
$(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean)))
-distclean: $(distclean_dirs:=_distclean)
+distclean: $(distclean_dirs:=_distclean) clean-gsettings-schemas
${top_distclean}
### 'bootstrap-clean'
@@ -1245,9 +1248,30 @@ gitmerge:
-l ${srcdir}/admin/gitmerge.el \
--eval '(setq gitmerge-minimum-missing ${GITMERGE_NMIN})' -f gitmerge
-@GSETTINGS_RULES@
-
install-gsettings-schemas:
+ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes)
+ $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"
+ $(INSTALL_DATA) $(srcdir)/$(gsettings_SCHEMAS) "$(DESTDIR)$(gsettingsschemadir)"
+ if [ -z "$(DESTDIR)" ]; then $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); fi
+endif
+
uninstall-gsettings-schemas:
+ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes)
+ for x in $(gsettings_SCHEMAS); do \
+ xx=`echo $$x | sed -e 's|.*/||'`; \
+ rm -f "$(DESTDIR)$(gsettingsschemadir)/$${xx}"; \
+ done
+ if [ -z "$(DESTDIR)" ]; then $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); fi
+endif
+
clean-gsettings-schemas:
-$(gsettings_SCHEMAS:.xml=.valid):
+ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes)
+ rm -f $(gsettings_SCHEMAS:.xml=.valid)
+endif
+
+$(gsettings_SCHEMAS:.xml=.valid): $(srcdir)/$(gsettings_SCHEMAS)
+ifeq ($(HAVE_PGTK)$(HAVE_GSETTINGS),yesyes)
+ $(GLIB_COMPILE_SCHEMAS) --strict --dry-run --schema-file=$(srcdir)/$(gsettings_SCHEMAS)
+ $(MKDIR_P) $(@D)
+ touch $@
+endif