Move the include directive to the enum template
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 17 Jul 2017 14:44:58 +0000 (15:44 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 17 Jul 2017 15:14:44 +0000 (15:14 +0000)
There is no actual written guarantee in glib-mkenums that the template
line specified using --fhead will be added after the templates specified
inside the template file. Since the template file is only used once, we
can simply move the `#include` directive inside the template, so that it
is guaranteed to be in the right place.

Closes: #1007
Approved by: cgwalters

Makefile-libostree.am
src/libostree/ostree-enumtypes.c.template

index fab7bd3f305f399195d72a498d73e87205c36453..c83569ffc1a5adb1c3f85eb9979c6cda1250997b 100644 (file)
@@ -57,7 +57,6 @@ src/libostree/ostree-enumtypes.h: src/libostree/ostree-enumtypes.h.template $(EN
 src/libostree/ostree-enumtypes.c: src/libostree/ostree-enumtypes.c.template $(ENUM_TYPES)
        $(AM_V_GEN) $(GLIB_MKENUMS) \
        --template $< \
-       --fhead "#include \"ostree-enumtypes.h\"" \
        $(ENUM_TYPES) > $@.tmp && mv $@.tmp $@
 
 nodist_libostree_1_la_SOURCES = \
index 52da7de19ff78371ec80ec77348da43e7ec3145d..f7eecf2430fb73b0547fcdbb7fd1101a54d6743b 100644 (file)
@@ -23,6 +23,8 @@
 #endif
 #include <string.h>
 
+#include "ostree-enumtypes.h"
+
 /*** END file-header ***/
 
 /*** BEGIN file-production ***/