##
EXTRA_DIST = elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf \
libelf.pc.in libdw.pc.in libdebuginfod.pc.in \
- debuginfod.service debuginfod.sysconfig profile.sh.in profile.csh.in
+ debuginfod.service debuginfod.sysconfig \
+ profile.sh.in profile.csh.in profile.fish.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libelf.pc libdw.pc
install-data-local:
$(INSTALL_DATA) profile.sh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
$(INSTALL_DATA) profile.csh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
+ $(INSTALL_DATA) profile.fish -D $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish
mkdir -p $(DESTDIR)$(sysconfdir)/debuginfod
if [ -n "@DEBUGINFOD_URLS@" ]; then \
echo "@DEBUGINFOD_URLS@" > $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.urls; \
uninstall-local:
rm -f $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
rm -f $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
+ rm -f $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish
rm -f $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.urls
-rmdir $(DESTDIR)$(sysconfdir)/debuginfod
endif
--- /dev/null
+# $HOME/.profile* or similar files may first set $DEBUGINFOD_URLS.
+# If $DEBUGINFOD_URLS is not set there, we set it from system *.url files.
+# $HOME/.*rc or similar files may then amend $DEBUGINFOD_URLS.
+# See also [man debuginfod-client-config] for other environment variables
+# such as $DEBUGINFOD_MAXSIZE, $DEBUGINFOD_MAXTIME, $DEBUGINFOD_PROGRESS.
+
+if not set --query DEBUGINFOD_URLS
+ # Use local variables so we don't need to manually unset them
+ set --local prefix "@prefix@"
+ set --local DEBUGINFOD_URLS (cat /dev/null "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | string replace '\n' ' ')
+ if test -n "$DEBUGINFOD_URLS"
+ set --global --export DEBUGINFOD_URLS "$DEBUGINFOD_URLS"
+ end
+end
fi],
[default_debuginfod_urls=""])
AC_SUBST(DEBUGINFOD_URLS, $default_debuginfod_urls)
-AC_CONFIG_FILES([config/profile.sh config/profile.csh])
+AC_CONFIG_FILES([config/profile.sh config/profile.csh config/profile.fish])
AC_OUTPUT