Bug 627126 - gsettings schemas on FreeBSD

Rewrite the install rule for GSettings schemas to not depend on an
obscure chunk of non-portable sed that nobody understands the purpose
of.

Instead, use make's VPATH feature to resolve the paths of the files that
need to be installed.  No need to depend on the .valid targets here
since automake already ensures that 'make all' is complete before 'make
install' is permitted to run.
This commit is contained in:
Ryan Lortie 2010-10-04 01:51:11 -04:00
parent 8efcc0d8c8
commit 136e705e83

View File

@ -45,22 +45,10 @@ install-data-am: install-gsettings-schemas
.SECONDARY: $(gsettings_SCHEMAS) .SECONDARY: $(gsettings_SCHEMAS)
gsettings__base_list = \ install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
sed "$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g" | \
sed "$$!N;$$!N;$$!N;$$!N;s/\n/ /g"
install-gsettings-schemas: $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)" test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"
@list='\''$(gsettings__enum_file) $(gsettings_SCHEMAS)'\''; test -n "$(gsettingsschemadir)" || list=; \ $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(gsettings__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '\''$(DESTDIR)$(gsettingsschemadir)'\''"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(gsettingsschemadir)" || exit $$?; \
done
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
uninstall-gsettings-schemas: uninstall-gsettings-schemas: