From bf0172b7e6391aa1345a0e8add0b622d08e0053b Mon Sep 17 00:00:00 2001 From: Louie S Date: Sun, 26 Feb 2023 22:13:31 -0800 Subject: Added rule for generating desktop entry --- data/Makefile.am | 14 ++++++++++++++ data/Makefile.in | 30 +++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 5 deletions(-) (limited to 'data') diff --git a/data/Makefile.am b/data/Makefile.am index adb970f..e6fb158 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1 +1,15 @@ EXTRA_DIST = icon.ico icon.svg + +# Build a .desktop entry +BUILT_SOURCES = $(PACKAGE_NAME).desktop +CLEANFILES = $(PACKAGE_NAME).desktop +$(PACKAGE_NAME).desktop: Makefile + echo "[Desktop Entry]" > $@ + echo "Type=Application" >> $@ + echo "Name=$(PACKAGE_NAME)" >> $@ + echo "Comment=Terminal Media Launcher" >> $@ + echo "Path=$(bindir)/$(PACKAGE_NAME)$(EXEEXT)" >> $@ + echo "Exec=$(PACKAGE_NAME)$(EXEEXT)" >> $@ + echo "Icon=$(PACKAGE_NAME)" >> $@ + echo "Terminal=true" >> $@ + echo "Categories=Utility" >> $@ diff --git a/data/Makefile.in b/data/Makefile.in index 9b34865..dbd0a88 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -220,7 +220,12 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = icon.ico icon.svg -all: all-am + +# Build a .desktop entry +BUILT_SOURCES = $(PACKAGE_NAME).desktop +CLEANFILES = $(PACKAGE_NAME).desktop +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -293,11 +298,14 @@ distdir-am: $(DISTFILES) fi; \ done check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile installdirs: -install: install-am -install-exec: install-exec-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -318,6 +326,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -326,6 +335,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic mostlyclean-am @@ -392,7 +402,7 @@ ps-am: uninstall-am: -.MAKE: install-am install-strip +.MAKE: all check install install-am install-exec install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ @@ -407,6 +417,16 @@ uninstall-am: .PRECIOUS: Makefile +$(PACKAGE_NAME).desktop: Makefile + echo "[Desktop Entry]" > $@ + echo "Type=Application" >> $@ + echo "Name=$(PACKAGE_NAME)" >> $@ + echo "Comment=Terminal Media Launcher" >> $@ + echo "Path=$(bindir)/$(PACKAGE_NAME)$(EXEEXT)" >> $@ + echo "Exec=$(PACKAGE_NAME)$(EXEEXT)" >> $@ + echo "Icon=$(PACKAGE_NAME)" >> $@ + echo "Terminal=true" >> $@ + echo "Categories=Utility" >> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. -- cgit