From 5e22dfae22bc09084ae556b367159e7eaa713591 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 4 Feb 2022 23:00:08 +0100 Subject: [PATCH 1/3] 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 --- Makefile.am | 1 + configure.ac | 3 +-- doc/Doxyfile.in | 15 +++++++------- doc/Makefile.am | 42 ++++++++++++++++++++++++++------------ icons/24x24/Makefile.am | 7 ++++++- icons/24x24/geany.png | Bin 0 -> 1678 bytes plugins/Makefile.am | 7 +++---- plugins/classbuilder.c | 2 +- plugins/demoplugin.c | 5 ++++- plugins/export.c | 8 ++++---- plugins/filebrowser.c | 4 ++-- plugins/htmlchars.c | 4 ++-- plugins/saveactions.c | 2 +- plugins/splitwindow.c | 2 +- scripts/gen-signallist.sh | 8 ++++++++ src/Makefile.am | 6 +----- src/libmain.c | 4 ++-- src/templates.c | 2 +- src/utils.c | 2 +- tests/ctags/Makefile.am | 6 ++++-- tests/ctags/runner.sh | 10 ++++----- 21 files changed, 84 insertions(+), 56 deletions(-) create mode 100644 icons/24x24/geany.png create mode 100755 scripts/gen-signallist.sh diff --git a/Makefile.am b/Makefile.am index 26bb83b7e9..e491330984 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/configure.ac b/configure.ac index 10d19a1276..716dacc11f 100644 --- a/configure.ac +++ b/configure.ac @@ -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 .]) 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 ]) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 1e59386a5f..c95bd5790f 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -248,7 +248,7 @@ ALIASES = "signal=- @ref " \ "signaldesc=" \ "signals=@b Signals: " \ "endsignals= " \ - "gironly=@internal" + "gironly=@GIRONLY@" # Apparently Doxygen doesn't seem to like \only without a previous command, so create a no-op ALIASES += "noop=\if FALSE \endif" @@ -567,7 +567,7 @@ 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 @@ -575,7 +575,7 @@ SORT_MEMBER_DOCS = YES # 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 diff --git a/doc/Makefile.am b/doc/Makefile.am index 63511e7bd1..b8d0532090 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -82,9 +82,23 @@ 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 \ @@ -92,7 +106,7 @@ doxygen_sources = \ $(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 diff --git a/icons/24x24/Makefile.am b/icons/24x24/Makefile.am index 423b96983f..adf4c2b516 100644 --- a/icons/24x24/Makefile.am +++ b/icons/24x24/Makefile.am @@ -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 \ diff --git a/icons/24x24/geany.png b/icons/24x24/geany.png new file mode 100644 index 0000000000000000000000000000000000000000..9d24f37e998d2fae9269cc988094a39e91af64db GIT binary patch literal 1678 zcmV;9266d`P)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x00(qQO+^Rg3=0kd70ub<@&Et@l1W5CR7l6IlwEL?R~g5D z=Y8M(-t1;~lTApn1R@PcIxtv-mQbd(Gqgo)%d~aWS{ZS?aCAELLe%;(jIDaZICQK- z6-Oy_M%y}e1cVZsc3L2T0)f(`X+j7qA#8S&-Ry4m>)rR`ctNTp)fq4H%$zwF=bZol z`9IJ3KLGsWtz!=lT^{VaGCDl{-nrg=UEN1(S*YmhKDsh7aU*S6maJBFsq4D=-nrg= z3x%%$57gI1Yo)ZYZHZ}C)krw<=t2?{4Wn8yO%uy90D-RS=NF8ixheLf)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6BJtOTS<@=1EHumJPsl)UTmv))3R0xAOJw+4#QM-$J#sF+#V@vqe=Xs z7=}^7s8+Dd0)ir{DpAy0w6a$w;-go4dxn2F3qHrupJ+0m#i9g${EElODe|I&yv@Svvd7^BkGVkp(LM55dQw0FGIe&e>g=1+W0) zmSz4gkbePw?v%b-NhIa~001R)MObuXVRU6WV{&C-bY%cCFfuVMF)}SNF;p=$IxsRi zFf%JKFgh?WO9CVp0000bbVXQnWMOn=I&E)cX=ZrszG&(RcIxsUU YFfckWFgjnHs{jB107*qoM6N<$f@O3U9RL6T literal 0 HcmV?d00001 diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 44cf3ff9ee..5460ca5a28 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -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 += \ diff --git a/plugins/classbuilder.c b/plugins/classbuilder.c index 6db036b12e..a5d382a455 100644 --- a/plugins/classbuilder.c +++ b/plugins/classbuilder.c @@ -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") diff --git a/plugins/demoplugin.c b/plugins/demoplugin.c index 171a5113c3..15d4ef6fa1 100644 --- a/plugins/demoplugin.c +++ b/plugins/demoplugin.c @@ -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"; diff --git a/plugins/export.c b/plugins/export.c index c9d1f13d87..1d5e813a12 100644 --- a/plugins/export.c +++ b/plugins/export.c @@ -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; \n\ {export_filename}\n\ \n\ - \n\ + \n\ \n\