From b37a869f130a5246d4c98f532d07b73146672c95 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 6 Dec 2008 03:57:08 +0200 Subject: Makefile: Don't use "install -d" on existing directories Makefile used "install -d" on directories like "/usr/local/bin". Because the install program always tries to set permissions this command causes an installation failure if the directory exists and is writable but you cannot change its permissions (default configuration for group staff on Debian for example). So avoid running such commands on existing directories. --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ea5114320d..9e6e1c6dd8 100644 --- a/Makefile +++ b/Makefile @@ -873,7 +873,9 @@ $(VIDIX_DEPS) $(VIDIX_OBJS): $(VIDIX_PCI_FILES) install: $(INSTALL_TARGETS-yes) install-dirs: - $(INSTALL) -d $(BINDIR) $(CONFDIR) $(LIBDIR) + if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi + if test ! -d $(CONFDIR) ; then $(INSTALL) -d $(CONFDIR) ; fi + if test ! -d $(LIBDIR) ; then $(INSTALL) -d $(LIBDIR) ; fi install-%: %$(EXESUF) install-dirs $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR) @@ -891,7 +893,7 @@ install-mencoder-man-en: install-mplayer-man-en cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1 install-mplayer-man-en: - $(INSTALL) -d $(MANDIR)/man1 + if test ! -d $(MANDIR)/man1 ; then $(INSTALL) -d $(MANDIR)/man1 ; fi $(INSTALL) -c -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/ define MENCODER_MAN_RULE @@ -901,7 +903,7 @@ endef define MPLAYER_MAN_RULE install-mplayer-man-$(lang): - $(INSTALL) -d $(MANDIR)/$(lang)/man1 + if test ! -d $(MANDIR)/$(lang)/man1 ; then $(INSTALL) -d $(MANDIR)/$(lang)/man1 ; fi $(INSTALL) -c -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/ endef -- cgit v1.2.3