mkm3u, Makefile: Make `dump' files from the playlists.
[epls] / Makefile
index 2f845ce..09537a7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -186,7 +186,7 @@ $(call declare-playlist, yes-minister, Y/Yes Minister)
 $(call declare-playlist, the-young-ones, Y/The Young Ones)
 
 M3US                    = $(addsuffix .m3u8,$(PLAYLISTS))
-DEPFILES               += $(addsuffix .dep,$(PLAYLISTS))
+DEPFILES               += $(addsuffix .m3u-dep,$(PLAYLISTS))
 TARGETS                        += $(M3US)
 CLEANFILES             += $(DEPFILES)
 
@@ -200,7 +200,16 @@ mkm3u.cache-stamp:
 CLEANFILES             += *.m3u8.new
 $(M3US): %.m3u8: $$($$*_EPLS) mkm3u mkm3u.cache-stamp
        $(call v-tag,MKM3U)./mkm3u $(MKM3UFLAGS) $($*_MKM3UFLAGS) \
-               -M$*.dep -O$@ -o"$@.new" "$<" && mv "$@.new" "$@"
+               -M$*.m3u-dep -O$@ -o"$@.new" "$<" && mv "$@.new" "$@"
+
+PLS                     = $(sort $(foreach p,$(PLAYLISTS), \
+                               $($p_EPLS:.epls=.pl)))
+DEPFILES               += $(addsuffix -dep,$(PLS))
+TARGETS                        += $(PLS)
+CLEANFILES             += *.pl.new
+$(PLS): %.pl: %.epls mkm3u mkm3u.cache-stamp
+       $(call v-tag,MKPL)./mkm3u -D $(MKM3UFLAGS) $($*_MKM3UFLAGS) \
+               -M$*.pl-dep -O$@ -o"$@.new" "$<" && mv "$@.new" "$@"
 
 CHECKS                  = $(foreach p,$(PLAYLISTS), check/$p)
 check: $(CHECKS)