From 162eda256fc973d6320f1988d40f74bfd3f54999 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Thu, 5 Dec 2024 16:56:13 +0000
Subject: Fix Makefile dependencies between install targets

Forwarded: no
Last-Update: 2024-12-05

Patch-Name: install-targets-dependencies.patch
---
 Makefile.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index bab432a..2e81b6a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,25 +40,25 @@ all: $(progs)
 installdirs:
 	$(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(mandir) $(datadir)
 
-install_prog: $(progs)
+install_prog: $(progs) installdirs
 	if test -f xspect; then \
 	   $(INSTALL_PROGRAM) -s xspect $(bindir); fi
 	if test -f vgaspect; then \
 	   $(INSTALL_PROGRAM) -s -m 4755 vgaspect $(bindir); fi
 
-install_man:
+install_man: installdirs
 	$(INSTALL_DATA) xspect.1 $(mandir)
 	$(INSTALL_DATA) tapeout.1 $(mandir)
 	(cd $(mandir); rm -f vgaspect.1; ln -s xspect.1 vgaspect.1)
 
-install_data:
+install_data: installdirs
 	$(INSTALL_DATA) spectkey.gif $(datadir)
 	$(INSTALL_DATA) specsinc.xpm $(datadir)
 	$(INSTALL_DATA) example.cfg $(datadir)
 	if test ! -f $(datadir)/spectemu.cfg; then \
 	   $(INSTALL_DATA) spectemu.cfg $(datadir); fi
 
-install: installdirs install_prog install_man install_data
+install: install_prog install_man install_data
 
 z80_c_objs=z80.o z80optab.o z80_step.o spperif.o spect.o \
            z80_op1.o z80_op2.o z80_op3.o z80_op4.o z80_op5.o z80_op6.o
