From ad6b4c7b6ec3de735eb17d29a2b67b5ecfb19be0 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 17 Jun 2020 19:24:53 +0200 Subject: [PATCH] build: Make sure osl.h exists when we run the compiler. This fixes the build on NetBSD 9.0_RC1. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aa0e6f6..d0427c6 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,10 @@ shared: $(realname) ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(deps) endif -%.o: %.c Makefile errtab.h + +# List osl.h in the prerequisites to make sure we generate it before attempting +# to run the compiler. This matters only when the .d file does not exist. +%.o: %.c osl.h Makefile errtab.h $(CC) $(OSL_CPPFLAGS) $(CPPFLAGS) \ -c -MMD -MF $(*F).d -MT $@ \ $(OSL_CFLAGS) $(CFLAGS) $< -- 2.39.2