[introspection] Fix g-ir-scanner syntax errors
Fixes https://github.com/harfbuzz/harfbuzz/issues/2851
diff --git a/src/Makefile.am b/src/Makefile.am
index 3407654..7ae881c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -425,14 +425,7 @@
HarfBuzz_0_0_gir_CFLAGS = \
$(INCLUDES) \
$(HBCFLAGS) \
- -DHB_H \
- -DHB_H_IN \
- -DHB_OT_H \
- -DHB_OT_H_IN \
- -DHB_AAT_H \
- -DHB_AAT_H_IN \
- -DHB_GOBJECT_H \
- -DHB_GOBJECT_H_IN \
+ -DHB_NO_SINGLE_HEADER_ERROR \
-DHAVE_GOBJECT \
-DHB_EXTERN= \
$(NULL)
diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h
index 2924590..9af2740 100644
--- a/src/hb-aat-layout.h
+++ b/src/hb-aat-layout.h
@@ -22,7 +22,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#ifndef HB_AAT_H_IN
+#if !defined(HB_AAT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-aat.h> instead."
#endif
diff --git a/src/hb-blob.h b/src/hb-blob.h
index 74e923d..86f1278 100644
--- a/src/hb-blob.h
+++ b/src/hb-blob.h
@@ -24,7 +24,7 @@
* Red Hat Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index 869b6a5..865ccb2 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -27,7 +27,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-common.h b/src/hb-common.h
index 80c8217..532fd42 100644
--- a/src/hb-common.h
+++ b/src/hb-common.h
@@ -26,7 +26,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-deprecated.h b/src/hb-deprecated.h
index d0cae4b..5f19125 100644
--- a/src/hb-deprecated.h
+++ b/src/hb-deprecated.h
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-draw.h b/src/hb-draw.h
index 98eccf4..bddc876 100644
--- a/src/hb-draw.h
+++ b/src/hb-draw.h
@@ -22,7 +22,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-face.h b/src/hb-face.h
index dc9185c..6ef2f8b 100644
--- a/src/hb-face.h
+++ b/src/hb-face.h
@@ -24,7 +24,7 @@
* Red Hat Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-font.h b/src/hb-font.h
index 231a402..15dc126 100644
--- a/src/hb-font.h
+++ b/src/hb-font.h
@@ -24,7 +24,7 @@
* Red Hat Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-gobject-enums.h.tmpl b/src/hb-gobject-enums.h.tmpl
index f8bd29e..a846786 100644
--- a/src/hb-gobject-enums.h.tmpl
+++ b/src/hb-gobject-enums.h.tmpl
@@ -25,7 +25,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_GOBJECT_H_IN
+#if !defined(HB_GOBJECT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-gobject.h> instead."
#endif
diff --git a/src/hb-gobject-structs.h b/src/hb-gobject-structs.h
index 9a6c6d8..63467f8 100644
--- a/src/hb-gobject-structs.h
+++ b/src/hb-gobject-structs.h
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_GOBJECT_H_IN
+#if !defined(HB_GOBJECT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-gobject.h> instead."
#endif
diff --git a/src/hb-map.h b/src/hb-map.h
index a2d2d0b..6a45a7b 100644
--- a/src/hb-map.h
+++ b/src/hb-map.h
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-ot-color.h b/src/hb-ot-color.h
index 5aa93ba..c23ce4d 100644
--- a/src/hb-ot-color.h
+++ b/src/hb-ot-color.h
@@ -26,7 +26,7 @@
* Google Author(s): Sascha Brawer, Behdad Esfahbod
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-deprecated.h b/src/hb-ot-deprecated.h
index 38ee2c0..ce6b6fe 100644
--- a/src/hb-ot-deprecated.h
+++ b/src/hb-ot-deprecated.h
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-font.h b/src/hb-ot-font.h
index 80eaa54..e7959d1 100644
--- a/src/hb-ot-font.h
+++ b/src/hb-ot-font.h
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod, Roozbeh Pournader
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h
index e5e5470..d47ba0f 100644
--- a/src/hb-ot-layout.h
+++ b/src/hb-ot-layout.h
@@ -24,7 +24,7 @@
* Red Hat Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-math.h b/src/hb-ot-math.h
index eb8a301..d3ffa19 100644
--- a/src/hb-ot-math.h
+++ b/src/hb-ot-math.h
@@ -24,7 +24,7 @@
* Igalia Author(s): Frédéric Wang
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-meta.h b/src/hb-ot-meta.h
index 5377ec0..7748eb4 100644
--- a/src/hb-ot-meta.h
+++ b/src/hb-ot-meta.h
@@ -22,7 +22,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-metrics.h b/src/hb-ot-metrics.h
index 2bdb687..5841fc8 100644
--- a/src/hb-ot-metrics.h
+++ b/src/hb-ot-metrics.h
@@ -22,7 +22,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-name.h b/src/hb-ot-name.h
index 6f3fcd2..9359014 100644
--- a/src/hb-ot-name.h
+++ b/src/hb-ot-name.h
@@ -22,7 +22,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-shape.h b/src/hb-ot-shape.h
index 7b1bcc0..afdff72 100644
--- a/src/hb-ot-shape.h
+++ b/src/hb-ot-shape.h
@@ -24,7 +24,7 @@
* Red Hat Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-ot-var.h b/src/hb-ot-var.h
index da85dd2..ce201d3 100644
--- a/src/hb-ot-var.h
+++ b/src/hb-ot-var.h
@@ -24,7 +24,7 @@
* Red Hat Author(s): Behdad Esfahbod
*/
-#ifndef HB_OT_H_IN
+#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb-ot.h> instead."
#endif
diff --git a/src/hb-set.h b/src/hb-set.h
index 36a8681..0ad27f4 100644
--- a/src/hb-set.h
+++ b/src/hb-set.h
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-shape-plan.h b/src/hb-shape-plan.h
index 336524e..fc7c041 100644
--- a/src/hb-shape-plan.h
+++ b/src/hb-shape-plan.h
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-shape.h b/src/hb-shape.h
index 39507ff..922f8c0 100644
--- a/src/hb-shape.h
+++ b/src/hb-shape.h
@@ -26,7 +26,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-style.h b/src/hb-style.h
index 1209c79..f5776ce 100644
--- a/src/hb-style.h
+++ b/src/hb-style.h
@@ -22,7 +22,7 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-unicode.h b/src/hb-unicode.h
index f1f8573..c04ee15 100644
--- a/src/hb-unicode.h
+++ b/src/hb-unicode.h
@@ -28,7 +28,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-version.h b/src/hb-version.h
index 30d0252..423339e 100644
--- a/src/hb-version.h
+++ b/src/hb-version.h
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/hb-version.h.in b/src/hb-version.h.in
index d9c95eb..abcb73f 100644
--- a/src/hb-version.h.in
+++ b/src/hb-version.h.in
@@ -24,7 +24,7 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
#error "Include <hb.h> instead."
#endif
diff --git a/src/meson.build b/src/meson.build
index 9173421..ec3b7c7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -640,14 +640,8 @@
header: 'hb-gobject.h',
install: true,
extra_args: ['--cflags-begin',
- '-DHB_H',
- '-DHB_H_IN',
- '-DHB_OT_H',
- '-DHB_OT_H_IN',
- '-DHB_AAT_H',
- '-DHB_AAT_H_IN',
- '-DHB_GOBJECT_H',
- '-DHB_GOBJECT_H_IN',
+ '-DHB_NO_SINGLE_HEADER_ERROR',
+ '-DHAVE_GOBJECT',
'-DHB_EXTERN=',
'--cflags-end'])
endif