gplugin/gplugin

c6c29b498f09
Parents f955e98bc178
Children bd7901188be1
Define GPLUGIN_*COMPILATION instead of __GI_SCANNER__ guards

This patch removes __GI_SCANNER__ guards in favor of adding
GPLUGIN_COMPILATION and GPLUGIN_GTK_COMPILATION to the respective
gnome.generate_gir() calls. Generating the GIR is in effect,
part of the GPlugin compilation, so we can do this for cleaner,
fresher headers.
--- a/gplugin-gtk/gplugin-gtk-plugin-info.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin-gtk/gplugin-gtk-plugin-info.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GTK_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_GTK_COMPILATION)
#error "only <gplugin/gplugin-gtk.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_GTK_PLUGIN_INFO_H
#define GPLUGIN_GTK_PLUGIN_INFO_H
--- a/gplugin-gtk/gplugin-gtk-store.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin-gtk/gplugin-gtk-store.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GTK_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_GTK_COMPILATION)
#error "only <gplugin/gplugin-gtk.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_GTK_STORE_H
#define GPLUGIN_GTK_STORE_H
--- a/gplugin-gtk/gplugin-gtk-view.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin-gtk/gplugin-gtk-view.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GTK_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_GTK_COMPILATION)
#error "only <gplugin/gplugin-gtk.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_GTK_VIEW_H
#define GPLUGIN_GTK_VIEW_H
--- a/gplugin-gtk/meson.build Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin-gtk/meson.build Fri Dec 14 12:48:48 2018 -0600
@@ -124,7 +124,7 @@
symbol_prefix : 'gplugin_gtk',
nsversion : '@0@.0'.format(GPLUGIN_MAJOR_VERSION),
install : true,
- extra_args : ['--quiet'])
+ extra_args : ['--quiet', '-DGPLUGIN_GTK_COMPILATION'])
endif
###############################################################################
--- a/gplugin/gplugin-core.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-core.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_CORE_H
#define GPLUGIN_CORE_H
--- a/gplugin/gplugin-loader.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-loader.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_LOADER_H
#define GPLUGIN_LOADER_H
--- a/gplugin/gplugin-manager.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-manager.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_MANAGER_H
#define GPLUGIN_MANAGER_H
--- a/gplugin/gplugin-native-loader.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-native-loader.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> or <gplugin-native.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_NATIVE_LOADER_H
#define GPLUGIN_NATIVE_LOADER_H
--- a/gplugin/gplugin-native-plugin.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-native-plugin.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> or <gplugin-native.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_NATIVE_PLUGIN_H
#define GPLUGIN_NATIVE_PLUGIN_H
--- a/gplugin/gplugin-native-private.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-native-private.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin-native.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_NATIVE_PRIVATE_H
#define GPLUGIN_NATIVE_PRIVATE_H
--- a/gplugin/gplugin-options.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-options.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_OPTIONS_H
#define GPLUGIN_OPTIONS_H
--- a/gplugin/gplugin-plugin-info.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-plugin-info.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_PLUGIN_INFO_H
#define GPLUGIN_PLUGIN_INFO_H
--- a/gplugin/gplugin-plugin.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-plugin.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_PLUGIN_H
#define GPLUGIN_PLUGIN_H
--- a/gplugin/gplugin-private.h Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-private.h Fri Dec 14 12:48:48 2018 -0600
@@ -15,11 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_PRIVATE_H
#define GPLUGIN_PRIVATE_H
--- a/gplugin/gplugin-version.h.in Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/gplugin-version.h.in Fri Dec 14 12:48:48 2018 -0600
@@ -14,11 +14,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GI_SCANNER__ /* hide this bit from g-ir-scanner */
+
#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
#error "only <gplugin.h> may be included directly"
#endif
-#endif /* __GI_SCANNER__ */
#ifndef GPLUGIN_VERSION_H
#define GPLUGIN_VERSION_H
--- a/gplugin/meson.build Fri Dec 14 12:30:28 2018 -0600
+++ b/gplugin/meson.build Fri Dec 14 12:48:48 2018 -0600
@@ -260,7 +260,7 @@
symbol_prefix : 'gplugin',
nsversion : '@0@.0'.format(GPLUGIN_MAJOR_VERSION),
install : true,
- extra_args : ['--quiet'])
+ extra_args : ['--quiet', '-DGPLUGIN_COMPILATION'])
endif
###############################################################################