makefiles: Use make dependencies to create installation directories.
This avoids a lot of redundant calls to mkinstalldirs.
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 16e0a63..e205e4f 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -42,6 +42,12 @@
$(INSTALLSUBDIRS) \
winapi
+INSTALLDIRS = \
+ $(DESTDIR)$(bindir) \
+ $(DESTDIR)$(datadir)/applications \
+ $(DESTDIR)$(datadir)/wine \
+ $(DESTDIR)$(mandir)/man$(prog_manext)
+
UPDATE_DESKTOP_DATABASE = update-desktop-database
all: $(PROGRAMS) $(MANPAGES) $(SUBDIRS)
@@ -73,15 +79,13 @@
sed -e "s,@bintodlldir\@,`$(RELPATH) $(bindir) $(dlldir)`,g" -e "s,@bintodatadir\@,`$(RELPATH) $(bindir) $(datadir)/wine`,g" $(SRCDIR)/wineprefixcreate.in >$@ || ($(RM) $@ && false)
chmod +x wineprefixcreate
-install install-lib:: wineprefixcreate
- $(MKINSTALLDIRS) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/applications
+install install-lib:: wineprefixcreate $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/applications
$(INSTALL_SCRIPT) wineprefixcreate $(DESTDIR)$(bindir)/wineprefixcreate
$(INSTALL_DATA) $(SRCDIR)/wine.inf $(DESTDIR)$(datadir)/wine/wine.inf
$(INSTALL_DATA) $(SRCDIR)/wine.desktop $(DESTDIR)$(datadir)/applications/wine.desktop
-$(UPDATE_DESKTOP_DATABASE)
-install install-dev:: $(INSTALLSUBDIRS:%=%/__install__) $(MANPAGES)
- $(MKINSTALLDIRS) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext)
+install install-dev:: $(INSTALLSUBDIRS:%=%/__install__) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext)
$(INSTALL_SCRIPT) $(SRCDIR)/winemaker $(DESTDIR)$(bindir)/winemaker
$(INSTALL_DATA) winemaker.man $(DESTDIR)$(mandir)/man$(prog_manext)/winemaker.$(prog_manext)