Branch: refs/heads/master Author: Thomas Martitz thomas.martitz@mailbox.org Committer: Thomas Martitz thomas.martitz@mailbox.org Date: Mon, 14 Mar 2022 21:08:47 UTC Commit: 5e22dfae22bc09084ae556b367159e7eaa713591 https://github.com/geany/geany/commit/5e22dfae22bc09084ae556b367159e7eaa7135...
Log Message: ----------- Prepare for meson build system
Autotools-based builds will be supported for some time. This patch makes some modifications to the Autotools build system necessary to to co-exist with meson.
- LOCALEDIR and DATADIR won't be defined, replace with GEANY_* where necessary - VERSION won't be defined, use PACKAGE_VERSION and PACKAGE_STRING instead - Doxyfile cannot be generated by configure, which wouldn't run in a meson build. Generate both Doxyfile and Doxyfile-gi manually using sed - actual shell script to generate signallist.i (inline shell not a thing in meson) - path of signallist.i will change, exclude callbacks.c from doxygen to make it happy - geany icon for 24x24 size such that one exists for all sizes - install license file for Lexilla - change how tests are run a bit so that runner.sh will also work for meson - check for dirent.h, required by ctags
Modified Paths: -------------- Makefile.am configure.ac doc/Doxyfile.in doc/Makefile.am icons/24x24/Makefile.am icons/24x24/geany.png plugins/Makefile.am plugins/classbuilder.c plugins/demoplugin.c plugins/export.c plugins/filebrowser.c plugins/htmlchars.c plugins/saveactions.c plugins/splitwindow.c scripts/gen-signallist.sh src/Makefile.am src/libmain.c src/templates.c src/utils.c tests/ctags/Makefile.am tests/ctags/runner.sh
Modified: Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -15,6 +15,7 @@ WIN32_BUILD_FILES = \ EXTRA_DIST = \ autogen.sh \ scripts/gen-api-gtkdoc.py \ + scripts/gen-signallist.sh \ geany.desktop.in \ geany.pc.in \ ChangeLog.pre-1-22 \
Modified: configure.ac 3 lines changed, 1 insertions(+), 2 deletions(-) =================================================================== @@ -48,7 +48,7 @@ fi AC_CHECK_HEADERS([fcntl.h glob.h stdlib.h sys/time.h errno.h limits.h])
# Checks for dependencies needed by ctags -AC_CHECK_HEADERS([fnmatch.h direct.h io.h sys/dir.h]) +AC_CHECK_HEADERS([dirent.h fnmatch.h direct.h io.h sys/dir.h]) AC_DEFINE([HAVE_STDBOOL_H], [1], [whether or not to use <stdbool.h>.]) AC_CHECK_FUNC([regcomp], [have_regcomp=yes], @@ -184,7 +184,6 @@ AC_CONFIG_FILES([ doc/geany.1 geany.pc geany.nsi - doc/Doxyfile tests/Makefile tests/ctags/Makefile ])
Modified: doc/Doxyfile.in 15 lines changed, 7 insertions(+), 8 deletions(-) =================================================================== @@ -248,7 +248,7 @@ ALIASES = "signal=- @ref " \ "signaldesc=" \ "signals=@b Signals: " \ "endsignals= " \ - "gironly=@internal" + "gironly=@GIRONLY@"
# Apparently Doxygen doesn't seem to like <type>only without a previous command, so create a no-op ALIASES += "noop=\if FALSE \endif" @@ -567,15 +567,15 @@ INLINE_INFO = NO # name. If set to NO the members will appear in declaration order. # The default value is: YES.
-SORT_MEMBER_DOCS = YES +SORT_MEMBER_DOCS = @SORT@
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO.
-SORT_BRIEF_DOCS = YES +SORT_BRIEF_DOCS = @SORT@
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and @@ -848,8 +848,7 @@ RECURSIVE = NO # Note that relative paths are relative to the directory from which doxygen is # run.
-EXCLUDE = @top_srcdir@/doc/geany-gtkdoc.h \ - @top_srcdir@/doc/geany-sciwrappers-gtkdoc.h +EXCLUDE = @top_srcdir@/src/callbacks.c
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -1090,7 +1089,7 @@ IGNORE_PREFIX = # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output # The default value is: YES.
-GENERATE_HTML = YES +GENERATE_HTML = @HTML@
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of @@ -1881,7 +1880,7 @@ MAN_LINKS = NO # captures the structure of the code including all documentation. # The default value is: NO.
-GENERATE_XML = NO +GENERATE_XML = @XML@
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of @@ -2016,7 +2015,7 @@ SEARCH_INCLUDES = NO # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH = @top_builddir@/src/ +INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the
Modified: doc/Makefile.am 42 lines changed, 29 insertions(+), 13 deletions(-) =================================================================== @@ -82,17 +82,31 @@ clean-pdf-local:
endif
+AT=@ + # API Documentation if WITH_DOXYGEN
+# $(AT) instead of @ so that configure doesn't mess up the rules already +Doxyfile: Doxyfile.in + $(AM_V_GEN)$(SED) \ + -e 's,$(AT)top_srcdir$(AT),$(top_srcdir),' \ + -e 's,$(AT)top_builddir$(AT),$(top_builddir),' \ + -e 's,$(AT)VERSION$(AT),$(VERSION),' \ + -e 's,$(AT)GIRONLY$(AT),@internal,' \ + -e 's,$(AT)HTML$(AT),YES,' \ + -e 's,$(AT)XML$(AT),NO,' \ + -e 's,$(AT)SORT$(AT),YES,' \ + $< > $@ || ( $(RM) -f $@ ; exit 1 ) + doxygen_sources = \ $(srcdir)/plugins.dox \ $(srcdir)/pluginsignals.c \ $(srcdir)/pluginsymbols.c \ $(srcdir)/stash-example.c \ $(srcdir)/stash-gui-example.c
-EXTRA_DIST += $(doxygen_sources) +EXTRA_DIST += Doxyfile.in $(doxygen_sources)
doxygen_dependencies = \ $(doxygen_sources) \ @@ -114,18 +128,16 @@ clean-api-docs-local:
if ENABLE_GTKDOC_HEADER
-# set WARN_IF_UNDOCUMENTED because apparently doxygens warns for undocumented stuff -# in headers (even though it's correctly documented in the corresponding .c file) only -# for xml output -Doxyfile-gi: Doxyfile +Doxyfile-gi: Doxyfile.in $(AM_V_GEN)$(SED) \ - -e 's,gironly=@internal,gironly=,' \ - -e 's,^(GENERATE_HTML.*)YES,\1NO,' \ - -e 's,^(GENERATE_XML.*)NO,\1YES,' \ - -e 's,^(WARN_IF_UNDOCUMENTED.*)YES,\1NO,' \ - -e 's,^(SORT_MEMBER_DOCS.*)YES,\1NO,' \ - -e 's,^(SORT_BRIEF_DOCS.*)YES,\1NO,' \ - $< > $@ || { $(RM) $@ && exit 1; } + -e 's,$(AT)top_srcdir$(AT),$(top_srcdir),' \ + -e 's,$(AT)top_builddir$(AT),$(top_builddir),' \ + -e 's,$(AT)VERSION$(AT),$(VERSION),' \ + -e 's,$(AT)GIRONLY$(AT),,' \ + -e 's,$(AT)HTML$(AT),NO,' \ + -e 's,$(AT)XML$(AT),YES,' \ + -e 's,$(AT)SORT$(AT),NO,' \ + $< > $@ || ( $(RM) -f $@ ; exit 1 )
# we depend on Doxyfile.stamp not have this run in parallel with it to avoid # concurrent Doxygen runs, which might overwrite each other's files @@ -145,7 +157,9 @@ ALL_LOCAL_TARGETS += geany-gtkdoc.h geany-sciwrappers-gtkdoc.h CLEAN_LOCAL_TARGETS += clean-gtkdoc-header-local
clean-gtkdoc-header-local: - -rm -rf xml/ Doxyfile-gi Doxyfile-gi.stamp geany-gtkdoc.h geany-sciwrappers-gtkdoc.h + rm -rf xml/ \ + Doxyfile Doxyfile.stamp Doxyfile-gi Doxyfile-gi.stamp \ + geany-gtkdoc.h geany-sciwrappers-gtkdoc.h
endif
@@ -158,6 +172,7 @@ uninstall-local: rm -f $(DOCDIR)/html/index.html rm -f $(DOCDIR)/manual.txt rm -f $(DOCDIR)/ScintillaLicense.txt + rm -f $(DOCDIR)/LexillaLicense.txt
# manually install some files under another name install-data-local: @@ -171,3 +186,4 @@ endif $(mkinstalldirs) $(DOCDIR) $(INSTALL_DATA) $(srcdir)/geany.txt $(DOCDIR)/manual.txt $(INSTALL_DATA) $(top_srcdir)/scintilla/License.txt $(DOCDIR)/ScintillaLicense.txt + $(INSTALL_DATA) $(top_srcdir)/scintilla/lexilla/License.txt $(DOCDIR)/LexillaLicense.txt
Modified: icons/24x24/Makefile.am 7 lines changed, 6 insertions(+), 1 deletions(-) =================================================================== @@ -1,4 +1,9 @@ -icons_actionsdir = $(datadir)/icons/hicolor/24x24/actions +iconsdir = $(datadir)/icons/hicolor/24x24 +icons_appsdir = $(iconsdir)/apps +icons_actionsdir = $(iconsdir)/actions + +dist_icons_apps_DATA = \ + geany.png
dist_icons_actions_DATA = \ geany-build.png \
Modified: icons/24x24/geany.png 0 lines changed, 0 insertions(+), 0 deletions(-) =================================================================== No diff available, check online
Modified: plugins/Makefile.am 7 lines changed, 3 insertions(+), 4 deletions(-) =================================================================== @@ -43,7 +43,7 @@ saveactions_la_SOURCES = saveactions.c filebrowser_la_SOURCES = filebrowser.c splitwindow_la_SOURCES = splitwindow.c
-demoplugin_la_CFLAGS = -DG_LOG_DOMAIN=""Demoplugin"" -DLOCALEDIR=""$(LOCALEDIR)"" +demoplugin_la_CFLAGS = -DG_LOG_DOMAIN=""Demoplugin"" demoproxy_la_CFLAGS = -DG_LOG_DOMAIN=""Demoproxy"" classbuilder_la_CFLAGS = -DG_LOG_DOMAIN=""Classbuilder"" htmlchars_la_CFLAGS = -DG_LOG_DOMAIN=""HTMLChars"" @@ -64,10 +64,9 @@ splitwindow_la_LIBADD = $(top_builddir)/src/libgeany.la $(GTK_LIBS) endif # PLUGINS
if MINGW -# FIXME: why is this define different than the non-MINGW one? -AM_CPPFLAGS = -DGEANY_DATADIR="data" +AM_CPPFLAGS = -DGEANY_DATADIR="data" -DGEANY_LOCALEDIR="" else -AM_CPPFLAGS = -DDATADIR="$(datadir)" +AM_CPPFLAGS = -DGEANY_DATADIR="$(datadir)" -DGEANY_LOCALEDIR=""$(localedir)"" endif
AM_CPPFLAGS += \
Modified: plugins/classbuilder.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -31,7 +31,7 @@ GeanyData *geany_data;
PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
-PLUGIN_SET_INFO(_("Class Builder"), _("Creates source files for new class types."), VERSION, +PLUGIN_SET_INFO(_("Class Builder"), _("Creates source files for new class types."), PACKAGE_VERSION, "Alexander Rodin, Ondrej Donek, the Geany developer team")
Modified: plugins/demoplugin.c 5 lines changed, 4 insertions(+), 1 deletions(-) =================================================================== @@ -30,6 +30,9 @@ * - it will be loaded at next startup. */
+#ifdef HAVE_CONFIG_H +# include "config.h" +#endif
#include "geanyplugin.h" /* plugin API, always comes first */ #include "Scintilla.h" /* for the SCNotification struct */ @@ -216,7 +219,7 @@ static void demo_cleanup(GeanyPlugin *plugin, gpointer data) void geany_load_module(GeanyPlugin *plugin) { /* main_locale_init() must be called for your package before any localization can be done */ - main_locale_init(LOCALEDIR, GETTEXT_PACKAGE); + main_locale_init(GEANY_LOCALEDIR, GETTEXT_PACKAGE); plugin->info->name = _("Demo"); plugin->info->description = _("Example plugin."); plugin->info->version = "0.4";
Modified: plugins/export.c 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -33,8 +33,8 @@ GeanyData *geany_data;
PLUGIN_VERSION_CHECK(GEANY_API_VERSION) -PLUGIN_SET_INFO(_("Export"), _("Exports the current file into different formats."), VERSION, - _("The Geany developer team")) +PLUGIN_SET_INFO(_("Export"), _("Exports the current file into different formats."), + PACKAGE_VERSION, _("The Geany developer team"))
static GtkWidget *main_menu_item = NULL; @@ -50,7 +50,7 @@ static GtkWidget *main_menu_item = NULL; <head>\n\ <title>{export_filename}</title>\n\ <meta http-equiv="content-type" content="text/html;charset=utf-8" />\n\ - <meta name="generator" content="Geany " VERSION "" />\n\ + <meta name="generator" content="Geany " PACKAGE_VERSION "" />\n\ <meta name="date" content="{export_date}" />\n\ <style type="text/css">\n\ {export_styles}\n\ @@ -65,7 +65,7 @@ static GtkWidget *main_menu_item = NULL; </html>\n"
#define TEMPLATE_LATEX "\ -% {export_filename} (LaTeX code generated by Geany " VERSION " on {export_date})\n\ +% {export_filename} (LaTeX code generated by Geany " PACKAGE_VERSION " on {export_date})\n\ \documentclass[a4paper]{article}\n\ \usepackage[a4paper,margin=2cm]{geometry}\n\ \usepackage[utf8]{inputenc}\n\
Modified: plugins/filebrowser.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -46,8 +46,8 @@ GeanyData *geany_data;
PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
-PLUGIN_SET_INFO(_("File Browser"), _("Adds a file browser tab to the sidebar."), VERSION, - _("The Geany developer team")) +PLUGIN_SET_INFO(_("File Browser"), _("Adds a file browser tab to the sidebar."), + PACKAGE_VERSION, _("The Geany developer team"))
/* Keybinding(s) */
Modified: plugins/htmlchars.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -35,8 +35,8 @@ GeanyData *geany_data;
PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
-PLUGIN_SET_INFO(_("HTML Characters"), _("Inserts HTML character entities like '&'."), VERSION, - _("The Geany developer team")) +PLUGIN_SET_INFO(_("HTML Characters"), _("Inserts HTML character entities like '&'."), + PACKAGE_VERSION, _("The Geany developer team"))
/* Keybinding(s) */
Modified: plugins/saveactions.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -40,7 +40,7 @@ GeanyData *geany_data; PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
PLUGIN_SET_INFO(_("Save Actions"), _("This plugin provides different actions related to saving of files."), - VERSION, _("The Geany developer team")) + PACKAGE_VERSION, _("The Geany developer team"))
enum
Modified: plugins/splitwindow.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -31,7 +31,7 @@
PLUGIN_VERSION_CHECK(GEANY_API_VERSION) PLUGIN_SET_INFO(_("Split Window"), _("Splits the editor view into two windows."), - VERSION, _("The Geany developer team")) + PACKAGE_VERSION, _("The Geany developer team"))
GeanyData *geany_data;
Modified: scripts/gen-signallist.sh 8 lines changed, 8 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +HEADER="/* This file is auto-generated, do not edit. */" +TEXT=$(sed -n 's/^.*handler="([^"]{1,})".*$/ITEM(\1)/p' "$1" | sort | uniq) + +printf "%s\n%s\n" "$HEADER" "$TEXT" > "$2"
Modified: src/Makefile.am 6 lines changed, 1 insertions(+), 5 deletions(-) =================================================================== @@ -179,11 +179,7 @@ callbacks.c: signallist.i glade_file=$(top_srcdir)/data/geany.glade
signallist.i: $(glade_file) Makefile - $(AM_V_GEN)( \ - echo '/* This file is auto-generated, do not edit. */' && \ - $(SED) -n 's/^.*handler="([^"]{1,})".*$$/ITEM(\1)/p' "$(glade_file)" \ - | $(SORT) | $(UNIQ) \ - ) > $@ || { $(RM) $@ && exit 1; } + $(AM_V_GEN)$(top_srcdir)/scripts/gen-signallist.sh $(glade_file) $@
CLEANFILES += signallist.i
Modified: src/libmain.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -304,10 +304,10 @@ static void main_init(void)
const gchar *main_get_version_string(void) { - static gchar full[] = VERSION " (git >= " REVISION ")"; + static gchar full[] = PACKAGE_VERSION " (git >= " REVISION ")";
if (utils_str_equal(REVISION, "-1")) - return VERSION; + return PACKAGE_VERSION; else return full; }
Modified: src/templates.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -533,7 +533,7 @@ static void replace_static_values(GString *text) utils_string_replace_all(text, "{mail}", template_prefs.mail); utils_string_replace_all(text, "{company}", template_prefs.company); utils_string_replace_all(text, "{untitled}", GEANY_STRING_UNTITLED); - utils_string_replace_all(text, "{geanyversion}", "Geany " VERSION); + utils_string_replace_all(text, "{geanyversion}", PACKAGE_STRING); }
Modified: src/utils.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -1930,7 +1930,7 @@ gchar *utils_get_help_url(const gchar *suffix) if (! g_file_test(uri + skip, G_FILE_TEST_IS_REGULAR)) { /* fall back to online documentation if it is not found on the hard disk */ g_free(uri); - uri = g_strconcat(GEANY_HOMEPAGE, "manual/", VERSION, "/index.html", NULL); + uri = g_strconcat(GEANY_HOMEPAGE, "manual/", PACKAGE_VERSION, "/index.html", NULL); }
if (suffix != NULL)
Modified: tests/ctags/Makefile.am 6 lines changed, 4 insertions(+), 2 deletions(-) =================================================================== @@ -343,6 +343,8 @@ test_results = $(test_sources:=.tags)
TEST_EXTENSIONS = .tags TAGS_LOG_COMPILER = $(srcdir)/runner.sh +AM_TAGS_LOG_FLAGS = $(top_builddir)/src/geany$(EXEEXT) +AM_TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) top_builddir=$(top_builddir)
TESTS = $(test_results) EXTRA_DIST = $(test_sources) $(test_results) @@ -353,6 +355,6 @@ check_processing_order_sources = \ EXTRA_DIST += $(check_processing_order_sources) .PHONY: check-processing-order check-processing-order: $(check_processing_order_sources) - srcdir="$(srcdir)" top_builddir="$(top_builddir)" \ - $(srcdir)/runner.sh --result $(check_processing_order_sources:%=$(srcdir)/%) + $(AM_TESTS_ENVIRONMENT) \ + $(srcdir)/runner.sh $(top_builddir)/src/geany$(EXEEXT) --result $(check_processing_order_sources:%=$(srcdir)/%) check-local: check-processing-order
Modified: tests/ctags/runner.sh 10 lines changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -1,10 +1,9 @@ -#!/bin/sh +#!/bin/bash
# error out on undefined variable expansion, useful for debugging set -u
-# FIXME: get this from automake so we have $(EXEEXT) -GEANY="${top_builddir:-../..}/src/geany" +GEANY="$1" TMPDIR=$(mktemp -d) || exit 99 CONFDIR="$TMPDIR/config/"
@@ -14,9 +13,10 @@ trap 'rm -rf "$TMPDIR"' EXIT # related configuration files mkdir -p "$CONFDIR" || exit 99 mkdir -p "$CONFDIR/filedefs/" || exit 99 -cp "${srcdir:-.}"/../../data/filetype_extensions.conf "$CONFDIR" || exit 99 -cp "${srcdir:-.}"/../../data/filedefs/filetypes.* "$CONFDIR/filedefs/" || exit 99 +cp "${top_srcdir:-../..}"/data/filetype_extensions.conf "$CONFDIR" || exit 99 +cp "${top_srcdir:-../..}"/data/filedefs/filetypes.* "$CONFDIR/filedefs/" || exit 99
+shift if [ "$1" = "--result" ]; then # --result $result $source... [ $# -gt 2 ] || exit 99
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).