From aacff646494416c7a73ea3352c6af3d58946bcbc Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 3 Aug 2024 08:49:26 +0200 Subject: Makefile: Factorize file names --- Makefile.am | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2f49fb8..1e66f95 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,30 +1,34 @@ DISTCHECK_CONFIGURE_FLAGS = --with-udevdir='$${libdir}/udev-distcheck' +UDEV_RULES = 40-usb-media-players.rules +HWDB_NAME = 20-usb-media-players.hwdb +METAINFO = org.freedesktop.media_player_info.metainfo.xml + mpidir = $(datadir)/media-player-info dist_mpi_DATA = $(shell find $(top_srcdir)/media-players -name "*.mpi" -printf "%p\n" | LC_ALL=C sort) udevrulesdir = $(UDEV_DIR)/rules.d -nodist_udevrules_DATA = 40-usb-media-players.rules +nodist_udevrules_DATA = $(UDEV_RULES) -40-usb-media-players.rules: $(dist_mpi_DATA) $(top_srcdir)/tools/mpi2udev.py - $(PYTHON) $(top_srcdir)/tools/mpi2udev.py $(dist_mpi_DATA) > 40-usb-media-players.rules - $(PYTHON) $(top_srcdir)/tools/udev-syntax-check.py 40-usb-media-players.rules +$(UDEV_RULES): $(dist_mpi_DATA) $(top_srcdir)/tools/mpi2udev.py + $(PYTHON) $(top_srcdir)/tools/mpi2udev.py $(dist_mpi_DATA) > $@ + $(PYTHON) $(top_srcdir)/tools/udev-syntax-check.py $@ udevhwdbdir = $(UDEV_DIR)/hwdb.d -nodist_udevhwdb_DATA = 20-usb-media-players.hwdb +nodist_udevhwdb_DATA = $(HWDB_NAME) -20-usb-media-players.hwdb: $(dist_mpi_DATA) $(top_srcdir)/tools/mpi2hwdb.py - $(PYTHON) $(top_srcdir)/tools/mpi2hwdb.py $(dist_mpi_DATA) > 20-usb-media-players.hwdb +$(HWDB_NAME): $(dist_mpi_DATA) $(top_srcdir)/tools/mpi2hwdb.py + $(PYTHON) $(top_srcdir)/tools/mpi2hwdb.py $(dist_mpi_DATA) > $@ -org.freedesktop.media_player_info.metainfo.xml: $(top_srcdir)/tools/mpi2appstream.py - $(PYTHON) $(top_srcdir)/tools/mpi2appstream.py $(dist_mpi_DATA) > org.freedesktop.media_player_info.metainfo.xml +$(METAINFO): $(top_srcdir)/tools/mpi2appstream.py + $(PYTHON) $(top_srcdir)/tools/mpi2appstream.py $(dist_mpi_DATA) > $@ metainfodir = $(datarootdir)/metainfo -nodist_metainfo_DATA = org.freedesktop.media_player_info.metainfo.xml +nodist_metainfo_DATA = $(METAINFO) clean-local: - rm -f 40-usb-media-players.rules 20-usb-media-players.hwdb org.freedesktop.media_player_info.metainfo.xml + rm -f $(UDEV_RULES) $(HWDB_NAME) $(METAINFO) EXTRA_DIST = \ tools/COPYING \ -- cgit v1.2.3