[retro-gtk/wip/aplazas/master: 2/3] Manually define retro-gtk.h



commit 9ce4cfb06fac0426c50ada12a67eef25b375a4c9
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Sep 6 10:10:15 2017 +0200

    Manually define retro-gtk.h

 retro-gtk/Makefile.am |    7 ++-----
 retro-gtk/retro-gtk.h |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index 280f87c..80c059a 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -29,6 +29,7 @@ BUILT_SOURCES = retro-gtk-internal.h
 
 retro_gtk_public_h_sources = \
        retro-gtk.h \
+       retro-gtk-vala.h \
        $(NULL)
 
 retro_gtk_private_h_sources = \
@@ -116,7 +117,7 @@ libretro_gtk_la_VALAFLAGS = \
        --target-glib 2.32 \
        --library retro-gtk-0.12 \
        --vapi retro-gtk-0.12.vapi \
-       -H retro-gtk.h \
+       -H retro-gtk-vala.h \
        -h retro-gtk-internal.h \
        -X -fPIC -X -shared \
        $(NULL)
@@ -128,10 +129,6 @@ retro_gtkinclude_HEADERS = \
        $(retro_gtk_public_h_sources) \
        $(NULL)
 
-# Add unstable API guard
-$(outdir)/retro-gtk.h:
-       sed -i "s/#define __RETRO_GTK_H__/#define __RETRO_GTK_H__\n\n#ifndef 
RETRO_GTK_USE_UNSTABLE_API\n#error    retro-gtk is unstable API. You must define RETRO_GTK_USE_UNSTABLE_API 
before including retro-gtk.h\n#endif/" $@
-
 # Introspection
 -include $(INTROSPECTION_MAKEFILE)
 
diff --git a/retro-gtk/retro-gtk.h b/retro-gtk/retro-gtk.h
new file mode 100644
index 0000000..72f85f6
--- /dev/null
+++ b/retro-gtk/retro-gtk.h
@@ -0,0 +1,16 @@
+// This file is part of retro-gtk. License: GPL-3.0+.
+
+#ifndef __RETRO_GTK_H__
+#define __RETRO_GTK_H__
+
+#define __RETRO_GTK_INSIDE__
+
+#ifndef RETRO_GTK_USE_UNSTABLE_API
+#error    retro-gtk is unstable API. You must define RETRO_GTK_USE_UNSTABLE_API before including retro-gtk.h
+#endif
+
+#include "retro-gtk-vala.h"
+
+#undef __RETRO_GTK_INSIDE__
+
+#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]