summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-12-06 03:57:08 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-12-06 05:33:32 +0200
commitb37a869f130a5246d4c98f532d07b73146672c95 (patch)
treecaaab4e6bc9bad95aa69b874dcc63bf55b25727b /Makefile
parentcb3dc68691f4d01426c7abdd9e7bc16f8d461a9f (diff)
downloadmpv-b37a869f130a5246d4c98f532d07b73146672c95.tar.bz2
mpv-b37a869f130a5246d4c98f532d07b73146672c95.tar.xz
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
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