diff --git a/Makefile.in b/Makefile.in index f9ed70fd..71f76ebb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -102,11 +102,11 @@ distclean: clean $(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MMD -MF .depend/$@.dep install: znc $(LIBZNC) - mkdir -p $(DESTDIR)$(bindir) - mkdir -p $(DESTDIR)$(includedir)/znc - mkdir -p $(DESTDIR)$(PKGCONFIGDIR) - mkdir -p $(DESTDIR)$(MODDIR) - mkdir -p $(DESTDIR)$(DATADIR) + test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir) + test -d $(DESTDIR)$(includedir)/znc || $(INSTALL) -d $(DESTDIR)$(includedir)/znc + test -d $(DESTDIR)$(PKGCONFIGDIR) || $(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR) + test -d $(DESTDIR)$(MODDIR) || $(INSTALL) -d $(DESTDIR)$(MODDIR) + test -d $(DESTDIR)$(DATADIR) || $(INSTALL) -d $(DESTDIR)$(DATADIR) cp -R $(srcdir)/webskins $(DESTDIR)$(DATADIR) find $(DESTDIR)$(DATADIR)/webskins -type d -exec chmod 0755 '{}' \; find $(DESTDIR)$(DATADIR)/webskins -type f -exec chmod 0644 '{}' \; @@ -118,7 +118,7 @@ install: znc $(LIBZNC) $(INSTALL_DATA) znc.pc $(DESTDIR)$(PKGCONFIGDIR) @$(MAKE) -C modules install DESTDIR=$(DESTDIR); if test -n "$(LIBZNC)"; then \ - mkdir -p $(DESTDIR)$(LIBZNCDIR) || exit 1 ; \ + test -d $(DESTDIR)$(LIBZNCDIR) || $(INSTALL) -d $(DESTDIR)$(LIBZNCDIR) || exit 1 ; \ $(INSTALL_PROGRAM) $(LIBZNC) $(DESTDIR)$(LIBZNCDIR) || exit 1 ; \ fi @$(MAKE) -C man install DESTDIR=$(DESTDIR) diff --git a/man/Makefile.in b/man/Makefile.in index 3f88f05b..145d14f0 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -34,7 +34,7 @@ clean: -rm -f $(MAN1) install: $(MAN1) - mkdir -p $(DESTDIR)$(mandir)/man1 + test -d $(DESTDIR)$(mandir)/man1 || $(INSTALL) -d $(DESTDIR)$(mandir)/man1 $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(mandir)/man1 uninstall: diff --git a/modules/Makefile.in b/modules/Makefile.in index 87868b05..62bc6b1e 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -101,10 +101,9 @@ install: all install_datadir install_datadir: rm -rf $(DESTDIR)$(DATADIR)/modules - mkdir -p $(DESTDIR)$(MODDIR) - mkdir -p $(DESTDIR)$(DATADIR)/modules + test -d $(DESTDIR)$(MODDIR) || $(INSTALL) -d $(DESTDIR)$(MODDIR) + test -d $(DESTDIR)$(DATADIR)/modules || $(INSTALL) -d $(DESTDIR)$(DATADIR)/modules rm -rf $(DESTDIR)$(MODDIR)/*.so - mkdir -p $(DESTDIR)$(DATADIR)/modules cp -R $(srcdir)/data/* $(DESTDIR)$(DATADIR)/modules if test "@EXTRA@" = "yes" ; then \ cp -R $(srcdir)/extra/data/* $(DESTDIR)$(DATADIR)/modules ; \