[gedit] Get rid of HAVE_CONFIG_H
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Get rid of HAVE_CONFIG_H
- Date: Thu, 5 Dec 2019 13:29:47 +0000 (UTC)
commit cf472fd72486a3157e78efd0b83bec8fbea68a26
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Dec 5 14:13:31 2019 +0100
Get rid of HAVE_CONFIG_H
It's specific to Autotools.
gedit/meson.build | 12 +++---------
plugins/checkupdate/gedit-check-update-plugin.c | 4 +---
plugins/checkupdate/meson.build | 5 -----
plugins/docinfo/gedit-docinfo-plugin.c | 4 +---
plugins/docinfo/meson.build | 5 -----
plugins/filebrowser/gedit-file-browser-plugin.c | 4 +---
plugins/filebrowser/gedit-file-browser-store.c | 4 +---
plugins/filebrowser/gedit-file-browser-utils.c | 4 +---
plugins/filebrowser/gedit-file-browser-widget.c | 4 +---
plugins/filebrowser/meson.build | 5 -----
.../messages/gedit-file-browser-message-activation.c | 4 +---
.../messages/gedit-file-browser-message-add-filter.c | 4 +---
.../gedit-file-browser-message-extend-context-menu.c | 4 +---
.../messages/gedit-file-browser-message-get-root.c | 4 +---
.../messages/gedit-file-browser-message-get-view.c | 4 +---
.../messages/gedit-file-browser-message-id-location.c | 4 +---
plugins/filebrowser/messages/gedit-file-browser-message-id.c | 4 +---
.../messages/gedit-file-browser-message-set-emblem.c | 4 +---
.../messages/gedit-file-browser-message-set-markup.c | 4 +---
.../messages/gedit-file-browser-message-set-root.c | 4 +---
plugins/modelines/gedit-modeline-plugin.c | 4 +---
plugins/modelines/meson.build | 5 -----
plugins/quickhighlight/gedit-quick-highlight-plugin.c | 4 +---
plugins/quickhighlight/meson.build | 5 -----
plugins/sort/gedit-sort-plugin.c | 4 +---
plugins/sort/meson.build | 5 -----
plugins/spell/meson.build | 5 -----
plugins/time/gedit-time-plugin.c | 4 +---
plugins/time/meson.build | 5 -----
tools/generate-message.py | 6 +-----
30 files changed, 24 insertions(+), 114 deletions(-)
---
diff --git a/gedit/meson.build b/gedit/meson.build
index e8fe1dcf9..c5149bd09 100644
--- a/gedit/meson.build
+++ b/gedit/meson.build
@@ -106,12 +106,8 @@ libgedit_sources = files(
'gedit-window.c',
)
-libgedit_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
-libgedit_link_args = [
-]
+libgedit_c_args = []
+libgedit_link_args = []
libgedit_deps = [
glib_dep,
@@ -291,9 +287,7 @@ gedit_sources = [
'gedit.c',
]
-gedit_c_args = [
- '-DHAVE_CONFIG_H',
-]
+gedit_c_args = []
if windowing_target == 'quartz'
gedit_c_args += [
diff --git a/plugins/checkupdate/gedit-check-update-plugin.c b/plugins/checkupdate/gedit-check-update-plugin.c
index 3f2c3c3d3..dc3043e67 100644
--- a/plugins/checkupdate/gedit-check-update-plugin.c
+++ b/plugins/checkupdate/gedit-check-update-plugin.c
@@ -15,9 +15,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-check-update-plugin.h"
diff --git a/plugins/checkupdate/meson.build b/plugins/checkupdate/meson.build
index 79c3b70a9..3e987d29d 100644
--- a/plugins/checkupdate/meson.build
+++ b/plugins/checkupdate/meson.build
@@ -7,16 +7,11 @@ libcheckupdate_deps = [
libsoup_dep,
]
-libcheckupdate_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
libcheckupdate_sha = shared_module(
'checkupdate',
sources: libcheckupdate_sources,
include_directories: root_include_dir,
dependencies: libcheckupdate_deps,
- c_args: libcheckupdate_c_args,
install: true,
install_dir: join_paths(
pkglibdir,
diff --git a/plugins/docinfo/gedit-docinfo-plugin.c b/plugins/docinfo/gedit-docinfo-plugin.c
index 3bf050929..50732541b 100644
--- a/plugins/docinfo/gedit-docinfo-plugin.c
+++ b/plugins/docinfo/gedit-docinfo-plugin.c
@@ -18,9 +18,7 @@
*
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-docinfo-plugin.h"
diff --git a/plugins/docinfo/meson.build b/plugins/docinfo/meson.build
index c13d9a62c..200ace561 100644
--- a/plugins/docinfo/meson.build
+++ b/plugins/docinfo/meson.build
@@ -6,10 +6,6 @@ libdocinfo_deps = [
libgedit_dep,
]
-libdocinfo_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
subdir('resources')
libdocinfo_sha = shared_module(
@@ -17,7 +13,6 @@ libdocinfo_sha = shared_module(
sources: libdocinfo_sources,
include_directories: root_include_dir,
dependencies: libdocinfo_deps,
- c_args: libdocinfo_c_args,
install: true,
install_dir: join_paths(
pkglibdir,
diff --git a/plugins/filebrowser/gedit-file-browser-plugin.c b/plugins/filebrowser/gedit-file-browser-plugin.c
index 9958267dd..2e8e13e7f 100644
--- a/plugins/filebrowser/gedit-file-browser-plugin.c
+++ b/plugins/filebrowser/gedit-file-browser-plugin.c
@@ -18,9 +18,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <string.h>
#include <glib/gi18n-lib.h>
diff --git a/plugins/filebrowser/gedit-file-browser-store.c b/plugins/filebrowser/gedit-file-browser-store.c
index cba273b11..6a5ccaf94 100644
--- a/plugins/filebrowser/gedit-file-browser-store.c
+++ b/plugins/filebrowser/gedit-file-browser-store.c
@@ -18,9 +18,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <string.h>
#include <glib/gi18n-lib.h>
diff --git a/plugins/filebrowser/gedit-file-browser-utils.c b/plugins/filebrowser/gedit-file-browser-utils.c
index a3818252c..dbca26a00 100644
--- a/plugins/filebrowser/gedit-file-browser-utils.c
+++ b/plugins/filebrowser/gedit-file-browser-utils.c
@@ -18,9 +18,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <glib/gi18n-lib.h>
#include <gedit/gedit-utils.h>
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index e0dc38c89..eab78ed57 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -18,9 +18,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/plugins/filebrowser/meson.build b/plugins/filebrowser/meson.build
index 99d0570ad..ba666529d 100644
--- a/plugins/filebrowser/meson.build
+++ b/plugins/filebrowser/meson.build
@@ -23,10 +23,6 @@ libfilebrowser_deps = [
libgedit_dep,
]
-libfilebrowser_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
subdir('messages')
libfilebrowser_register_enums = gnome.mkenums(
@@ -69,7 +65,6 @@ libfilebrowser_sha = shared_module(
sources: libfilebrowser_sources,
include_directories: root_include_dir,
dependencies: libfilebrowser_deps,
- c_args: libfilebrowser_c_args,
install: true,
install_dir: join_paths(
pkglibdir,
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-activation.c
b/plugins/filebrowser/messages/gedit-file-browser-message-activation.c
index 93f6cbdc5..0138e0d73 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-activation.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-activation.c
@@ -21,9 +21,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-activation.h"
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-add-filter.c
b/plugins/filebrowser/messages/gedit-file-browser-message-add-filter.c
index 8c4be90de..f66a32df4 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-add-filter.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-add-filter.c
@@ -21,9 +21,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-add-filter.h"
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-extend-context-menu.c
b/plugins/filebrowser/messages/gedit-file-browser-message-extend-context-menu.c
index 542dcd7c2..4bb86824b 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-extend-context-menu.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-extend-context-menu.c
@@ -22,9 +22,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-extend-context-menu.h"
#include <gedit/gedit-menu-extension.h>
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-get-root.c
b/plugins/filebrowser/messages/gedit-file-browser-message-get-root.c
index ae0da3ec7..b766ac12b 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-get-root.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-get-root.c
@@ -21,9 +21,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-get-root.h"
#include "gio/gio.h"
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-get-view.c
b/plugins/filebrowser/messages/gedit-file-browser-message-get-view.c
index 3050a5cd8..17fe7570b 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-get-view.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-get-view.c
@@ -21,9 +21,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-get-view.h"
#include "plugins/filebrowser/gedit-file-browser-view.h"
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-id-location.c
b/plugins/filebrowser/messages/gedit-file-browser-message-id-location.c
index 07c0a78e4..36c33c543 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-id-location.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-id-location.c
@@ -22,9 +22,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-id-location.h"
#include "gio/gio.h"
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-id.c
b/plugins/filebrowser/messages/gedit-file-browser-message-id.c
index 13565e061..fec490fd8 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-id.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-id.c
@@ -21,9 +21,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-id.h"
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-set-emblem.c
b/plugins/filebrowser/messages/gedit-file-browser-message-set-emblem.c
index cd087d521..8e6304280 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-set-emblem.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-set-emblem.c
@@ -21,9 +21,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-set-emblem.h"
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-set-markup.c
b/plugins/filebrowser/messages/gedit-file-browser-message-set-markup.c
index 2546f4156..3b14d16e6 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-set-markup.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-set-markup.c
@@ -22,9 +22,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-set-markup.h"
diff --git a/plugins/filebrowser/messages/gedit-file-browser-message-set-root.c
b/plugins/filebrowser/messages/gedit-file-browser-message-set-root.c
index 1b9995c22..cb3891b0c 100644
--- a/plugins/filebrowser/messages/gedit-file-browser-message-set-root.c
+++ b/plugins/filebrowser/messages/gedit-file-browser-message-set-root.c
@@ -21,9 +21,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-file-browser-message-set-root.h"
#include "gio/gio.h"
diff --git a/plugins/modelines/gedit-modeline-plugin.c b/plugins/modelines/gedit-modeline-plugin.c
index 83590d4ee..376d996bc 100644
--- a/plugins/modelines/gedit-modeline-plugin.c
+++ b/plugins/modelines/gedit-modeline-plugin.c
@@ -18,9 +18,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <glib/gi18n-lib.h>
#include <gmodule.h>
diff --git a/plugins/modelines/meson.build b/plugins/modelines/meson.build
index 4b3984736..3ff0e84e0 100644
--- a/plugins/modelines/meson.build
+++ b/plugins/modelines/meson.build
@@ -7,16 +7,11 @@ libmodelines_deps = [
libgedit_dep,
]
-libmodelines_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
libmodelines_sha = shared_module(
'modelines',
sources: libmodelines_sources,
include_directories: root_include_dir,
dependencies: libmodelines_deps,
- c_args: libmodelines_c_args,
install: true,
install_dir: join_paths(
pkglibdir,
diff --git a/plugins/quickhighlight/gedit-quick-highlight-plugin.c
b/plugins/quickhighlight/gedit-quick-highlight-plugin.c
index ab0ded65e..7b4289dc7 100644
--- a/plugins/quickhighlight/gedit-quick-highlight-plugin.c
+++ b/plugins/quickhighlight/gedit-quick-highlight-plugin.c
@@ -18,9 +18,7 @@
*
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <glib/gi18n.h>
diff --git a/plugins/quickhighlight/meson.build b/plugins/quickhighlight/meson.build
index 3918b93e2..18fb4174a 100644
--- a/plugins/quickhighlight/meson.build
+++ b/plugins/quickhighlight/meson.build
@@ -6,16 +6,11 @@ libquickhighlight_deps = [
libgedit_dep,
]
-libquickhighlight_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
libquickhighlight_sha = shared_module(
'quickhighlight',
sources: libquickhighlight_sources,
include_directories: root_include_dir,
dependencies: libquickhighlight_deps,
- c_args: libquickhighlight_c_args,
install: true,
install_dir: join_paths(
pkglibdir,
diff --git a/plugins/sort/gedit-sort-plugin.c b/plugins/sort/gedit-sort-plugin.c
index 0740409c2..41774fc99 100644
--- a/plugins/sort/gedit-sort-plugin.c
+++ b/plugins/sort/gedit-sort-plugin.c
@@ -18,9 +18,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include "gedit-sort-plugin.h"
diff --git a/plugins/sort/meson.build b/plugins/sort/meson.build
index 406d9f6a8..7f9144026 100644
--- a/plugins/sort/meson.build
+++ b/plugins/sort/meson.build
@@ -6,10 +6,6 @@ libsort_deps = [
libgedit_dep,
]
-libsort_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
subdir('resources')
libsort_sha = shared_module(
@@ -17,7 +13,6 @@ libsort_sha = shared_module(
sources: libsort_sources,
include_directories: root_include_dir,
dependencies: libsort_deps,
- c_args: libsort_c_args,
install: true,
install_dir: join_paths(
pkglibdir,
diff --git a/plugins/spell/meson.build b/plugins/spell/meson.build
index 177ce0ec8..8ce7634b7 100644
--- a/plugins/spell/meson.build
+++ b/plugins/spell/meson.build
@@ -8,10 +8,6 @@ libspell_deps = [
gspell_dep,
]
-libspell_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
subdir('resources')
libspell_sha = shared_module(
@@ -19,7 +15,6 @@ libspell_sha = shared_module(
sources: libspell_sources,
include_directories: root_include_dir,
dependencies: libspell_deps,
- c_args: libspell_c_args,
install: true,
install_dir: join_paths(
pkglibdir,
diff --git a/plugins/time/gedit-time-plugin.c b/plugins/time/gedit-time-plugin.c
index 0bb3b6000..c205ce8ab 100644
--- a/plugins/time/gedit-time-plugin.c
+++ b/plugins/time/gedit-time-plugin.c
@@ -17,9 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <string.h>
#include <glib/gi18n-lib.h>
diff --git a/plugins/time/meson.build b/plugins/time/meson.build
index 2eb70499f..f3e43a305 100644
--- a/plugins/time/meson.build
+++ b/plugins/time/meson.build
@@ -6,10 +6,6 @@ libtime_deps = [
libgedit_dep,
]
-libtime_c_args = [
- '-DHAVE_CONFIG_H',
-]
-
gnome.mkenums(
'org.gnome.gedit.plugins.time.enums.xml',
sources: libtime_sources,
@@ -33,7 +29,6 @@ libtime_sha = shared_module(
sources: libtime_sources,
include_directories: root_include_dir,
dependencies: libtime_deps,
- c_args: libtime_c_args,
install: true,
install_dir: join_paths(
pkglibdir,
diff --git a/tools/generate-message.py b/tools/generate-message.py
index cdc32dfc4..bacae15df 100755
--- a/tools/generate-message.py
+++ b/tools/generate-message.py
@@ -585,11 +585,7 @@ class Message:
elif options.lgpl:
self._write_lgpl(options, fname)
- self._write("#ifdef HAVE_CONFIG_H")
- self._write("#include <config.h>")
- self._write("#endif")
- self._write()
-
+ self._write('#include "config.h"')
self._write('#include "%s.h"', self.filename)
for inc in self.includes:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]