changeset 22052:d90d335368b1

Replace ifeq structure in the install target by a set of dependent targets.
author diego
date Tue, 30 Jan 2007 11:00:54 +0000
parents 456d6d9dddce
children d0b456c672a9
files Makefile
diffstat 1 files changed, 22 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Jan 30 00:47:28 2007 +0000
+++ b/Makefile	Tue Jan 30 11:00:54 2007 +0000
@@ -249,15 +249,23 @@
 codecs2html$(EXESUF): mp_msg.o
 	$(CC) -DCODECS2HTML codec-cfg.c $^ -o $@
 
-install: $(ALL_PRG)
-ifeq ($(VIDIX),yes)
+INSTALL_TARGETS-$(MPLAYER)  += install-mplayer install-mplayer-man
+INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mplayer-man
+INSTALL_TARGETS-$(GUI)      += install-gui
+INSTALL_TARGETS-$(VIDIX)    += install-vidix
+INSTALL_TARGETS             += $(INSTALL_TARGETS-yes)
+
+install: install-dirs $(INSTALL_TARGETS)
+
+install-vidix:
 	$(MAKE) -C libdha install
 	mkdir -p $(LIBDIR)/mplayer/vidix
 	-install -m 755 $(INSTALLSTRIP) -p vidix/drivers/*.so $(LIBDIR)/mplayer/vidix
-endif
-	$(INSTALL) -d $(BINDIR)
+
+install-mplayer: mplayer$(EXESUF)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) mplayer$(EXESUF) $(BINDIR)
-	$(INSTALL) -d $(MANDIR)/man1
+
+install-mplayer-man:
 	for i in $(MAN_LANG); do \
 		if test "$$i" = en ; then \
 			$(INSTALL) -c -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/ ; \
@@ -266,7 +274,8 @@
 			$(INSTALL) -c -m 644 DOCS/man/$$i/mplayer.1 $(MANDIR)/$$i/man1/ ; \
 		fi ; \
 	done
-ifeq ($(MENCODER),yes)
+
+install-mencoder: mencoder$(EXESUF)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) mencoder$(EXESUF) $(BINDIR)
 	for i in $(MAN_LANG); do \
 		if test "$$i" = en ; then \
@@ -275,9 +284,8 @@
 			cd $(MANDIR)/$$i/man1 && ln -sf mplayer.1 mencoder.1 ; \
 		fi ; \
 	done
-endif
-	$(INSTALL) -d $(DATADIR)
-ifeq ($(GUI),yes)
+
+install-gui:
 	-ln -sf mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
 	$(INSTALL) -d $(DATADIR)/skins
 	@echo "*** Download skin(s) at http://www.mplayerhq.hu/dload.html"
@@ -286,7 +294,11 @@
 	$(INSTALL) -m 644 etc/mplayer.xpm $(prefix)/share/pixmaps/
 	$(INSTALL) -d $(prefix)/share/applications
 	$(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/
-endif
+
+install-dirs:
+	$(INSTALL) -d $(BINDIR)
+	$(INSTALL) -d $(DATADIR)
+	$(INSTALL) -d $(MANDIR)/man1
 	$(INSTALL) -d $(CONFDIR)
 	if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi