[x264-devel] [Git][videolan/x264][master] Makefile: Add missing dependency of '.depend' on 'oclobj.h'

Anton Mitrofanov (@BugMaster) gitlab at videolan.org
Tue Sep 20 19:25:58 UTC 2022



Anton Mitrofanov pushed to branch master at VideoLAN / x264


Commits:
e067ab0b by Sergei Trofimovich at 2022-09-19T22:31:01+01:00
Makefile: Add missing dependency of '.depend' on 'oclobj.h'

Without the change parallel build occasionally fails as:

    $ make --shuffle
    ...
    gcc ... -c common/opencl.c -o common/opencl-8.o ...
    common/opencl.c:116:10: fatal error: common/oclobj.h: No such file or directory
      116 | #include "common/oclobj.h"
          |          ^~~~~~~~~~~~~~~~~

Best reproducible with `make --shuffle` mode:
   https://savannah.gnu.org/bugs/index.php?62100

This happens because `common/oclobj.h` is an autogenerated file.
Normally `.depend` would contain this autogenerated dependency.
But nothing forces `common/oclobj.h` to be generated.

The change moves dependency of $(GENERATED) from final binaries
to `.depend` itself:

    .depend: $(GENERATED)

- - - - -


1 changed file:

- Makefile


Changes:

=====================================
Makefile
=====================================
@@ -242,12 +242,12 @@ cli: x264$(EXE)
 lib-static: $(LIBX264)
 lib-shared: $(SONAME)
 
-$(LIBX264): $(GENERATED) .depend $(OBJS) $(OBJASM)
+$(LIBX264): $(OBJS) $(OBJASM)
 	rm -f $(LIBX264)
 	$(AR)$@ $(OBJS) $(OBJASM)
 	$(if $(RANLIB), $(RANLIB) $@)
 
-$(SONAME): $(GENERATED) .depend $(OBJS) $(OBJASM) $(OBJSO)
+$(SONAME): $(OBJS) $(OBJASM) $(OBJSO)
 	$(LD)$@ $(OBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS)
 
 $(IMPLIBNAME): $(SONAME)
@@ -260,16 +260,16 @@ checkasm10: checkasm10$(EXE)
 example: example$(EXE)
 endif
 
-x264$(EXE): $(GENERATED) .depend $(OBJCLI) $(CLI_LIBX264)
+x264$(EXE): $(OBJCLI) $(CLI_LIBX264)
 	$(LD)$@ $(OBJCLI) $(CLI_LIBX264) $(LDFLAGSCLI) $(LDFLAGS)
 
-checkasm8$(EXE): $(GENERATED) .depend $(OBJCHK) $(OBJCHK_8) $(LIBX264)
+checkasm8$(EXE): $(OBJCHK) $(OBJCHK_8) $(LIBX264)
 	$(LD)$@ $(OBJCHK) $(OBJCHK_8) $(LIBX264) $(LDFLAGS)
 
-checkasm10$(EXE): $(GENERATED) .depend $(OBJCHK) $(OBJCHK_10) $(LIBX264)
+checkasm10$(EXE): $(OBJCHK) $(OBJCHK_10) $(LIBX264)
 	$(LD)$@ $(OBJCHK) $(OBJCHK_10) $(LIBX264) $(LDFLAGS)
 
-example$(EXE): $(GENERATED) .depend $(OBJEXAMPLE) $(LIBX264)
+example$(EXE): $(OBJEXAMPLE) $(LIBX264)
 	$(LD)$@ $(OBJEXAMPLE) $(LIBX264) $(LDFLAGS)
 
 $(OBJS) $(OBJSO): CFLAGS += $(CFLAGSSO)
@@ -316,7 +316,7 @@ $(OBJS) $(OBJASM) $(OBJSO) $(OBJCLI) $(OBJCHK) $(OBJCHK_8) $(OBJCHK_10) $(OBJEXA
 %.o: %.rc x264.h x264res.manifest
 	$(RC) $(RCFLAGS)$@ $<
 
-.depend: config.mak
+.depend: config.mak $(GENERATED)
 	@rm -f .depend
 	@echo 'dependency file generation...'
 ifeq ($(COMPILER),CL)



View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/e067ab0b530395f90b578f6d05ab0a225e2efdf9

-- 
View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/e067ab0b530395f90b578f6d05ab0a225e2efdf9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the x264-devel mailing list