]> git.tuebingen.mpg.de Git - osl.git/commitdiff
build: Make sure osl.h exists when we run the compiler.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 17 Jun 2020 17:24:53 +0000 (19:24 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 17 Jun 2020 17:25:03 +0000 (19:25 +0200)
This fixes the build on NetBSD 9.0_RC1.

Makefile

index aa0e6f6d06c704008292e077bd21bf9e18a43180..d0427c6aef05d21b7752832c6ae282268d9f90f4 100644 (file)
--- 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) $<