build: Ensure enumtypes.h is built before enumtypes.c
authorDan Nicholson <nicholson@endlessm.com>
Fri, 3 Nov 2017 15:47:16 +0000 (15:47 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 3 Nov 2017 22:05:47 +0000 (22:05 +0000)
ostree-enumtypes.c includes ostree-enumtypes.h, so make needs to be told
about the dependency. Without it, parallel make could try to build
ostree-enumtypes.c before the header file exists.

I hit this when running `make -j OSTree-1.0.gir`.

Closes: #1322
Approved by: pwithnall

Makefile-libostree.am

index e2ebae3a809a9c00bf4611872335ce5b642efc2a..f83760964737fc131dc326ab8e87f391903f2fd3 100644 (file)
@@ -54,7 +54,7 @@ src/libostree/ostree-enumtypes.h: src/libostree/ostree-enumtypes.h.template $(EN
        --template $< \
        $(ENUM_TYPES) > $@.tmp && mv $@.tmp $@
 
-src/libostree/ostree-enumtypes.c: src/libostree/ostree-enumtypes.c.template $(ENUM_TYPES)
+src/libostree/ostree-enumtypes.c: src/libostree/ostree-enumtypes.c.template src/libostree/ostree-enumtypes.h $(ENUM_TYPES)
        $(AM_V_GEN) $(GLIB_MKENUMS) \
        --template $< \
        $(ENUM_TYPES) > $@.tmp && mv $@.tmp $@