]> diplodocus.org Git - flac-archive/blobdiff - GNUmakefile
Stop extracting the DATE tag; we only need to treat ARTIST and ALBUM
[flac-archive] / GNUmakefile
index 256aa06baf7db9e72945324bbc315114acbb0262..0ae6f029dadc09d3b4cf5e80c9e0af0c74a5a0a1 100644 (file)
@@ -36,27 +36,37 @@ fa-flacd.1: fa-flacd
 clean:
        rm -f ${MAN}
 
-install: ${SCRIPTS} ${bindir} ${man1dir} ${cat1dir} ${SCRIPTS} ${MAN}
-       ${INSTALL_SCRIPT} ${SCRIPTS} ${bindir}
-       ${INSTALL_DATA} fa-flacd.1 ${man1dir}
-       ln -sf fa-flacd.1 ${man1dir}/fa-rip.1
-       ln -sf fa-flacd.1 ${man1dir}/fa-tags.1
-       ${INSTALL_DATA} fa-flacd.0 ${cat1dir}
-       ln -sf fa-flacd.0 ${cat1dir}/fa-rip.0
-       ln -sf fa-flacd.0 ${cat1dir}/fa-tags.0
-
-${bindir}:
+install: $(addprefix ${DESTDIR}${bindir}/, ${SCRIPTS})
+install: $(addprefix ${DESTDIR}${man1dir}/, $(addsuffix .1, ${SCRIPTS}))
+install: $(addprefix ${DESTDIR}${cat1dir}/, $(addsuffix .0, ${SCRIPTS}))
+
+${DESTDIR}${bindir}/%: % ${DESTDIR}${bindir}
+       ${INSTALL_SCRIPT} $< $@
+
+${DESTDIR}${man1dir}/%: % ${DESTDIR}${man1dir}
+       ${INSTALL_DATA} $< $@
+
+${DESTDIR}${cat1dir}/%: % ${DESTDIR}${cat1dir}
+       ${INSTALL_DATA} $< $@
+
+${DESTDIR}${man1dir}/fa-rip.1 ${DESTDIR}${man1dir}/fa-tags.1:
+       ln -sf fa-flacd.1 $@
+
+${DESTDIR}${cat1dir}/fa-rip.0 ${DESTDIR}${cat1dir}/fa-tags.0:
+       ln -sf fa-flacd.0 $@
+
+${DESTDIR}${bindir}:
        ${INSTALL_DIRECTORY} $@
 
-${man1dir}:
+${DESTDIR}${man1dir}:
        ${INSTALL_DIRECTORY} $@
 
-${cat1dir}:
+${DESTDIR}${cat1dir}:
        ${INSTALL_DIRECTORY} $@
 
 uninstall:
-       cd ${bindir} && rm -f ${SCRIPTS}
-       cd ${man1dir} && rm -f ${MAN} fa-rip.1 fa-tags.1
-       cd ${cat1dir} && rm -f ${MAN} fa-rip.0 fa-tags.0
+       rm -f $(addprefix ${DESTDIR}${bindir}/, ${SCRIPTS})
+       rm -f $(addprefix ${DESTDIR}${man1dir}/, $(addsuffix .1, ${SCRIPTS}))
+       rm -f $(addprefix ${DESTDIR}${cat1dir}/, $(addsuffix .0, ${SCRIPTS}))
 
 .PHONY: all clean install uninstall