Makefile: Support `chapters-only' playlists.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 16 Mar 2022 16:46:18 +0000 (16:46 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 16 Mar 2022 16:49:30 +0000 (16:49 +0000)
Makefile

index b5494b9..ab3a750 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,8 @@ $1_MKM3UFLAGS          =
 endef
 
 define %declare-chapter-playlist
-$1-chap_EPLS            = $1.epls
-$1-chap_MKM3UFLAGS      = -c
+$1_EPLS                         = $2.epls
+$1_MKM3UFLAGS           = -c
 endef
 
 define %declare-filter-playlist
@@ -41,11 +41,14 @@ endef
 declare-playlist        = \
        $(eval $(call %declare-playlist,$1,$2)) \
        $(eval $(call %declare-simple-playlist,$1))
+declare-chapters-only   = \
+       $(eval $(call %declare-playlist,$1,$2)) \
+       $(eval $(call %declare-chapter-playlist,$1,$1))
 declare-chapters        = \
        $(eval $(call %declare-playlist,$1,$2)) \
        $(eval $(call %declare-simple-playlist,$1)) \
        $(eval $(call %declare-playlist,$1-chap,$2 (chapters))) \
-       $(eval $(call %declare-chapter-playlist,$1))
+       $(eval $(call %declare-chapter-playlist,$1-chap,$1))
 declare-filter          = \
        $(eval $(call %declare-playlist,$1,$4)) \
        $(eval $(call %declare-filter-playlist,$1,$2,$3))